Linux disk partition, format, mount

 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:

  1.  
    fdisk /dev/sdb
  2.  
    Commonly used commands:
  3.  
    n: create a new partition
  4.  
    d: Delete existing partitions
  5.  
    t: Modify partition type
  6.  
    l: see all types of support
  7.  
    p: shows the existing partition information
  8.  
    w: Save and Exit
  9.  
    q: exit without saving
  10.  
    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

  1.  

     The partition effect:

    partprobe  /dev/sdb
     
  2. 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
 

Guess you like

Origin www.cnblogs.com/xiondun/p/12469257.html