• 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
  • 相关阅读:
    Python爬虫重写。
    python threading
    问题8:手机端实现点击按钮时更换颜色(解决IOS不显示背景)
    问题7:JavaScript 常用正则示例
    常见问题6:控制台报错整理——报错
    常见问题5:图片与文字垂直居中
    bootstrap学习总结
    常见问题4:文本不能选择 效果
    常见问题3:自适应大小高度与宽度
    javascript——10章 DOM
  • 原文地址:https://www.cnblogs.com/dyytsoft/p/10241050.html
Copyright © 2020-2023  润新知