SSM管理LVM卷

作者: admin 分类: Linux 发布时间: 2018-01-30 17:30 浏览:56 次    

环境:Centos 7.4_x64

system-storage-manager-0.4-7.el7.noarch

1.安装ssm

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

2、创建lv卷

命令格式:  ssm  create  –s  lv[大小 ] –n  lv[名称] –fstype [文件系统类型] -p  [卷组名]  [设备]  [挂载点]

例:创建一个名为lv0存储池,卷组名为vg0,大小为500M ,文件系统为xfs,并挂载在/mnt

[root@localhost ~]# ssm create -s 500M -n lv0 --fstype xfs -p vg0 /dev/sdb{1..2} /mnt
 Wiping xfs signature on /dev/vg0/lv0.
 Logical volume "lv0" created.
 meta-data=/dev/vg0/lv0 isize=512 agcount=4, agsize=31488 blks
 = sectsz=512 attr=2, projid32bit=1
 = crc=1 finobt=0, sparse=0
 data = bsize=4096 blocks=125952, imaxpct=25
 = sunit=0 swidth=0 blks
 naming =version 2 bsize=4096 ascii-ci=0 ftype=1
 log =internal log bsize=4096 blocks=855, version=2
 = sectsz=512 sunit=0 blks, lazy-count=1
 realtime =none extsz=4096 blocks=0, rtextents=0

3、ssm管理VG扩容

[root@localhost ~]# ssm add -p vg0 /dev/sdb3 
 Physical volume "/dev/sdb3" successfully created.
 Volume group "vg0" successfully extended

4、ssm管理LV扩容

[root@localhost ~]# ssm resize -s +100M /dev/vg0/lv0
meta-data=/dev/mapper/vg0-lv0 isize=512 agcount=4, agsize=31488 blks
 = sectsz=512 attr=2, projid32bit=1
 = crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=125952, imaxpct=25
 = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=855, version=2
 = sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 125952 to 151552

5、查看磁盘信息

[root@localhost ~]# ssm list dev
-------------------------------------------------------------
Device Free Used Total Pool Mount point
-------------------------------------------------------------
/dev/sda 16.00 GB PARTITIONED
/dev/sda1 300.00 MB /boot 
/dev/sda2 512.00 MB SWAP 
/dev/sda3 10.00 GB / 
/dev/sdb 5.00 GB 
/dev/sdb1 0.00 KB 196.00 MB 200.00 MB vg0 
/dev/sdb2 0.00 KB 296.00 MB 300.00 MB vg0 
/dev/sdb3 396.00 MB 100.00 MB 500.00 MB vg0 
-------------------------------------------------------------

6、查看存储池信息

[root@localhost ~]# ssm list pool
----------------------------------------------------
Pool Type Devices Free Used Total 
----------------------------------------------------
vg0 lvm 3 396.00 MB 592.00 MB 988.00 MB 
----------------------------------------------------

7、查看卷信息

[root@localhost ~]# ssm list vol
 -------------------------------------------------------------------------------
 Volume Pool Volume size FS FS size Free Type Mount point
 -------------------------------------------------------------------------------
 /dev/vg0/lv0 vg0 492.00 MB xfs 488.66 MB 488.52 MB linear /mnt
 /dev/sda1 300.00 MB xfs 296.66 MB 179.30 MB part /boot
 /dev/sda3 10.00 GB xfs 9.99 GB 8.52 GB part /
 -------------------------------------------------------------------------------

 

 

 

 

 

 


温馨提示:如无特殊说明,本站文章均为作者原创,转载时请注明出处及相应链接!

发表评论