Linux disk partition, format, mount
Zoning:
. A view disk partition table:
fdisk -l
. B check the specified disk partition table:
fdisk -l /dev/sdb
. C partition command:
-
fdisk /dev/sdb
-
Commonly used commands:
-
n: create a new partition
-
d: Delete existing partitions
-
t: Modify partition type
-
l: see all types of support
-
p: shows the existing partition information
-
w: Save and Exit
-
q: exit without saving
-
m: View help information
. D create a primary partition:
. E create an extended partition:
n➡️e
. F created (on the basis of the extended partition) logical partitions:
n➡️l
-
The partition effect:
partprobe /dev/sdb
- Format:
. A command:mkfs.ext4 /dev/sdb1
Mount:
. A mount used to create a folder:
mkdir /var/lib/kubelet
. B manually mount:
mount /dev/sdb1 /var/lib/kubelet
. C boot automatically mount:
echo "/dev/sdb /var/lib/kubelet/ ext4 defaults 0 0" >> /etc/fstab