Bug 15797 - Unable to connect to CephFS subvolume shares with vfs_shadow_copy2
Summary: Unable to connect to CephFS subvolume shares with vfs_shadow_copy2
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.22.0rc1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-06 13:01 UTC by Anoop C S
Modified: 2025-03-10 13:02 UTC (History)
2 users (show)

See Also:


Attachments
patch from master for v4-22-test (2.60 KB, patch)
2025-02-11 10:42 UTC, Anoop C S
anoopcs: review? (slow)
gd: review+
gd: ci-passed+
Details
patch from master for v4-21-test (2.60 KB, patch)
2025-02-11 10:42 UTC, Anoop C S
anoopcs: review? (slow)
gd: review+
gd: ci-passed+
Details
patch from master for v4-20-test (2.60 KB, patch)
2025-02-11 10:42 UTC, Anoop C S
anoopcs: review? (slow)
gd: review+
gd: ci-passed+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anoop C S 2025-02-06 13:01:06 UTC
When shadow_copy2 VFS module is loaded with share path configured to access CephFS subvolumes, the connection attempt fails with NT_STATUS_UNSUCCESFUL.

[cephfs-subvol]
	comment = For samba share of subvolume subvol
	path = /volumes/_nogroup/subvol/d2916e6d-a054-41f1-ac77-17ee77f22365
	read only = No
	vfs objects = shadow_copy2 ceph
	ceph:config_file = /etc/ceph/ceph.conf
	ceph:user_id = foo
	ceph:filesystem = cephvol

$ smbclient \\\\192.168.122.101\\cephfs-subvol -U root%smb
tree connect failed: NT_STATUS_UNSUCCESSFUL

[2025/02/06 18:24:52.153896,  1, pid=146108, effective(0, 0), real(0, 0), class=vfs] ../../source3/modules/vfs_ceph.c:284(cephwrap_connect)
  cephwrap_connect: Connection established with the server: (/etc/ceph/ceph.conf/foo/cephvol)
[2025/02/06 18:24:52.153926,  1, pid=146108, effective(0, 0), real(0, 0)] ../../source3/modules/vfs_shadow_copy2.c:3111(shadow_copy2_connect)
  shadow_copy2_connect: shadow_copy2_find_mount_point of the share root '/volumes/_nogroup/subvol/d2916e6d-a054-41f1-ac77-17ee77f22365' failed: No such file or directory
[2025/02/06 18:24:52.153934,  1, pid=146108, effective(0, 0), real(0, 0)] ../../source3/smbd/smb2_service.c:628(make_connection_snum)
  make_connection_snum: SMB_VFS_CONNECT for service 'cephfs-subvol' at '/volumes/_nogroup/subvol/d2916e6d-a054-41f1-ac77-17ee77f22365' failed: No such file or directory
Comment 1 Samba QA Contact 2025-02-07 06:24:04 UTC
This bug was referenced in samba master:

c7d0adade09fa264201a125b28dd76c163451260
Comment 2 Anoop C S 2025-02-11 10:42:02 UTC
Created attachment 18549 [details]
patch from master for v4-22-test
Comment 3 Anoop C S 2025-02-11 10:42:28 UTC
Created attachment 18550 [details]
patch from master for v4-21-test
Comment 4 Anoop C S 2025-02-11 10:42:51 UTC
Created attachment 18551 [details]
patch from master for v4-20-test
Comment 5 Guenther Deschner 2025-03-05 16:34:22 UTC
Comment on attachment 18549 [details]
patch from master for v4-22-test

LGTM, RB+
Comment 6 Guenther Deschner 2025-03-05 16:34:40 UTC
Comment on attachment 18550 [details]
patch from master for v4-21-test

LGTM, RB+
Comment 7 Guenther Deschner 2025-03-05 16:34:58 UTC
Comment on attachment 18551 [details]
patch from master for v4-20-test

LGTM, RB+
Comment 8 Guenther Deschner 2025-03-05 16:35:36 UTC
Jule, please add to the according branches, thanks!
Comment 9 Jule Anger 2025-03-06 08:41:19 UTC
Pushed to autobuild-v4-{22,21,20}-test.
Comment 10 Samba QA Contact 2025-03-06 12:48:11 UTC
This bug was referenced in samba v4-22-test:

0d4a204cdb1e90604085609c52a0f86fc34c6fa1
Comment 11 Samba QA Contact 2025-03-06 14:07:43 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.0):

0d4a204cdb1e90604085609c52a0f86fc34c6fa1
Comment 12 Samba QA Contact 2025-03-07 10:30:03 UTC
This bug was referenced in samba v4-21-test:

b7843d0f422386f17868a392d6ca37df5f4de3dd
Comment 13 Samba QA Contact 2025-03-10 09:47:13 UTC
This bug was referenced in samba v4-20-test:

02dcd201fd9b490d8d4c626986d7a1b3673c022d
Comment 14 Jule Anger 2025-03-10 13:02:58 UTC
Closing out bug report.

Thanks!