利用SSM工具扩展LVM

SSM:检查关于可用硬驱和LVM卷的信息。显示关于现有磁盘存储设备、存储池、LVM卷和存储快照的信息。

安装SSM

[root@cnbugs ~]# yum -y install system-storage-manager

一、查看磁盘信息

列出设备信息

存储池信息

二、实战

创建一个名为mail 的LVM存储池,并在其上创建一个名为mail-lv,初始大小为1G的lvm卷,格式化为xfs文件系统,并将其挂载/mail-lv目录下。此存储池中的空间后期要可以动态扩容。

将sdb上所有卷组信息删除:

[root@cnbugs ~]# vgremove vg02
[root@cnbugs ~]# pvremove /dev/sdb{1,2,3,4}

创建目录

[root@xuegod72 ~]# mkdir /mail-lv

命令如下:

ssm  create  -s  lv大小  -n  lv名称  --fstype  lv文件系统类型 -p 卷组名  设备 挂载点

自动把设备变成pv,创建vg , lv ,格式化文件系统, 自动挂载

[root@cnbugs ~]#  ssm create -s 1G -n mail-lv --fstype xfs -p mail /dev/sdb[1-4] /mail-lv
  Physical volume "/dev/sdb1" successfully created.
  Physical volume "/dev/sdb2" successfully created.
  Physical volume "/dev/sdb3" successfully created.
  Physical volume "/dev/sdb4" successfully created.
  Volume group "mail" successfully created
WARNING: ext4 signature detected on /dev/mail/mail-lv at offset 1080. Wipe it? [y/n]: y
  Wiping ext4 signature on /dev/mail/mail-lv.
  Logical volume "mail-lv" created.
meta-data=/dev/mail/mail-lv      isize=512    agcount=4, agsize=65536 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@cnbugs ~]# df -h  /mail-lv/
文件系统                   容量  已用  可用 已用% 挂载点
/dev/mapper/mail-mail--lv 1014M   33M  982M    4% /mail-lv

发表评论

后才能评论