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:

# yum install system-storage-manager
# 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:

# ssm list dev
------------------------------------------------------------
Device        Free      Used      Total  Pool    Mount point
------------------------------------------------------------
/dev/sda                       20.00 GB          PARTITIONED
/dev/sda1                     500.00 MB          /boot
/dev/sda2  0.00 KB  19.51 GB   19.51 GB  fedora
/dev/sdb                       10.00 GB
/dev/sdc                       10.00 GB
------------------------------------------------------------

# ssm create -s 6G --fstype ext4 /dev/sdb
  No physical volume label read from /dev/sdb
  Physical volume "/dev/sdb" successfully created
  Volume group "lvm_pool" successfully created
  Logical volume "lvol001" created
# ssm resize -s 5G lvm_pool/lvol001
# ssm create -s 2G -n crash_vol --fstype ext4 -p lvm_pool

# ssm list vol
-----------------------------------------------------------------------------------------------
Volume                   Pool      Volume size  FS      FS size       Free  Type    Mount point
-----------------------------------------------------------------------------------------------
...
/dev/lvm_pool/lvol001    lvm_pool      5.00 GB  ext4    5.00 GB    4.53 GB  linear
/dev/lvm_pool/crash_vol  lvm_pool      2.00 GB  ext4    2.00 GB    1.80 GB  linear
-----------------------------------------------------------------------------------------------

# ssm list pool
----------------------------------------------------
Pool      Type  Devices     Free      Used     Total
----------------------------------------------------
fedora    lvm   1        0.00 KB  19.51 GB  19.51 GB
lvm_pool  lvm   1        3.00 GB   7.00 GB  10.00 GB
----------------------------------------------------

Snapshots

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

# ssm snapshot -s 1G -n crash_snap lvm_pool/crash_vol
# ssm list snap
-----------------------------------------------------------------
Snapshot                  Origin     Volume size     Size  Type
-----------------------------------------------------------------
/dev/lvm_pool/crash_snap  crash_vol      1.00 GB  0.00 KB  linear
-----------------------------------------------------------------

# dd if=/dev/zero of=/crash/bla.bin bs=1024k count=10
# ssm list snap
-------------------------------------------------------------------
Snapshot                  Origin     Volume size       Size  Type
-------------------------------------------------------------------
/dev/lvm_pool/crash_snap  crash_vol      1.00 GB  10.04 MB  linear
-------------------------------------------------------------------

Snapshots are deleted like volumes:

# umount /crash
# ssm remove lvm_pool/crash_snap
# 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):

# 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:

# ssm add -p lvm_pool /dev/sdc
  No physical volume label read from /dev/sdc
  Physical volume "/dev/sdc" successfully created
  Volume group "lvm_pool" successfully extended
# ssm resize -s 10G lvm_pool/crash_vol
# ssm list pool
----------------------------------------------------
Pool      Type  Devices     Free      Used     Total
----------------------------------------------------
fedora    lvm   1        0.00 KB  19.51 GB  19.51 GB
lvm_pool  lvm   2        4.99 GB  15.00 GB  19.99 GB
----------------------------------------------------

# ssm check lvm_pool/crash_vol
Checking ext4 file system on '/dev/mapper/lvm_pool-crash_vol':
Device '/dev/mapper/lvm_pool-crash_vol' is mounted on '/crash' Unmount (N/y/q) ? Y
e2fsck 1.42.5 (29-Jul-2012)
...
/dev/mapper/lvm_pool-crash_vol: 12/655360 Dateien (0.0% nicht zusammenhängend), 61231/2621440 Blöcke
OK

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“.

Sharing is caring

Leave a Reply