lvm(ext4) + samba (vfs objects = snapper) -> snapshots not mounted - not visible as shadow copies
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 160
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 3
Description
Hi,
I have Ubuntu 16.04.3 LTS (kernel 4.4.0-101-generic) with samba 4.9.0pre1-GIT-ffcc367 (installed/compiled from "git clone", because Ubuntu's version does not contain snapper.so module).
Snapper is installed (according to instruction at snapper.io) from deb http://download.opensuse.org/repositories/filesystems:/snapper/xUbuntu_16.04/
(snapper 0.5.4 - flags btrfs,lvm,no-ext4,xattrs,no-rollback,no-btrfs-quota,no-selinux).
I have configured LVM Thin Provisioning pool and volumes with ext4 filesystem.
For each volume I have created snapper config:
sudo snapper -c name create-config -f "lvm(ext4)" /thin/name
Then I set the permissions:
sudo snapper -c name set-config ALLOW_USERS=username
sudo snapper -c name set-config SYNC_ACL=yes
In smb.conf I have defined shares:
[Name]
hide files = /lost+found/
path = /thin/name
valid users = username
vfs objects = snapper
write list = username
Everything seems to work as it should except of Shadow Copy - when trying to see "previous versions" from Windows client, then:
- trying at share it shows all snapshots but they cannot be opened or restored (access denied),
- trying at file/folder inside a share it does not show any snapshot.
I can enter (as Windows client) /thin/name/.snapshots and see appropriate numbers, entering this numbers I see snapshot folder and info.xml file. For both access is denied (owner is root with no permission for others).
So snapper has set appropriate ACL permissions as I previously configured, but snapshot is not visible at given snapshot folder.
After giving a command:
sudo snapper -c name mount number
snapshot with given number is mounted and then it is accessible for Windows client in "snapshot" folder and in "previous versions" (Shadow Copy).
I think that snapper should mount/umount these snapshots on demand but it does not do it.
Or even if the snapshot was mounted for the whole its timelife it would work properly.
Is there any solution to mount these snapshots on demand or permanently?
Of course then the snapper should umount them when trying to delete (cleanup).
I think this is a bug or I have missconfigured something, because in this case users cannot access snapshots at all (with or without using shadow copy), assuming they have no shell access (cannot use snapper command).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the setup using the shown snapper -c name mount number command and the smb.conf share with vfs objects = snapper; inspect how the snapper mount entry point is used for LVM ext4 snapshots. Done means snapshots are accessible through Samba Previous Versions without manual mounting, and cleanup unmounts them when snapshots are deleted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100