[LU-16073] double lctl snapshot_mount results in unmount Created: 03/Aug/22  Updated: 05/Oct/22  Resolved: 05/Oct/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Upstream, Lustre 2.15.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Akash B Assignee: Akash B
Resolution: Fixed Votes: 0
Labels: ZFS, server
Environment:

Lustre filesystem with ZFS as backend filesystem.


Epic/Theme: zfs
Epic: zfs
Rank (Obsolete): 9223372036854775807

 Description   

HPE bug-id: LUS-10650
 
When snapshot fs is mounted on the server already and if < lctl snapshot_mount > is issued again, snapshot fs is getting unmounted from the server.

[root@cslmo4702 ~]# mount -t lustre
pool-mds65/mdt65 on /data/mdt65 type lustre (ro,svname=testfs-MDT0000,mgs,osd=osd-zfs)
pool-mds65/mdt65@snap_test_fo on /mnt/snap_test_fo_MDT0000 type lustre (ro,svname=36cd4520-MDT0000,nomgs,rdonly_dev,mgs,osd=osd-zfs)

[root@cslmo4702 ~]# lctl snapshot_list -F testfs
filesystem_name: testfs
snapshot_name: snap_test_fo
snapshot_fsname: 36cd4520
modify_time: Tue Dec 7 13:35:05 2021
create_time: Tue Dec 7 13:35:05 2021
status: mounted

[root@cslmo4702 ~]# lctl snapshot_mount -F testfs -n snap_test_fo
Can't mount the snapshot snap_test_fo: No such process

[root@cslmo4702 ~]# lctl snapshot_list -F testfs
filesystem_name: testfs
snapshot_name: snap_test_fo
snapshot_fsname: 36cd4520
modify_time: Tue Dec 7 13:35:05 2021
create_time: Tue Dec 7 13:35:05 2021
status: not mount

[root@cslmo4702 ~]# mount -t lustre
pool-mds65/mdt65 on /data/mdt65 type lustre (ro,svname=testfs-MDT0000,mgs,osd=osd-zfs)

If we try the same operation with the `mount -t lustre` command instead of `lctl snapshot_mount` command then it works correctly (EALREADY is returned).

[root@cslmo4702 ~]# mount -t lustre -o rdonly_dev pool-mds65/mdt65@snap_test_fo /mnt/snap_test_fo_MDT0000
mount.lustre: mount pool-mds65/mdt65@snap_test_fo at /mnt/snap_test_fo_MDT0000 failed: Operation already in progress
The target service is already running. (pool-mds65/mdt65@snap_test_fo)


 Comments   
Comment by Gerrit Updater [ 16/Aug/22 ]

"Akash B <akash-b@hpe.com>" uploaded a new patch: https://review.whamcloud.com/48224
Subject: LU-16073 tests: double snapshot mount reproducer
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5815b8dd98e21ff46b7bc93839f1867a5b9101da

Comment by Gerrit Updater [ 16/Aug/22 ]

"Akash B <akash-b@hpe.com>" uploaded a new patch: https://review.whamcloud.com/48225
Subject: LU-16073 utils: double snapshot_mount fix
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 125f5aa627bb5dc5b870566a9353e2789688f019

Generated at Sat Feb 10 03:23:46 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.