- How to add a piece of hard disk
- Virtual machine plug-in drive
- Partition
- Formatting
- Mount
One, upstairs, violent. command to view device mounts, with SDA partitioned, and SDB unpartitioned 2 disks
Lsblk–f Viewing device Mounts
Virtual machine add hard drive steps
In the Virtual Machine menu, select Settings, then add the hard disk in the device list, and then go all the way "next", in the middle only select the size of the disk where you need to modify, until finished. Then reboot the system.
2. Partition Command Fdisk/dev/sdb
Play m to see the Help document
I accidentally knocked out of the coma.
Re-enter the partition,
After starting the partition, enter n, add the partition, and then select P, the partition type is primary partition. Two times enter the default all remaining space. The last input W writes the partition and exits without saving exit input Q.
Hand cheap 4, wood has relations, after the configuration is right
3. Format the disk
Mkfs-t EXT4/DEV/SDB4
EXT4 is a partition type
This is the disk, which is the ID uuid.
4. Mount: Associate a partition with a directory,
Mount Device name Mount directory
Example: Mount/dev/sdb1/newdisk
Umount device name or mount directory
For example: UMOUNT/DEV/SDB1 or Umount/newdisk
It will expire after the load is mounted on the command line.
- Permanent Mount
- Implementing mounts by modifying/etc/fstab
- after adding is complete Executive Mount–a Immediate effect
Enter file Vim/etc/fstab , add a line of disk area information, the white line content in the picture
Execute Mount–a, you can see that the TMP file is already mounted,
Df–h Query system Overall disk usage, distinguish –h command h humen
Disk partition complete O (∩_∩) o~
Linux Virtual machine Disk partitioning