Bug 1132058 - [SNAPSHOT]: If the snapshoted brick has xfs options set as part of its creation, they are not automount upon reboot
Summary: [SNAPSHOT]: If the snapshoted brick has xfs options set as part of its creati...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: RHGS 3.0.0
Assignee: Vijaikumar Mallikarjuna
QA Contact: Rahul Hinduja
URL:
Whiteboard: SNAPSHOT
Depends On:
Blocks: 1124583 1132451 1145090
TreeView+ depends on / blocked
 
Reported: 2014-08-20 14:51 UTC by Rahul Hinduja
Modified: 2016-09-17 12:53 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.6.0.28-1
Doc Type: Bug Fix
Doc Text:
If the brick mount options contains '=' then anything after '=' was omitted. For example mount option 'rw,noatime,allocsize=1MiB,noattr2' is parsed as 'rw,noatime,allocsize'. This is now fixed
Clone Of:
: 1132451 (view as bug list)
Environment:
Last Closed: 2014-09-22 19:45:36 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1278 0 normal SHIPPED_LIVE Red Hat Storage Server 3.0 bug fix and enhancement update 2014-09-22 23:26:55 UTC

Description Rahul Hinduja 2014-08-20 14:51:29 UTC
Description of problem:
=======================

If original bricks are mounted with some xfs options and snapshot is taken than the snapshot bricks inherit its parent brick properties. But when a node is rebooted, the snapshot bricks are not automount to the system making it unusable.

For example:
=============

Original volume brick:

[root@rhs-arch-srv2 ~]# mount | grep brick2
/dev/mapper/RHS_vg2-RHS_lv2 on /rhs/brick2 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc)
[root@rhs-arch-srv2 ~]# 

Snapshot brick:

[root@rhs-arch-srv2 ~]# mount | grep /var/run
/dev/mapper/RHS_vg2-8e87d5ac707343c4b42ea779befc53b2_0 on /var/run/gluster/snaps/8e87d5ac707343c4b42ea779befc53b2/brick2 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc,nouuid)

Reboot the node:
================

[root@rhs-arch-srv2 ~]# reboot

Broadcast message from root.eng.blr.redhat.com
	(/dev/pts/0) at 14:33 ...

The system is going down for reboot NOW!
[root@rhs-arch-srv2 ~]# Connection to rhs-arch-srv2.lab.eng.blr.redhat.com closed by remote host.
Connection to rhs-arch-srv2.lab.eng.blr.redhat.com closed.
[rhinduja@rhinduja ~]$

Once the node is up check for snapshoted brick:
===============================================

[root@rhs-arch-srv2 ~]# mount | grep /var/run
[root@rhs-arch-srv2 ~]# 

LV still exists:
=================

[root@rhs-arch-srv2 ~]# lvs | grep 8e87d5ac707343c4b42e
  8e87d5ac707343c4b42ea779befc53b2_0 RHS_vg2        Vwi-a-tz--  1.90t RHS_pool2 RHS_lv2   0.05                          
[root@rhs-arch-srv2 ~]#

Version-Release number of selected component (if applicable):
==============================================================

glusterfs-3.6.0.27-1.el6rhs.x86_64

How reproducible:
=================

always

Steps to Reproduce:
===================
1. Create thin LV's and mount them with following options: rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc
2. Create the volume with above mentioned brick
3. Create a snapshot of the volume
4. Check the snapshoted brick attributes, it should inherit the parent brick attributes + nouuid
5. Reboot the machine

Actual results:
===============

Snapshoted bricks are not remounted upon reboot


Expected results:
=================

Once the node comes back the snapshoted bricks should also remount. It does remount when original bricks are mounted with default options and their snapshot also inherits default options.

Comment 3 Vijaikumar Mallikarjuna 2014-08-21 11:24:58 UTC
We are persisting the mount options in the brickinfo file as below:
root@rh1:~/workspace/git/glusterfs # cat /var/lib/glusterd/snaps/snap1/6d6c402060d24601901d1fdd8312a7e4/bricks/rh1\:-var-run-gluster-snaps-6d6c402060d24601901d1fdd8312a7e4-brick1-dir  | grep 'mnt-opts'

mnt-opts=rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc



When glusterd parsing this file it reads mount options as below which is not a valid as allocsize requires a value:

mnt-opts=rw,noatime,allocsize


From the next '=' in the line everything is ignored.

Comment 4 Vijaikumar Mallikarjuna 2014-08-21 11:46:33 UTC
Patch posted upstream

Comment 5 Vijaikumar Mallikarjuna 2014-08-21 12:18:05 UTC
Patch submitted: https://code.engineering.redhat.com/gerrit/#/c/31226/

Comment 6 Rahul Hinduja 2014-09-08 08:46:36 UTC
Verified with the build: glusterfs-3.6.0.28-1.el6rhs.x86_64

Before reboot:
==============

[root@inception ~]# cat before_reboot*
/dev/mapper/RHS_vg10-RHS_lv10 on /rhs/brick10 type xfs (rw,noatime,nodiratime,inode64)
/dev/mapper/RHS_vg1-RHS_lv1 on /rhs/brick1 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc)
/dev/mapper/RHS_vg1-2aad9ef4dc7244b0a9f3ddd90c13318e_0 on /var/run/gluster/snaps/2aad9ef4dc7244b0a9f3ddd90c13318e/brick1 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc,nouuid)
[root@inception ~]#


[root@inception ~]# cat after_reboot*
/dev/mapper/RHS_vg1-RHS_lv1 on /rhs/brick1 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc)
/dev/mapper/RHS_vg10-RHS_lv10 on /rhs/brick10 type xfs (rw,noatime,nodiratime,inode64)
/dev/mapper/RHS_vg1-2aad9ef4dc7244b0a9f3ddd90c13318e_0 on /var/run/gluster/snaps/2aad9ef4dc7244b0a9f3ddd90c13318e/brick1 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc,nouuid)
[root@inception ~]# 

Brick is mounter after reboot: 

[root@inception ~]# mount | grep /var/run
/dev/mapper/RHS_vg1-2aad9ef4dc7244b0a9f3ddd90c13318e_0 on /var/run/gluster/snaps/2aad9ef4dc7244b0a9f3ddd90c13318e/brick1 type xfs (rw,noatime,allocsize=1MiB,noattr2,barrier,nogrpid,ihashsize=0,noikeep,inode64,largeio,logbufs=4,noalign,nouuid,osyncisosync,quota,gquota,swalloc,nouuid)
[root@inception ~]# 


Moving the bug to verified state.

Comment 8 errata-xmlrpc 2014-09-22 19:45:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1278.html


Note You need to log in before you can comment on or make changes to this bug.