glusterfs: Decode heketi configuration or topology file entries from heketi pod.

Let’s start hacking!! Most of the time, one needs to know the heketi configuration and topology he is running with. I do this at times and today thought of sharing with a wider audience, there are more hacking that can be done once you got a handle of the things, but I put a disclaimer …

Read more

[GlusterFS Dynamic Provisioner] Online Resizing of GlusterFS PVs in kubernetes v>= 1.8 !!!

While the kubernetes storage-sig keeps adding new features in each and every release, we also listen to our user feedback to improve the existing storage interfaces in solving the existing limitations. Previously, the admin had to do proper capacity planning in order to use persistent Volumes as the microservices or the application pods wanted to …

Read more

“Retain” ( PV claim policy) GlusterFS Dynamically Provisioned Persistent Volumes in Kubernetes >=1.8

Since introduction, the dynamic provisioning feature of Kube storage defaulted with reclaim policy as Delete. It was not specific to glusterfs PVs rather common for all PVs which are dynamically provisioned in kube storage. However from kube >= v1.8, we could specify retain policy in storage class! A much-needed functionality in SC for different use …

Read more

Kubernetes 101 for Bangalore Kubernauts .

We keep conducting Kubernetes and Openshift meetups as part of https://www.meetup.com/kubernetes-openshift-India-Meetup/ .

We see great momentum in this meetup group and lots of enthusiam around this. The last events were well received and lots of requests came in to have a hands on training on Kubernetes and Openshift. If you are still to catch up with these emerging technologies, dont delay, just join us in next event planned on 20-May-2017.

More details about this event can be found @ https://www.meetup.com/kubernetes-openshift-India-Meetup/events/239381714/

This will be a beginner oriented workshop. As a pre requisite, you need to install linux in your laptop, thats it.

We are also looking for volunteers to help and venue to conduct this event.

Please RSVP and let us know if you would like to help us on organizing this event.

[2020 updated] ISCSI multipath support in Kubernetes (v1.6) or Openshift.

Multipathing is an important feature in most of the storage setups, so for ISCSI based storage systems.
In most of the ISCSI based storages, multiple paths can be defined as the same IQN shared with more than one portal IPs.
Even if one of the network interface/portal is down, the share/target can be accessed via other active interfaces/portals.
This is indeed a good feature considering I/O from ISCSI initiator to Target and high availability of data path.
However the ISCSI plugin in Kubernetes was not capable of making use of multipath feature and it
was always just one path configured by default in Kubernetes. If that path goes down, the target can not be accessed.

Recently I added multipath support to ISCSI kubernetes plugin with this Pull Request.

With this functionality, a Kubernetes user/admin can specify the other Target Portal IPs in a new field called portals in ISCSI volume. That’s the only change required from admin side!!. If there are multiple portals, admin can mention these additional target portals in the portals field as shown below.

The new structure will look like this.

iscsi: targetPortal: 10.0.2.15:3260 + portals: [‘10.0.2.16:3260’, ‘10.0.2.17:3260’] iqn: iqn.2001-04.com.example:storage.kube.sys1.xyz lun: 0 fsType: ext4 readOnly: true

If you are directly using the above volume definition in POD spec, your pod spec may look like this.

apiVersion: v1 kind: Pod metadata: name: iscsipd spec: containers: – name: iscsipd-rw image: kubernetes/pause volumeMounts: – mountPath: “/mnt/iscsipd” name: iscsipd-rw volumes: – name: iscsipd-rw iscsi: targetPortal: 10.0.2.15:3260 portals: [‘10.0.2.16:3260’, ‘10.0.2.17:3260’, ‘10.0.2.18:3260’] iqn: iqn.2016-04.test.com:storage.target00 lun: 0 fsType: ext4 readOnly: true

Once the pod is up and running, you could check and verify below outputs from the Kubernetes Host where the pod is running:

# multipath -ll mpatha (360014059bafbe58ba644b2889c34903f) dm-2 LIO-ORG ,disk01 size=20G features=’0′ hwhandler=’0′ wp=rw |-+- policy=’service-time 0′ prio=1 status=active | – 44:0:0:0 sdb 8:16 active ready running -+- policy=’service-time 0′ prio=1 status=enabled `- 42:0:0:0 sdc 8:32 active ready running -+- policy=’service-time 0′ prio=1 status=enabled `- 46:0:0:0 sdd 8:48 active ready running -+- policy=’service-time 0′ prio=1 status=enabled `- 48:0:0:0 sde 8:64 active ready running

ISCSI session looks like below:

