Virtual machine Galaxy Kirin v10 system partition, display disk

1. The setting steps of adding a new disk in VMware

(Suggestion: When setting up the virtual machine, do not run the system of the virtual machine , or you need to restart the virtual machine if you add a new virtual disk)

1. Select "VM" ---- "Settings" and open it, position the cursor on the " hard disk (SCSI) " option, and then click the " Add" button below

 2. Click OK to proceed to the next step

3. Select the disk type

4. According to the prompt, create a virtual disk and click Next

5. Set the disk size, click Next

 6. Select the storage location, and finally click Finish

The following is an introduction to the way to mount  a new virtual disk in Linux and widows in a virtual machine

2. Linux mounts virtual disks in virtual machines

1. Use the "fdisk -l" command to view the partitions of the current system (if you have just set up VMware -- "Settings" to run the system, the following picture will appear: the new disk is not recognized, that is, sdb), the solution , restart the virtual machine: shutdown -r now

2. Partition and format the newly created disk:

Enter #  fdisk /dev/sdb

The terminal will prompt: Command (m for help):

 3. On the basis of the previous step, enter:  and the following prompts will appear: 

 4. Then enter according to the prompt: n

The following prompt will appear, enter p and 1 in sequence

 5. In the next two steps, just press Enter to default

6. Enter " w " to save and launch

 7. Use the " fdisk -l  " command again to check and you will find that /dev/sdb1 appears (indicating that the partition work has been completed); sdb1 represents the first partition. Just press "1" to divide only one disk area, so only sdb1

8. Format the newly created partition: format it into ext4 file system

# Input: mkfs -t ext4 /dev/sdb1

9. The following is to mount and access the /dev/sdb1 partition that is divided into partitions

9.1. Manual mount: use mkdir /data && mount /dev/sdb1 /data (custom mount directory yourself)

# Access: df -h

10. Vim edit /etc/fstab, add at the end

/dev/sdb1       /data   ext4   rw,user,x-gvfs-show,nosuid,nofail        0 0

11. Press esc first, then press shift+: (in English), enter wq and press Enter, save and exit

:q! Do not save the file, force exit the vim command

:w save the file without exiting the vim command

:wq save the file and exit the vim command

 12. Use the cat /etc/fstab command to view and edit files

13. Turn on My Computer and you will see that the disk partition is successful, and the disk will be displayed

Guess you like

Origin blog.csdn.net/zhao__b/article/details/126157425