Add a new virtual hard disk to the VMWARE virtual machine system

Add a new virtual hard disk to the VMWARE virtual machine system 1. Add a virtual disk
to Vmware

2. Check the device number of the newly added hard disk through dmesg to
start the virtual machine, and obtain the device number of the newly added hard disk device through the terminal #dmesg|grep sdb
(Check the device number of the newly added hard disk, usually sdx or hdx, by checking the capacity, Confirm that the hard disk found is the newly added hard disk)

3.fdisk /dev/sdb (assuming the newly added hard disk is sdb)
#mkfs.ext4 /dev/sdb1
#mkdir /data
#mount /dev/sdb1 /data

4. Let the new hard disk
mount automatically when the system starts. Mounting method: First get the uuid of each partition
ls -all /dev/disk/by-uuid

5. Obtain the UUID of the newly added hard disk and add it to the /etc/fstab file
#vim /etc/fstab
Add a line: UUID=19b83dc7-7684-44a8-b531-c0bd0ed7fcb3 /data ext4 defaults 0 0
Save and exit.

6. And test it with the following command
#mount -a It will be automatically mounted the next time the system is restarted.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324690207&siteId=291194637