# iscsiadm -m session tcp: [10] 10.0.2.15:3260,1 iqn.2016-04.test.com:storage.target00 (non-flash) tcp: [12] 10.0.2.16:3260,1 iqn.2016-04.test.com:storage.target00 (non-flash) tcp: [14] 10.0.2.17:3260,1 iqn.2016-04.test.com:storage.target00 (non-flash) tcp: [16] 10.0.2.18:3260,1 iqn.2016-04.test.com:storage.target00 (non-flash)

The device paths:

# ll /dev/disk/by-path/ lrwxrwxrwx. 1 root root 9 Feb 16 15:58 ip-10.0.2.15:3260-iscsi-iqn.2016-04.test.com:storage.target00-lun-0 -> ../../sdb lrwxrwxrwx. 1 root root 9 Feb 16 15:41 ip-10.0.2.16:3260-iscsi-iqn.2016-04.test.com:storage.target00-lun-0 -> ../../sdc lrwxrwxrwx. 1 root root 9 Feb 16 15:58 ip-10.0.2.17:3260-iscsi-iqn.2016-04.test.com:storage.target00-lun-0 -> ../../sdd lrwxrwxrwx. 1 root root 9 Feb 16 15:41 ip-10.0.2.18:3260-iscsi-iqn.2016-04.test.com:storage.target00-lun-0 -> ../../sde

I believe, this is a nice feature added to Kubernetes ISCSI storage. Please let me know your comments/feedback/suggestions on this.

Support for “Volume Types” option in Kubernetes GlusterFS dynamic provisioner.

Till now, there was no option to specify various volume types and specifications of dynamically provisioned volumes in Kubernetes or Openshift. The main reason for that being we always recommend to have a ‘replica 3′ volume whenever it provision.

However there were requests from users of GlusterFS dynamic provisioner to have this functionality for various use cases, for example, someone want to setup a quick demo by having a replica 1 or replica 2 volume in a small cluster. Sometimes they want to create an EC volume via storage class…etc.

This functionality has been added some time back to Kubernetes upstream and provide the choice to select volume type in kubernetes/Openshift via Storage Class parameter.

This has been added in below format to the gluster plugins’ storage class.

volumetype : The volume type and it’s parameters can be configured with this optional value. If the volume type is not mentioned, it’s up to the provisioner to decide the volume type.

For example: ‘Replica volume’: volumetype: replicate:3 where ‘3’ is replica count.

‘Disperse/EC volume’: volumetype: disperse:4:2 where ‘4’ is data and ‘2’ is the redundancy count.

‘Distribute volume’: volumetype: none

Based on above mention, the volumes will be created in the trusted storage pool .

The storage class file will look like this:

apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: name: fast provisioner: kubernetes.io/glusterfs parameters: resturl: “http://127.0.0.1:8081” restuser: “admin” secretNamespace: “default” secretName: “heketi-secret” volumetype: “replicate:2”

Please let me know if you have any comments/suggestions/feedback about this functionality or if you would like to see any other enhancements to Gluster Dynamic Provisioner in Kubernetes/Openshift.

Use iscsiadm session command to figure out details about a gluster block share.

Here is an easy way to list details about an ISCSI share or LUN. You have all the required details about the share below. You could also map this information in an iscsi client system to figure out the device map or device file as shown below.

[root@localhost glusterblock]# iscsiadm -m session -P 3 iSCSI Transport Class version 2.0-870 version 6.2.0.873-33 Target: iqn.2016-12.org.gluster-block:5b5b9581-bc66-4d51-8b4e-2befcd30fee7 (non-flash) Current Portal: 10.67.116.64:3260,1 Persistent Portal: 10.67.116.64:3260,1 ********** Interface: ********** Iface Name: default Iface Transport: tcp Iface Initiatorname: iqn.1994-05.com.redhat:8efc1ab116fc Iface IPaddress: 10.67.116.64 Iface HWaddress: Iface Netdev: SID: 41 iSCSI Connection State: LOGGED IN iSCSI Session State: LOGGED_IN Internal iscsid Session State: NO CHANGE ********* Timeouts: ********* Recovery Timeout: 120 Target Reset Timeout: 30 LUN Reset Timeout: 30 Abort Timeout: 15 ***** CHAP: ***** username: 5b5b9581-bc66-4d51-8b4e-2befcd30fee7 password: ******** username_in: password_in: ******** ************************ Negotiated iSCSI params: ************************ HeaderDigest: None DataDigest: None MaxRecvDataSegmentLength: 262144 MaxXmitDataSegmentLength: 262144 FirstBurstLength: 65536 MaxBurstLength: 262144 ImmediateData: Yes InitialR2T: Yes MaxOutstandingR2T: 1 ************************ Attached SCSI devices: ************************ Host Number: 3 State: running scsi3 Channel 00 Id 0 Lun: 0 Attached scsi disk sdb State: running [root@localhost glusterblock]# ll /dev/sdb brw-rw—- 1 root disk 8, 16 May 20 14:24 /dev/sdb [root@localhost glusterblock]# ll /dev/disk/by-path/ip-10.67.116.64:3260-iscsi-iqn.2016-12.org.gluster-block:5b5b9581-bc66-4d51-8b4e-2befcd30fee7-lun-0 lrwxrwxrwx 1 root root 9 May 20 14:24 /dev/disk/by-path/ip-10.67.116.64:3260-iscsi-iqn.2016-12.org.gluster-block:5b5b9581-bc66-4d51-8b4e-2befcd30fee7-lun-0 -> ../../sdb [root@localhost glusterblock]# iscsiadm -m session tcp: [41] 10.67.116.64:3260,1 iqn.2016-12.org.gluster-block:5b5b9581-bc66-4d51-8b4e-2befcd30fee7 (non-flash) [root@localhost glusterblock]#

