Disk and file system experiments

Disk and file system experiments

Create a new disk in the virtual machine, select the hard disk in the lower right corner of the virtual machine, open the settings and select the hard disk to add.
Disk and file system experiments
Disk and file system experiments
Disk and file system experiments
Disk and file system experiments
Disk and file system experiments
Disk and file system experiments

Open the terminal in the virtual machine and enter the init 6 command to restart the virtual machine. The hard disk of the virtual machine can be used after the restart.
Disk and file system experiments

Open the remote terminal (putty) to log in, enter the 'cd /dev' command: switch to the dev directory to view the newly added hard disk location information.
Disk and file system experimentsDisk and file system experiments

Create three primary partitions in the newly added hard disk sdb

Disk and file system experiments

Partition 1
Disk and file system experiments

Partition 2
Disk and file system experiments

Partition 3
Disk and file system experiments

Create extended partition
Disk and file system experiments

Create primary partition
Disk and file system experiments

Add partition by default

Disk and file system experiments

Change the partition type
Disk and file system experiments
Convert primary partition to swap partition
Disk and file system experiments
Disk and file system experiments
View disk device information
Disk and file system experiments
Disk and file system experiments

Format the disk sdb1
Disk and file system experiments
Disk and file system experiments

Mount the sdb1 disk to an empty folder
Disk and file system experiments

Format the swap swap partition
Disk and file system experiments

Enter the 'cat /porc/swaps' command to view the virtual memory of sdb5
Disk and file system experiments

Open virtual memory in 'sdb3'
Disk and file system experiments
Disk and file system experiments

Enter the 'fdisk -l' command to view disk information
Disk and file system experiments

Format the logical partitions sdb5 and sdb6
Disk and file system experiments
Disk and file system experiments

Create three empty folders for mounting and mount
Disk and file system experiments
Disk and file system experiments
sdb1, sdb2, and sdb5 to the accp, benet, and jazz folders
Disk and file system experiments

Unmount (umount) jazz
Disk and file system experiments

Create the folder jerry and mount the sdb1 disk to the jerry folder.
Disk and file system experiments

Restart the device to see if it is automatically mounted
Disk and file system experiments
Disk and file system experiments
. Implement automatic mounting at startup: switch to the etc directory to view the device information and mount point.
Disk and file system experiments
Enter editing, press 'G' to jump to the end of the line, press 'o' to jump to the next line to insert and modify
Disk and file system experiments
, mount jreey in it, press Esc to exit insert mode, press ':' to enter 'wq' (lowercase) to save and exit
Disk and file system experiments

Enter the 'init 6' restart command to see if it is automatically booted and mounted.
Disk and file system experiments
Disk and file system experiments

Automatically mount the CD-ROM: Enter 'vi /etc/fstab' to edit, press 'G' to switch to the end of the line, and press 'i' to insert and modify.
Disk and file system experiments

Open the virtual terminal and enter 'df -h' to view the mount point command to see if mnt is automatically mounted.
Disk and file system experiments

Open the remote terminal (putty) to log in, enter 'df -h' to view the mount point command to see if mnt is automatically mounted.
Disk and file system experiments
The experiment is over.

Guess you like

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