Adding new virtual hard disks to VMware virtual machine systems
Adding virtual disks in 1.Vmware
2. View the newly added drive's device number via DMESG
Start the virtual machine and get the device number of the new drive device through the terminal #dmesg |grep SDB
(Check the device number of the newly added hard drive, typically SDX or HDX, and verify that the hard drive found is the new hard drive by looking at the capacity)
3.fdisk/dev/sdb (assuming that the newly added drive is SDB)
#mkfs. ext4/dev/sdb1
#mkdir/data
#mount/dev/sdb1/data
4. Automatically mount the new drive when the system boots
Mount method: First get the UUID of each partition
Ls-all/dev/disk/by-uuid
5. Obtain the UUID of the new HDD and add it to the/etc/fstab file.
#vim/etc/fstab
Add one line: Uuid=19b83dc7-7684-44a8-b531-c0bd0ed7fcb3/data ext4 defaults 0 0
Save exit.
6. And test with the following command
#mount –a will be mounted automatically the next time the system restarts.
Adding new virtual hard disks to VMware virtual machine systems