Upgrading hard disks to (larger) different size in Nutanix Community Edition

I recently had a customer that wanted to upgrade the hard disks in his CE cluster.

Below are the required steps:

1. Note the Serial Number off the new disk to enable easy idenification later, found of drive label.

2. Shut Down Cluster / Host and install the new disk then start up again. (shutdown not required if hot swappable).

3. ssh into the host (user = root passwd = nutanix/4u)

4. lsscsi to determine the disk name and /dev location
ie. [0:0:0:0] disk ATA Samsung SSD 850 1B6Q /dev/sda

5. smartctl -i /dev/sdX where X is the /dev location found in step 4.
ie smartctl -i /dev/sda
=== START OF INFORMATION SECTION ===
Device Model: Samsung SSD 850 PRO 128GB
Serial Number: S1SMNWAF722xxx
LU WWN Device Id: 5 002538 87000d8e1
Firmware Version: EXM01B6Q
User Capacity: 128,035,676,160 bytes [128 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Apr 11 23:36:27 2016 PDT
SMART support is: Available – device has SMART capability.
SMART support is: Enabled

6. using the Disk Serial Number you wrote down earlier confirm this is infact the new disk also note
down the WWM (remove spaces), and Device Model for later use.

7. determine the disk by-id path by typing;
ls /dev/disk/by-id/ | grep $Disk_Serial_Number
ie ata-Samsung_SSD_850_PRO_128GB_S1SMNWAF722xxx

8. virsh list to determine the CVM name
ie NTNX-xxx-A-CVM

9. virsh edit $CVM_Name
ie virsh edit NTNX-xxx-A-CVM

10. insert a new disk section under Devices using the information obtained in Step 5.
<disk type=’block’ device=’disk’>
<driver name=’qemu’ type=’raw’ cache=’none’ io=’native’/>
<source dev=’/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNWAF722xxx’/> (see step 7)
<target dev=’sdX’ bus=’scsi’/> (for X see step 4)
<serial>S1SMNWAF722xxx</serial> (see step 5)
<wwn>500253887000dxxx</wwn> (see step 5)
<vendor>ATA</vendor>
<product>Samsung SSD 850</product> (see step 5)
<address type=’drive’ controller=’0′ bus=’0′ target=’0′ unit=’1’/> (adjust unit value to suit)
</disk>

11. Vacate or shut down running VM’s then restart CVM
virsh shutdown $CVM_Name
virsh start $CVM_Name

12. SSH into CVM and check the new disk is present with list_disks

13. Proceed to add new disk to the cluster
sudo cluster/bin/repartition_disks -d /dev/sdX (where X is new disk see step 12)
sudo cluster/bin/clean_disks -p /dev/sdX1
sudo cluster/bin/mount_disks
genesis restart

14. If the new disk is an SSD you need to update it to the perf tier

15. Locate disk id
ncli disk ls | grep -B 8 $New_Disk_Serial_Number
ie Id : 00052f65-bf3d-5ed4-78ff-002219b4xxx::55

16. disk update id=$value tier-name=SSD-SATA (for value see step 15)

Stop and start the cluster, by doing a “cluster stop” followed by a “cluster start”

Example of disk information:
<disk type=’block’ device=’disk’>
<driver name=’qemu’ type=’raw’ cache=’none’ io=’native’/>
<source dev=’/dev/disk/by-id/ata-ST3000DM001-1ER166_Z500xxx’/>
<target dev=’sdg’ bus=’scsi’/>
<serial>Z500xxx</serial>
<wwn>5000c500667dxxx</wwn>
<vendor>ATA</vendor>
<product>Seagate Cuda</product>
<address type=’drive’ controller=’0′ bus=’0′ target=’0′ unit=’5’/>
</disk>

About the Author