Mount Disks & NFS Storage

Mounting disks to R1Soft

If you are low on disk space on R1Soft, inform Mike to procure new drives. Once the drives are procured, you can mount the disks and use it for R1soft Disk Safe:

To show newly added disk without reboot if not shown:


for BUS in /sys/class/scsi_host/host*/scan
do
   echo "- - -">  ${BUS}
done

Additional disks on our R1Soft Backup servers are created as RAID 0 array with a single drive.

Once the new drive is plugged into the enclosure slot, you can use the following command to see if the drive is detected:


# /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0 | egrep "Enclosure Device|Slot Number|Inquiry Data|Firmware state"

Enclosure Device ID: 16 Slot Number: 5 Firmware state: Online, Spun Up Inquiry Data: WD-WX81D65501EXWDC WD5001FZWX-00ZHUA0 01.01A01 Enclosure Device ID: 16 Slot Number: 10 Firmware state: Unconfigured(good), Spun Up Inquiry Data: ZTM0CVCNST14000NM001G-2KJ103 SN03

The new drive should be showing up as an Unconfigured(good) one. Double check the make/model of the drive using the "Inquiry Data" string and make sure it is the new one that you plugged in.

Take a note of the Enclosure Device ID, Slot Number and Adaptor Number corresponding to the new drive.

You can run the following command to see additional details on Adaptors and Enclosures on your RAID controller.


# /opt/MegaRAID/MegaCli/MegaCli64 -EncInfo -aALL

You will now need to create a new RAID 0 array using your new drive.


# /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0 [16:10] -a0

r0 = raid level number 0

[16:10] = [Enclosure ID:Slot Number] of the new drive

a0 = adaptor 0

Output of the command will be similar to the following:


# ./MegaCli64 -CfgLdAdd -r0 [16:10] -a0

Adapter 0: Created VD 5

Adapter 0: Configured the Adapter!!

Exit Code: 0x00

Now the new drive will be listing in 'fdisk -l' or lsblk output with its device name (ex: /dev/sdf)


# lsblk

sdf 8:80 0 12.8T 0 disk

# fdisk -l

Disk /dev/sdf: 14000.0 GB, 13999982772224 bytes, 27343716352 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

You need to create a file system on the drive and mount it. (There is no need to partition the disk -- use the entire size)

So, perform:

# mkfs.ext4 /dev/sdf

Create a new mount point, add the mount entry in /etc/fstab file and try to mount the new file system:


# mkdir /14TB
# mount /dev/sdf /14TB

Sometimes On CentOS 7 systems, you may not see the new file system mounted after executing the mount command. systemd is behind this behavior as it controls file system mounting. You need to reload the deamon for the mount to work:


# systemctl daemon-reload
# mount /dev/sdf /14TB

Also run 'mount -a' to make sure all your active file system mount entries in /etc/fstab file work.

Run 'df -h' to see if the new filesystem is mounted


# df -h

/dev/sdf 13T 40M 12T 1% /14TB

You can now login to R1Soft and create disk safes there.

Adding NFS Storage from R1Soft disks to Xenserver

Except for the Xackup on the DCs Peer1 and 3Z, the one on esecure is using drives for backups from disks mounted on R1Soft server of esecure. This is using NFS Storage. As well, you may require to use NFS Storage from time to time.

Suppose 192.168.12.5 is the local IP of Xenserver 4gh10xen. If you want to mount /sdb/Xackup_Drive/ in ESR R1Soft as an NFS mount on 4gh10xen, you need to specify in /etc/exports:

/sdb/Xackup_Drive/ 192.168.12.5(rw,sync,no_root_squash,no_subtree_check)

Then perform exportfs restart:

# exportfs -ra

If that doesn't work, do an NFS restart on esr1.4goodhosting.com server:

# systemctl restart nfs

Now, on Xencenter, right click on 4gh10xen, click New SR , select NFS under Virtual disk storage, click Next, give a name to the storage and click Next. In the Share Name field, give the path as:

192.168.12.7:/sdb/Xackup_Drive/

Select Create a new SR (if an exisitng SR has to be mounted, use Reattach an exisitng SR instead). The NFS Version should be NFSv3. Now, click Finish.

You can use the same procedure for loading ISO drives. Instead of NFS under Virtual disk storage, use NFS ISO under ISO library when creating new SR.