How add another repository (disk) to Virtual Appliance
1. If you need to remove an old backup repository from the VA, please refer to VA Deployment Guide
2. Log into vSphere Client and add a new Hard Disk to a Virtual Appliance
3. Log into Virtual Appliance using your credentials (default credentials are root/root)
4. Rescan the scsi bus for a new hardware by executing the following commands:
a. cat /proc/partitions and notice the list of devices. Note, that onboard backup repository resides on sdb device
b. apt-get install scsitools
c. rescan-scsi-bus
d. cat /proc/partitions and see what devices were added, for example, you will see sdb device
5. Create a partition on the new disk by executing the following commands:
a. fdisk /dev/
b. Command (m for help) - type m to see all options
c. Type n for creating a new partition
d. Type p for creating a primary type of partition
e. Type 1 for creating the 1st partition
f. Press Enter for selecting default values for first and last sectors
g. Type t for changing partitions system id
h. Hex code (type L to list codes) - type 8e that corresponds Linux LVM id
i. Type w for writing table to disk
j. Type the command partprobe to inform the operating system about partition table changes
k. Type cat /proc/partitions to see if a new partition has been created, for example, you have to see sdb1
6. Create LVM structure on newly created partition by executing the following commands:
a. pvcreate /dev/sdb1
b. pvdisplay to see that physical volume has been created
c. vgcreate Volume_Group_Name /dev/sdd1
d. vgdisplay to see that volume group has been created
e. lvcreate -l 100%FREE -n Logical_Volume_Name Volume_Group_Name
f. lvdisplay to see that logical volume has been created
7. Create filesystem on the LVM: mkfs -t ext4 /dev/Volume_Group_Name/Logical_Volume_Name
8. Mount your LVM to /etc/fstab file
a. Edit the file fstab - vi /etc/fstab
b. Add the following line - /dev/Volume_Group_Name/Logical_Volume_Name /mount_point ext4 defaults 0 2
c. Save changes - press Esc button, type : and wq
d. To create a mount point you have to go to, for example, mnt directory - cd /mnt, and create a folder repository - mkdir repository
e. Execute mount -a that will make LVM bootable
f. df -h -T will show you the filesystem and mount point of your backup repository
9. Give proper permissions to the repository folder and set the proper owner:
a. Execute chmod 750 /mnt/repository
b. Execute chown -R bhsvc:bhsvc /mnt/repository
10. Add new backup repository in the Web UI > Configuration > Backup Repositories using the path /mnt/repository
How to extend the repository on the Virtual Appliance?
EXAMPLE 1: Extending the backup repository by adding a new HDD to a VM
1. Log into vSphere Client and add a new Hard Disk to the Virtual Appliance
2. Log into Nakivo VA using your credentials (root/root are default credentials)
3. df -h -T command will show you the filesystem and mount point of the onboard backup repository. For exapmle: /dev/mapper/Volume_Group_Backup_Repository_500GB-Logical_Volume_Backup_Repository_500GB 511G 70M 491G 1% /opt/nakivo/repository
4. Rescan the scsi bus for a new hardware by executing the following commands:
a. Execute cat /proc/partitions and notice the list of devices. Note, that onboard backup repository resides on sdb device
b. Execute apt-get install scsitools
c. Execute rescan-scsi-bus
d. Execute cat /proc/partitions and see what devices were added. For example, sdc device will be found.
5. Create a partition on the new disk by executing the following commands:
a. fdisk /dev/
b. Command (m for help): type m to see all options
c. Type n for creating a new partition
d. Type p for creating a primary type of partition
e. Type 1 for creating the 1st partition
f. Press Enter for selecting default values for first and last sectors
g. Type t for changing partitions system ID
h. Hex code (type L to list codes) - type 8e that corresponds Linux LVM id
i. Type w for writing table to disk
j. Type the command partprobe to inform the operating system about partition table changes
k. Type cat /proc/partitions to see if a new partition has been created, for example, you have to see sdc1
6. Extend existing LVM structure by executing the following commands:
a. Type pvcreate /dev/
b. Type pvdisplay to see that physical volume has been created
c. Type vgextend Volume_Group_Backup_Repository_500GB /dev/sdc1 for extending the volume group called Volume_Group_Backup_Repository_500GB
d. Type vgdisplay to see that volume group has been exetended
e. Type lvdisplay to see what logical volumes exist. Note, that the only logical volume called Logical_Volume_Backup_Repository_500GB exists within the VA
f. Type lvextend -l+100%FREE /dev/Volume_Group_Backup_Repository_500GB/Logical_Volume_Backup_Repository_500GB for extending the logical volume
g. Type resize2fs /dev/mapper/Volume_Group_Backup_Repository_500GB-Logical_Volume_Backup_Repository_500GB for extending the filesystem ext4
h. Type df -h -T to see that repository size has been increased
EXAMPLE 2: Extending the backup repository by extending the Hard Disk
1. Log into vSphere Client and extend the existing disk of the virtual machine
2. Log into Nakivo VA using your credentials (root/root are default credentials)
3. df -h -T command will show you the filesystem and mount point of the onboard backup repository, for exapmle, /dev/mapper/Volume_Group_Backup_Repository_500GB-Logical_Volume_Backup_Repository_500GB 511G 70M 491G 1% /opt/nakivo/repository
4. Rescan the scsi bus for a new hardware by executing the following commands:
a. Execute cat /proc/partitions and notice the list of devices. Note, that onboard backup repository resides on sdb device
b. Execute apt-get install scsitools
c. Execute rescan-scsi-bus
d. Execute cat /proc/partitions and see what devices got added, for example, you will see sdb device, sdb1 patition and free space added by you to sdb device
NOTE: in case the command rescan-scsi-bus has not identified a new space, run the following:
a. apt-get install lsscsi
b. lsscsi - the output will be the follwoing:
[1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0
[2:0:0:0] disk VMware Virtual disk 1.0 /dev/sda
[2:0:1:0] disk VMware Virtual disk 1.0 /dev/sdb
c. You need to tell the VA to rescan sdb device by executing the command echo 1 > /sys/bus/scsi/devices/2:0:1:0/rescan
d. Execute dmesg | grep change - for example, the output can be [91503.909069] sdb: detected capacity change from 558345748480 to 590558003200
5. Create the 2nd partition on free space added to sdb device by executing the following commands:
a. fdisk /dev/sdb
b. Command (m for help) - type m to see all options
c. Type n for creating a new partition
d. Type p for creating a primary type of partition
e. Type 2 for creating the 2nd partition
f. Press Enter for selecting default values for first and last sectors
g. Type t for changing partitions system ID
h. Type 2 for choosing the 2nd partition
i. Hex code (type L to list codes) - type 8e that corresponds Linux LVM id
j. Type w for writing table to disk
k. Type the command partprobe to inform the operating system about partition table changes
l. Type cat /proc/partitions to see if a new partition has been created, for example, you have to see sdb2
6. Extend existing LVM structure by executing the following commands:
a. Type pvcreate /dev/
b. Type pvdisplay to see that physical volume has been created
c. Type vgextend Volume_Group_Backup_Repository_500GB /dev/sdb2 for extending the volume group called Volume_Group_Backup_Repository_500GB
d. Type vgdisplay to see that volume group has been exetended
e. Type lvdisplay to see what logical volumes exist. Note, that only logical volume called Logical_Volume_Backup_Repository_500GB exists within the VA
f. Type lvextend -l+100%FREE /dev/Volume_Group_Backup_Repository_500GB/Logical_Volume_Backup_Repository_500GB for extending the logical volume
g. Type resize2fs /dev/mapper/Volume_Group_Backup_Repository_500GB-Logical_Volume_Backup_Repository_500GB for extending the filesystem
h. Type df -h -T to see that repository size has been increased
Post your comment:
Powered By 2013-2015 ©. Juszeil Conception version 2.0
Queries Executed : 0.0124 seconds