GlusterFS Containers with Docker, Kubernetes and Openshift

Thought of sharing consolidated news on GlusterFS containers efforts here. Below is the snip of the email which I sent a few days back to gluster-users and gluster-devel mailing list. I hope it gives a summary, if not please let me know.


I would like to provide you a status update on the developments with GlusterFS containers and its presence in projects like Docker, Kubernetes, and Openshift.

We have containerized GlusterFS with base image of CentOS and Fedora and its available at Docker Hub[1] to consume.

The Dockerfile of the image can be found at github[2].

You can pull the image with

# docker pull gluster/gluster-centos # docker pull gluster/gluster-fedora

The exact steps to be followed to run GlusterFS container is mentioned here[3].

We can deploy GlusterFS pods in Kubernetes Environment and an example blog about this setup can be found here [4].

There is GlusterFS volume plugin available in Kubernetes and openshift v3 which provides Persistent Volume
to the containers in the Environment, How to use GlusterFS containers for Persistent Volume and Persistent Volume Claim in Openshift has been recorded at [5].

[1]https://hub.docker.com/r/gluster/
[2]https://github.com/gluster/docker/
[3]http://tinyurl.com/jupgene
[4]http://tinyurl.com/zsrz36y
[5]http://tinyurl.com/hne8g7o

Please let us know if you have any comments/suggestions/feedback.

Dockit: Gluster running in containers .. installed by dockit.

Widely adopted docker and GlusterFS has to be integrated. “GlusterFS is an open source, distributed filesystem capable of scaling to several petabytes and handling
thousands of clients. GlusterFS has functionalities like replication,
distribution, snapshot..etc by default. More details can be fetched from gluster.org.

WHAT IS DOCKIT:
Dockit is an application which is developed for:
Easy deployment of Containers from any docker image.
Easy deployment of GlusterFS containers with any version of GlusterFS binary
& auto configuration of GlusterFS Volumes.

If you would like to deploy GlusterFS in containers with specific version of gluster binary. Then it
is as easy as running below command in your system:

[root@HOST]dockit -pr humble -i f20glusterfssource -s -n 2 -g -t latest -gv -gi 3.5 -c configfile.

Let me explain above options, but you can see, ‘dockit –help’ already has information about
these options.
Pull an image called “f20glusterfssource”
with tag latest from docker repo‘humble’ and start 2
containers . Also work in gluster mode ( g)
and install 3.5 version of gluster binary ( –gi 3.5 )
inside these containers and auto configure gluster Volume (–gv) by fetching details from
configuration file called configfile .

Did you install docker packages in your system ?
Did you start docker daemon ?
Did you download the image from docker repository?
Did you create brick directories in your filesystem?
Did you run containers with exported bricks from host?
Did you install GlusterFS on these containers from gluster source ?
Did you configure a gluster Volume across these container nodes ?

Everything was taken care by “Dockit” !!
Apart from above,
Dockit can be used to build containers from Dockerfile and spawn containers using the
built image and it is also capable of pulling any image from docker repos. You can operate in
gluster mode on these containers as well.
Once dockit exported the volume , this volume can be used for virtual image store in any of the
virtualization technologies example ‘ovirt’ or any IaSS offerings example openstack . It can act
as an image store for cloud.
Active development going on to leverage its capabilities to multi host deployment. The docker
orchestration technologies will be soon integrated with dockit to make this possible.
More information on dockit can be fetched from:
https://github.com/humblec/dockit/.
https://www.humblec.com/.