IBM Spectrum Scale with Standalone Docker

One might want to try running some containerized application with persistent volume using standalone docker host. Persistent storage can be carved from IBM Spectrum Scale. Following are the step to use storage from IBM Spectrum Scale for Container in case of standalone docker host provided docker host is having Spectrum Scale client installed and Filesystem is mounted.

    1. Create Fileset on IBM Spectrum Scale
      [root@dgnode4 ~]# mmcrfileset gpfs0 fileset1
      Fileset fileset1 created with id 1 root inode 24932.
      
      [root@dgnode4 ~]# mmlsfileset gpfs0
      Filesets in file system 'gpfs0':
      Name Status Path
      root Linked /ibm/gpfs0
      fileset1 Unlinked --
    2. Link Fileset

      [root@dgnode4 ~]# mmlinkfileset gpfs0 fileset1 -J /ibm/gpfs0/fileset1
      Fileset fileset1 linked at /ibm/gpfs0/fileset1
    3. Run container with fileset as a persistent storage
      [root@dgnode4 ~]# docker run -v /ibm/gpfs0/fileset1:/gpfs --rm -it alpine /bin/sh
      Unable to find image 'alpine:latest' locally
      latest: Pulling from library/alpine
      Digest: sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f
      Status: Downloaded newer image for alpine:latest
      / #
    4. Create file inside the /gpfs inside container and confirm same is available in fileset
      #Inside container
      / # cd /gpfs/
      /gpfs # touch file_from_container
      #On host
      [root@dgnode4 ~]# ls /ibm/gpfs0/fileset1
      file_from_container

“These are my personal views and do not necessarily reflect that of my employer”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s