View on GitHub

LibStorageMgmt

Installation Guide

Download this project as a .zip file Download this project as a tar.gz file

1. Install

There are a few different ways to install libStorageMgmt. Select the method that works best for your setup.

1.1. RPM Package of Released Version

For RHEL/Centos 6 (in EPEL), RHEL/Centos 7 and Fedora you can install LSM via these commands:

sudo yum install libstoragemgmt
# Install plugins.
sudo yum install libstoragemgmt-\*-plugin
sudo systemctl start libstoragemgmt.service

The library is packaged into separated RPMs:

For libstoragemgmt-smis-plugin on RHEL7, the optional repo is required for pywbem package:

# RHEL 7 Server
sudo subscription-manager repos --enable \
    rhel-7-server-optional-rpms
# RHEL 7 Workstation
sudo subscription-manager repos --enable \
    rhel-7-workstation-optional-rpms

For OpenSuSE 13.1/13.2/Tumbleweed, the packages have been renamed to:

1.2. Compile from Source

  1. Download source or clone from git repo.
# Source tarball from
#
# https://github.com/libstorage/libstoragemgmt/releases/latest
#
# Or Use git:
git clone https://github.com/libstorage/libstoragemgmt.git
  1. Install required packages.
# RHEL/Centos and Fedora
sudo yum install `cat rh_rpm_dependency`

# SuSE and OpenSuSE
sudo zypper in `cat suse_rpm_dependency`

# Debian/Ubuntu

sudo apt-get install `cat deb_dependency`
  1. Compile and install:
# autogen.sh required when using git source tree
./autogen.sh
./configure --prefix=/usr

# If you define other prefix, '--plugindir <you_prefix>' of lsmd
# should be use.
# Extra options:
#       --without-megaraid      # skip megaraid plugin.
#       --without-hpsa          # skip hpsa plugin.

make -j
sudo make install

1.3. Weekly Snapshot Build

yum search libstoragemgmt
sudo yum install libstoragemgmt-<desired package>
zypper se libstoragemgmt
sudo zypper in libstoragemgmt-<desired package>

2. Prepare and Start daemon

# Create libstoragemgmt user and group
sudo groupadd -r libstoragemgmt
sudo useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
    -c "daemon account for libstoragemgmt" libstoragemgmt

# Create IPC socket folders
sudo mkdir -p /var/run/lsm/ipc
sudo chmod 0755 /var/run/lsm
sudo chmod 0755 /var/run/lsm/ipc
sudo chown libstoragemgmt:libstoragemgmt /var/run/lsm
sudo chown libstoragemgmt:libstoragemgmt /var/run/lsm/ipc

# OS without systemd, like RHEL 6, Debian 7,
# or Ubuntu 12.04/14.04 LTS
sudo /usr/bin/lsmd -d -v

# OS with Systemd
sudo systemctl start libstoragemgmt.service

3. Test installation

lsmcli -u 'sim://' list --type systems