Re: Fwd: Ceph fs snapshot problem

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

 



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> 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> 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> 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
>> To unsubscribe send an email to 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