Bug 1529285 - snapshot creation not working if thin provisioned brick LV is mounted via autofs
Summary: snapshot creation not working if thin provisioned brick LV is mounted via autofs
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: snapshot
Version: 3.10
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-27 12:32 UTC by Arnd Gronenberg
Modified: 2018-06-20 18:25 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-06-20 18:25:08 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Arnd Gronenberg 2017-12-27 12:32:43 UTC
Description of problem:
Trying to create snapshot of thin provisioned gluster brick LV which is mounted via autofs does not work

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

How reproducible:
Happens for all thin provisioned gluster brick LVs which are mounted via autofs

Steps to Reproduce:
1. Create thin pool
2. Create thin provisioned LV for brick and format it with xfs
3. Create autofs setup
3.1. /etc/auto.master:
     +dir:/etc/auto.master.d
3.2. /etc/auto.master.d/glusterd.autofs:
     /- /etc/auto.glusterd --timeout=0
3.3. /etc/auto.glusterd:
     /data/glusterfs/test/brick1 -fstype=xfs,defaults,rw,noatime,nodiratime,largeio,inode64,swalloc,allocsize=64M        :/dev/vg00/glusterfs_test_1
4. Start autofs
   systemctl start autofs
5. Create gluster volume
   gluster volume create test transport tcp localhost:/data/glusterfs/test/brick1/brick
6. Try to create snapshot
   gluster snapshot create snapshot_test test no-timestamp

Actual results:
Error messsage:
"Snapshot is supported only for thin provisioned LV. Ensure that all bricks of test are thinly provisioned LV."
In log:
[glusterd-snapshot.c:2004:glusterd_is_thinp_brick] 0-management: Failed to get pool name for device /etc/auto.glusterd

Expected results:
Snapshot successfully created

Additional info:

Cause is in glusterd-utils.c function glusterd_get_mnt_entry_info:
getmntent_r reads through mount points, for autofs mounted fs there are two mountpoints, first with fstype autofs and second with read fstype
Output of findmnt /data/glusterfs/test/brick1:
TARGET                      SOURCE                            FSTYPE OPTIONS
/data/glusterfs/test/brick1 /etc/auto.glusterd                autofs rw,...
/data/glusterfs/test/brick1 /dev/mapper/vg00-glusterfs_test_1 xfs    rw,...

Solution would be to check for fstype=autofs in while loop and skip to next mount entry

Comment 1 Shyamsundar 2018-06-20 18:25:08 UTC
This bug reported is against a version of Gluster that is no longer maintained (or has been EOL'd). See https://www.gluster.org/release-schedule/ for the versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline gluster repository, request that it be reopened and the Version field be marked appropriately.


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