Linux record - partition (df/fdisk/mount/umount)

1. View the disk mount (df -TH)

 

2. Unmount umount /dev/vdb1

 

3. Kill the user process (fuser -m -v -i -k /dev/vdb1)

 

4. Unmount umount /dev/vdb1 again, and view the mount information df -TH

 

5. Delete the partition (fdisk /dev/vdb md 1 dw)

 

6. View the partition (fdisk -l, no Start-End disk partition means available)

 

7. Add a partition (fdisk /dev/vdb np press enter w)

 

8. View the newly created partition (fdisk -l)

 

8. Format the partition: mkfs.ext4 /dev/vdb1

9. Create a new directory mkdir /data and mount the partition (mount /dev/vdb1 /data)

 

10. Permanently write to disk: write partition information to /etc/fstab: echo '/dev/vdb1 /data ext4 defaults 0 0' >> /etc/fstab  

Guess you like

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