Re: Path to a cephfs subvolume

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

 



On Tue, Mar 22, 2022 at 11:24 AM Robert Vasek <rvasek01@xxxxxxxxx> wrote:
>
> Hello,
>
> I have a question about cephfs subvolume paths. The path to a subvol seems
> to be in the format of <subvol group>/<subvol>/<some UUID>, e.g.:
>
> /volumes/csi/csi-vol-59c3cb5a-a9ee-11ec-b412-0242ac110004/b2b5a0b3-e02b-4f93-a3f5-fdcef80ebbea
>
> I'm wondering about the <some UUID> segment. Where is it coming from, why
> is there this indirection?

It is the directory within the subvolume where the user's subvolume
data is stored. When you fetch the mount path of the subvolume using
`ceph fs subvolume getpath` command, you get the absolute path of the
directory of the form, /volumes/<subvol gp name>/<subvol name>/<uuid>/
The indirection was introduced to allow storing subvolume's internal
metadata within /volumes/<subvol gp name>/<subvol name>/, and to
support features such as removing a subvolume while retaining its
snapshots.  For more details you can see,

https://github.com/ceph/ceph/blob/v16.2.7/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py#L33
https://github.com/ceph/ceph/blob/v16.2.7/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py#L22

The UUID component of a subvolume's mount path is generated here,
https://github.com/ceph/ceph/blob/v16.2.7/src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py#L168

> I suppose this means there can be multiple of
> these UUIDs?

No. There is only one such UUID directory that stores the user's
subvolume data during the lifecycle of the subvolume.

> Nowhere in "ceph fs subvolume{,group}" can I find anything to
> list them (without actually traversing <subvol group>/<subvol>/*) however.
> Or can you give me hints where to look for this in the code?

`ceph fs subvolume ls` is used to list the subvolume names within a
subvolume group, and `ceph fs subvolume getpath` or `ceph fs subvolume
info`  is used to fetch the mount path of a subvolume. There is no
single command to list the mount paths of all the subvolumes within a
subvolume group . Looking at
https://github.com/ceph/ceph/blob/v16.2.7/src/pybind/mgr/volumes/fs/volume.py#L368
and https://github.com/ceph/ceph/blob/v16.2.7/src/pybind/mgr/volumes/fs/volume.py#L329
should provide clues on how it can be implemented.

>
> Thank you!
>
> Cheers,
> Robert
> _______________________________________________
> ceph-users mailing list -- ceph-users@xxxxxxx
> To unsubscribe send an email to ceph-users-leave@xxxxxxx
>

Regards,
Ramana

_______________________________________________
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