Storage management under Fedora made easy: System Storage Manager

One of the innovations of Fedora 18 is the new System Storage Manager as I mentioned yesterday. This tool enables the central administration of storage devices. Are the times of reading manpages finally over for newbies? I had a deeper look at the SSM - and was pleasantly suprised. The System Storage Manager can be installed comfortably using Yum or rather DNF:

1# yum install system-storage-manager
2# dnf install system-storage-manager

The concept of SSM reminds me on diskpart from Windows and the in the HP-UX world good-known vxdisk utility - those tools also allow storage management using simple and self-explanatory commands. But what can SSM do at all?

  • create and check ext3-, ext4, xfs- and btrfs volumes
  • list devices, volumes and LVM/RAID/btrfs pools (list dev/vol/pool)
  • create, expand and delete LVM/RAID/btrfs pools
  • remove and delete volumes, filesystems
  • create snapshots (snapshot)

As you can see, the commands are self-explanatory - the applicable options sound like well-known mkfs/lvm commands. So SSM is very transit-friendly.

Create volumes

Using three short commands 1 LVM volumegroup is created with two logical volumes, from which one is resized afterwards:

 1# ssm list dev
 2------------------------------------------------------------
 3Device        Free      Used      Total  Pool    Mount point
 4------------------------------------------------------------
 5/dev/sda                       20.00 GB          PARTITIONED
 6/dev/sda1                     500.00 MB          /boot
 7/dev/sda2  0.00 KB  19.51 GB   19.51 GB  fedora
 8/dev/sdb                       10.00 GB
 9/dev/sdc                       10.00 GB
10------------------------------------------------------------
11
12# ssm create -s 6G --fstype ext4 /dev/sdb
13  No physical volume label read from /dev/sdb
14  Physical volume "/dev/sdb" successfully created
15  Volume group "lvm_pool" successfully created
16  Logical volume "lvol001" created
17# ssm resize -s 5G lvm_pool/lvol001
18# ssm create -s 2G -n crash_vol --fstype ext4 -p lvm_pool
19
20# ssm list vol
21-----------------------------------------------------------------------------------------------
22Volume                   Pool      Volume size  FS      FS size       Free  Type    Mount point
23-----------------------------------------------------------------------------------------------
24...
25/dev/lvm_pool/lvol001    lvm_pool      5.00 GB  ext4    5.00 GB    4.53 GB  linear
26/dev/lvm_pool/crash_vol  lvm_pool      2.00 GB  ext4    2.00 GB    1.80 GB  linear
27-----------------------------------------------------------------------------------------------
28
29# ssm list pool
30----------------------------------------------------
31Pool      Type  Devices     Free      Used     Total
32----------------------------------------------------
33fedora    lvm   1        0.00 KB  19.51 GB  19.51 GB
34lvm_pool  lvm   1        3.00 GB   7.00 GB  10.00 GB
35----------------------------------------------------

Snapshots

The creation of snapshots is really simple - one command is enough. Using the list command snapshots can be displayed including their size:

 1# ssm snapshot -s 1G -n crash_snap lvm_pool/crash_vol
 2# ssm list snap
 3-----------------------------------------------------------------
 4Snapshot                  Origin     Volume size     Size  Type
 5-----------------------------------------------------------------
 6/dev/lvm_pool/crash_snap  crash_vol      1.00 GB  0.00 KB  linear
 7-----------------------------------------------------------------
 8
 9# dd if=/dev/zero of=/crash/bla.bin bs=1024k count=10
10# ssm list snap
11-------------------------------------------------------------------
12Snapshot                  Origin     Volume size       Size  Type
13-------------------------------------------------------------------
14/dev/lvm_pool/crash_snap  crash_vol      1.00 GB  10.04 MB  linear
15-------------------------------------------------------------------

Snapshots are deleted like volumes:

1# umount /crash
2# ssm remove lvm_pool/crash_snap
3# mount /dev/lvm_pool/crash_vol /crash

Currently there is no possibility to recover LVM snapshots - for this you'll have to use lvconvert instead (like before):

1# lvconvert --merge lvm_pool/crash_snap

Expand and check volumes

Expanding LVM volume groups and logical volumes is simpler using the SSM than applying well-known lvresize/resize2fs commands:

 1# ssm add -p lvm_pool /dev/sdc
 2  No physical volume label read from /dev/sdc
 3  Physical volume "/dev/sdc" successfully created
 4  Volume group "lvm_pool" successfully extended
 5# ssm resize -s 10G lvm_pool/crash_vol
 6# ssm list pool
 7----------------------------------------------------
 8Pool      Type  Devices     Free      Used     Total
 9----------------------------------------------------
10fedora    lvm   1        0.00 KB  19.51 GB  19.51 GB
11lvm_pool  lvm   2        4.99 GB  15.00 GB  19.99 GB
12----------------------------------------------------
13
14# ssm check lvm_pool/crash_vol
15Checking ext4 file system on '/dev/mapper/lvm_pool-crash_vol':
16Device '/dev/mapper/lvm_pool-crash_vol' is mounted on '/crash' Unmount (N/y/q) ? Y
17e2fsck 1.42.5 (29-Jul-2012)
18...
19/dev/mapper/lvm_pool-crash_vol: 12/655360 Dateien (0.0% nicht zusammenhängend), 61231/2621440 Blöcke
20OK

Conclusion

For an administrator SSM is a very interesting tool which is able to handle a lot of features and functions by now. I'm missing some things to call the SSM a perfect tool - including:

  • creation of LVM volume groups without logical volumes
  • recovering LVM snapshots
  • print internally executed LVM/*2fs commands for documentation purposes

I'm really exited in seeing the further development progress of SSM. For the next RHEL release 7.0 the new tool is a bleeding-edge "enhancement candidate".

Translations: