Re: Fwd: Ceph fs snapshot problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Neeraj,
Thanks, that worked fine!!
I just needed to remount with the 'p' permission to set ceph.dir.subvolume to 0, otherwise I got permission denied.
I also discovered what messed it up. I tried the command:
ceph fs subvolume snapshot ....
and if I just used 'ls' (or any other subcommand) this made the
mkdir /mnt/mydir/.snap/mysnap
stop working with the permission denied. But I could resolve it with the setfattr again. I must have missunderstood the ceph fs subvolume snapshot command, I thought it was the same thing as doing a mkdir on the mount or is that some other type of snapshot?

Many thanks!!

Marcus

On lör, mar 16 2024 at 23:51:09 +0530, Neeraj Pratap Singh <neesingh@xxxxxxxxxx> wrote:
As per the error message you mentioned;
Permission denied : It seems that the 'subvolume' flag has been set on the root directory and we cannot create snapshots in directories under subvol
dir.

Can u pls retry creating directory after unsetting it by using: setfattr -n
ceph.dir.subvolume -v 0 /mnt


On Sat, Mar 16, 2024 at 2:00 PM Marcus <marcus@xxxxxxxxxx <mailto:marcus@xxxxxxxxxx>> wrote:

 Hi,
 There is no such attribute.
 /mnt: ceph.dir.subvolume: No such attribute

I did not have getfattr installed so needed to install attr package. Can
 it be that this package was not installed when fs was created so
 ceph.dir.subvolume could not be set at creation?
 Did not get any warnings at creation though.

 Thanks for you help!!

 On lör, mar 16 2024 at 00:53:22 +0530, Neeraj Pratap Singh <
 neesingh@xxxxxxxxxx <mailto:neesingh@xxxxxxxxxx>> wrote:

 Can u pls do getfattr on root directory and tell whats the output?
 Run this command: getfattr -n ceph.dir.subvolume /mnt

On Thu, Mar 14, 2024 at 4:38 PM Marcus <marcus@xxxxxxxxxx <mailto:marcus@xxxxxxxxxx>> wrote:


 Hi all,
 I have just setup a small ceph cluster with ceph fs.
 The setup is reef 18.2.1 on Debian bookworm.
 The system is up and running the way it should,
 though I have a problem with ceph fs snapshots.

 When I read the doc I should be able to make a
 snapshot in any directory in the filesystem.
 I can do a snapshot in the root of the filesystem
 but if I try somewhere else I get:
 Operation not permitted
 This is the same if I do it with mkdir or
 with ceph fs subvolume snapshot create ...

 I have created an auth client with rws:
 [client.snap-mount]
         key = ****
         caps mds = "allow rws fsname=gds-common"
         caps mon = "allow r fsname=gds-common"
         caps osd = "allow rw tag cephfs data=gds-common"

 Where the filsystem is called gds-common,
saved in a file on the client: /etc/ceph/ceph.client.snap-mount.keyring

 I mount ceph fs with:
 mount -t ceph :/ -o name=snap-mount /mnt

 If I create a snapshot in root, it works fine, as in:
 mkdir /mnt/.snap/mysnap
I also notice that in every subdir there is a "snapshot dir" as well
 with the name _mysnap_1, as in:
 /mnt/dir/.snap/_mysnap_1

 My guess that is is a part of the snapshot system, this "snapshot"
 dissapear when the snapshot is removed with:
 rmdir /mnt/.snap/mysnap

If I try to make a snapshot in another directory this does not work:
 mkdir /mnt/dir/.snap/othersnap
 Get the error:
cannot create directory ‘/mnt/dir/.snap/othersnap’: Operation not
 permitted

 It is the same thing on the commandline, root works:
 ceph fs subvolume snapshot create gds-common / fromcmd

 But not in a subdir:
 ceph fs subvolume snapshot create gds-common /dir dirsnap
 Error EINVAL: invalid value specified for ceph.dir.subvolume

 I also notice that when you use any command of type:
 ceph fs subvolume snapshot ...
 You get a new directory (volumes) in the root:
 /mnt/volumes/_legacy/6666cd76f96956469e7be39d750cc7d9.meta

 I do not know if I am missing something, some lacking of
 config or so.

 Thanks for your help!!

 Best regards
 Marcus

 _______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx <mailto:ceph-users@xxxxxxx> To unsubscribe send an email to ceph-users-leave@xxxxxxx <mailto:ceph-users-leave@xxxxxxx>


_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx <mailto:ceph-users@xxxxxxx> To unsubscribe send an email to ceph-users-leave@xxxxxxx <mailto:ceph-users-leave@xxxxxxx>

_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux