Linux磁盘分区和逻辑卷详解(6)

命令:
  align-check TYPE N                        check partition N for TYPE(min|opt)
        alignment
  help [COMMAND]                          print general help, or help on
        COMMAND
  mklabel,mktable LABEL-TYPE              create a new disklabel (partition
        table)
  mkpart PART-TYPE [FS-TYPE] START END    make a partition
  name NUMBER NAME                        name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]    display the partition table,
        available devices, free space, all found partitions, or a particular
        partition
  quit                                    exit program
  rescue START END                        rescue a lost partition near START
        and END
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  disk_set FLAG STATE                      change the FLAG on selected device
  disk_toggle [FLAG]                      toggle the state of FLAG on selected
        device
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                  toggle the state of FLAG on partition
        NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and
        copyright information of GNU Parted

Report bugs to bug-parted@gnu.org

从帮助信息中可看出,使用 parted -l 命令可查看分区表信息:

[root@localnat201 ~]# parted -l
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start  End    Size    Type    File system  标志
 1      1049kB  1075MB  1074MB  primary  xfs          启动
 2      1075MB  32.2GB  31.1GB  primary              lvm


错误: /dev/sdb: unrecognised disk label
Model: VMware, VMware Virtual S (scsi)                                   
Disk /dev/sdb: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/cl-swap: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Fla  gs:

Number  Start  End    Size    File system    标志
 1      0.00B  2147MB  2147MB  linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/cl-root: 29.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End    Size    File system  标志
 1      0.00B  29.0GB  29.0GB  xfs

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/12795.html