一、简介
用于检查关于可用硬驱和LVM卷的信息。显示关于现有磁盘存储设备、存储池、LVM卷和存储快照的信息。
二、命令详解
安装
yum -y install system-storage-manager
三、常用实例演示
3.1 查看
# 显示物理设备、存储池、存储池中的LVM卷的详细信息
ssm list
# 显示存储设备
ssm list dev
# 显示vg卷组
ssm list pool
# 显示lvm卷组
ssm list vol
3.2 添加磁盘到VG中扩容
[root@localhost ~]# ssm add -p vg00 /dev/sdd
Physical volume "/dev/sdd" successfully created
Volume group "vg00" successfully extended
3.3 LVM卷扩容
[root@localhost ~]# ssm resize -s +10G /dev/vg00/lv00
fsck,来自 util-linux 2.23.2
/dev/mapper/vg00-lv00: 11/65536 files (0.0% non-contiguous), 4763/262144 blocks
Extending logical volume lv00 to 11.00 GiB
Logical volume lv00 successfully resized
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/mapper/vg00-lv00 to 2883584 (4k) blocks.
The filesystem on /dev/mapper/vg00-lv00 is now 2883584 blocks long.
3.4 创建新的VG
[root@localhost ~]# mkdir /soft
[root@localhost ~]# ssm create -s 1G -n soft --fstype xfs -p mysoft /dev/sde /soft
//create创建、-s 1G指定大小、-n soft文件名称、--fstype xfs文件系统、-p mysoft指定VG名称、/dev/sde /soft指定那块磁盘挂载哪个目录上
Physical volume "/dev/sde" successfully created
Volume group "mysoft" successfully created
Logical volume "soft" created
meta-data=/dev/mysoft/soft isize=256 agcount=4, agsize=65536 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0
data = bsize=4096 blocks=262144, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
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
3.5 删除LVM卷
[root@localhost ~]# ssm remove /dev/mysoft/soft
Device '/dev/mysoft/soft' is mounted on '/soft' Unmount (N/y/q) ? Y
Do you really want to remove active logical volume snap20160531T120543? [y/n]: y
Logical volume "snap20160531T120543" successfully removed
Do you really want to remove active logical volume soft? [y/n]: y
Logical volume "soft" successfully removed
3.6 删除VG
[root@localhost ~]# ssm remove mysoft
Volume group "mysoft" successfully removed