zoukankan      html  css  js  c++  java
  • parted分区以及格式化方法

    1、查看磁盘分区

    [root@localhost tmp]# fdisk -l

    Disk /dev/nvme1n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme0n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme4n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme7n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme3n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme5n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme6n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme2n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

    2、分区

    [root@localhost tmp]# parted /dev/nvme1n1

    GNU Parted 3.1 Using /dev/nvme1n1

    Welcome to GNU Parted! Type 'help' to view a list of commands.

    (parted) mktable                                                         

    New disk label type? gpt                                                 

    (parted) mkpart                                                          

    Partition name?  []?                                                     

    File system type?  [ext2]? ext4                                          

    Start? 0                                                                 

    End? 4000G                                                               

    Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel? Ignore                                                    

    (parted) print                                                           

    Model: Unknown (unknown) Disk /dev/nvme1n1: 4001GB

    Sector size (logical/physical): 512B/512B

    Partition Table: gpt

    Disk Flags:

    Number  Start   End     Size    File system  Name  Flags  

    1      17.4kB  4000GB  4000GB

    (parted) quit                                                            
    Information: You may need to update /etc/fstab.

    [root@localhost tmp]# fdisk -l

    WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

    Disk /dev/nvme1n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk label type: gpt

    #         Start          End    Size  Type            Name  

    1           34   7812500000    3.7T  Microsoft basic

    3. 格式化

    [root@localhost tmp]# mkfs.ext4 /dev/nvme1n1p1

    mke2fs 1.42.9 (28-Dec-2013)

    Discarding device blocks: done                           

    Filesystem label=

    OS type: Linux

    Block size=4096 (log=2)

    Fragment size=4096 (log=2)

    Stride=0 blocks,

    Stripe width=0 blocks

    244146176 inodes, 976562495 blocks

    48828124 blocks (5.00%) reserved for the super user

    First data block=0

    Maximum filesystem blocks=3124756480

    29803 block groups

    32768 blocks per group, 32768 fragments per group

    8192 inodes per group

    Superblock backups stored on blocks:  

                32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,  

                4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,  

                102400000, 214990848, 512000000, 550731776, 644972544

    Allocating group tables: done                           

    Writing inode tables: done                           

    Creating journal (32768 blocks): done

    Writing superblocks and filesystem accounting information: done   

    4、查看分区

       

    [root@localhost tmp]# fdisk -l

    WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

    Disk /dev/nvme1n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk label type: gpt

    #         Start          End    Size  Type            Name  

    1           34   7812500000    3.7T  Microsoft basic

    Disk /dev/nvme0n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme4n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme7n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme3n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme5n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme6n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/nvme2n1: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    [root@localhost tmp]# parted /dev/nvme1n1 print

    Model: Unknown (unknown)

    Disk /dev/nvme1n1: 4001GB Sector size (logical/physical): 512B/512B

    Partition Table: gpt

    Disk Flags:

    Number  Start   End     Size    File system  Name  Flags  

    1      17.4kB  4000GB  4000GB  ext4

    卓尔不凡Tony
  • 相关阅读:
    剑桥雅思写作高分范文ESSAY59
    剑桥雅思写作高分范文ESSAY58
    剑桥雅思写作高分范文ESSAY57
    剑桥雅思写作高分范文ESSAY55
    剑桥雅思写作高分范文ESSAY54
    剑桥雅思写作高分范文ESSAY53
    剑桥雅思写作高分范文ESSAY52
    剑桥雅思写作高分范文ESSAY51
    博客园博客添加鼠标特效
    学会配置nginx
  • 原文地址:https://www.cnblogs.com/dyytsoft/p/10241050.html
Copyright © 2011-2022 走看看