LVM2 Logical Volume Manager 详解(六)--LVM物理卷Physical Volume命令实战

1.命令清单,后面我们回来一一实践

root@king:~# lvm help
  Available lvm commands:
  Use 'lvm help <command>' for more information
   
  dumpconfig      Dump active configuration
  formats         List available metadata formats
  help            Display help for commands
  lvchange        Change the attributes of logical volume(s)
  lvconvert       Change logical volume layout
  lvcreate        Create a logical volume
  lvdisplay       Display information about a logical volume
  lvextend        Add space to a logical volume
  lvmchange       With the device mapper, this is obsolete and does nothing.
  lvmdiskscan     List devices that may be used as physical volumes
  lvmsadc         Collect activity data
  lvmsar          Create activity report
  lvreduce        Reduce the size of a logical volume
  lvremove        Remove logical volume(s) from the system
  lvrename        Rename a logical volume
  lvresize        Resize a logical volume
  lvs             Display information about logical volumes
  lvscan          List all logical volumes in all volume groups
  pvchange        Change attributes of physical volume(s)
  pvresize        Resize physical volume(s)
  pvck            Check the consistency of physical volume(s)
  pvcreate        Initialize physical volume(s) for use by LVM
  pvdata          Display the on-disk metadata for physical volume(s)
  pvdisplay       Display various attributes of physical volume(s)
  pvmove          Move extents from one physical volume to another
  pvremove        Remove LVM label(s) from physical volume(s)
  pvs             Display information about physical volumes
  pvscan          List all physical volumes
  segtypes        List available segment types
  vgcfgbackup     Backup volume group configuration(s)
  vgcfgrestore    Restore volume group configuration
  vgchange        Change volume group attributes
  vgck            Check the consistency of volume group(s)
  vgconvert       Change volume group metadata format
  vgcreate        Create a volume group
  vgdisplay       Display volume group information
  vgexport        Unregister volume group(s) from the system
  vgextend        Add physical volumes to a volume group
  vgimport        Register exported volume group with system
  vgmerge         Merge volume groups
  vgmknodes       Create the special files for volume group devices in /dev
  vgreduce        Remove physical volume(s) from a volume group
  vgremove        Remove volume group(s)
  vgrename        Rename a volume group
  vgs             Display information about volume groups
  vgscan          Search for all volume groups
  vgsplit         Move physical volumes into a new or existing volume group
  version         Display software and driver version information

2.配置转存命令

root@king:~# lvm dumpconfig --help
  dumpconfig: Dump active configuration

dumpconfig      [-f|--file filename] 
[ConfigurationVariable...]

root@king:~# lvm dumpconfig -f lvm-config.conf
会在当前目录生成LVM配置信息文件。

3.物理卷Physical Volume管理命令

3.1.创建物理卷Physical Volume

root@king:~# pvcreate --help
  pvcreate: Initialize physical volume(s) for use by LVM

pvcreate 
        [--norestorefile]
        [--restorefile file]
        [-d|--debug]
        [-f[f]|--force [--force]]        #强制执行
        [-h|-?|--help] 
        [--labelsector sector]           #标签所处扇区,默认第二个扇区,扇区1,从0开始。可选0-3
        [-M|--metadatatype 1|2]
        [--pvmetadatacopies #copies]                          #元数据备份数
        [--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]       #元数据预留空间大小
        [--dataalignment Alignment[bBsSkKmMgGtTpPeE]]         #数据对齐段
        [--dataalignmentoffset 
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值