ESXi Ubuntu dynamically increases HDD without rebooting
To expand the root partition without restarting the system by adding a new disk :
The first step is to open the Settings page of your virtual machine client, click on ' Add ' button and proceed to the next step.
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/83/E0/wKioL1d_DFODDRmtAAD7rUDmzdo071.png-wh_500x0-wm_3 -wmp_4-s_3598960584.png "title=" 1.png "alt=" Wkiol1d_dfoddrmtaad7rudmzdo071.png-wh_50 "/>
Select the configuration information that is required for the new disk, as shown in, select the size of the new disk and its type.
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/83/E1/wKiom1d_DF6xsGDuAADhrNda72E162.png-wh_500x0-wm_3 -wmp_4-s_2543823751.png "title=" 2.png "alt=" Wkiom1d_df6xsgduaadhrnda72e162.png-wh_50 "/>
Then go to the server and repeat the following command to scan your disk device to make the new disk visible in the system.
For i in ' Ls/sys/class/scsi_host/*/scan ';d o echo "---" > $i;d One
List the name of your SCSI device and set the value:
For i in ' Ls/sys/class/scsi_device/*/device/rescan ';d o echo 1 > $i;d One
Fdisk-l
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/83/E0/wKioL1d_DG7Agxo4AAOgmEJ_Eho662.png-wh_500x0-wm_3 -wmp_4-s_1071181861.png "title=" 3.png "alt=" Wkiol1d_dg7agxo4aaogmej_eho662.png-wh_50 "/>
Once the new disk is visible, you can run the following command to create a new partition;
Fdisk/dev/sdb--->n-->1-->2048-->p-->wmkfs-t ext4/dev/sdbmkdir/datamount-t ext4/dev/sdb/data (Mount)
Get to /dev/sdb The UUID of this partition using command :blkid/dev/sdb
Cat << EOF >>/etc/fstabuuid= "f7dbec85-ec1e-4291-bf91-73587dc81855"/data ext4 defaults 0 0EOF
This article is from the "Patrick" blog, so be sure to keep this source http://patrick0715.blog.51cto.com/3681259/1812514
ESXi Ubuntu dynamically increases HDD without rebooting