Deep disk mount

Deep in disk mount

It's no surprise to see my terminal English. I don't know how, but it doesn't affect what we have to do.

1. View the current disk condition

Use df -h to view disk status

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           789M  2.9M  786M   1% /run
/dev/nvme0n1p3   45G   15G   28G  35% /
tmpfs           3.9G  194M  3.7G   5% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/nvme0n1p5   89G   40G   45G  47% /home/yanjun/Software
/dev/nvme0n1p1  300M  8.8M  291M   3% /boot/efi
/dev/nvme0n1p4   89G   44G   41G  52% /home/yanjun/Work
tmpfs           789M   20K  789M   1% /run/user/1000

2. Mounting steps

2.1 create a new mount directory

For example, Mount directory / home/nanfeng/Work

sodo mkdir /home/nanfeng/Work

2.2 view UUID of / dev/nvme0n1p4 partition

$: sudo blkid /dev/nvme0n1
/dev/nvme0n1: PTUUID="352f5fd1-91fa-4ea3-88ff-464c8c138186" PTTYPE="gpt"

2.3 append mount information to file / etc/fstab

# Open the file for using the deep text compiler
sudo deepin-editor /etc/fstab

Content of file appended

UUID=352f5fd1-91fa-4ea3-88ff-464c8c138186  /home/nanfeng/Work   ext4    defaults   0   2

The first column is UUID, the second column is mount directory (the directory must be empty), the third column is file system type, the fourth column is parameter, the fifth column 0 means no backup, and the last column must be 2 or 0 (unless the boot partition is 1)

2.4 use the command to view the mount information

Use df -h to view details

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           789M  2.9M  786M   1% /run
/dev/nvme0n1p3   45G   15G   28G  35% /
tmpfs           3.9G  194M  3.7G   5% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/nvme0n1p5   89G   40G   45G  47% /home/yanjun/Software
/dev/nvme0n1p1  300M  8.8M  291M   3% /boot/efi
/dev/nvme0n1p4   89G   44G   41G  52% /home/yanjun/Work
tmpfs           789M   20K  789M   1% /run/user/1000

Tags: Programming sudo

Posted on Tue, 07 Apr 2020 08:00:18 -0700 by neoson