Re: CephFS snapshot creation time

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

 



On Thu, Mar 14, 2019 at 1:10 PM Patrick Donnelly <pdonnell@xxxxxxxxxx> wrote:
>
> Hello David,
>
> On Thu, Mar 14, 2019 at 12:20 PM David Disseldorp <ddiss@xxxxxxx> wrote:
> > I'm working on adding Samba integration with CephFS snapshots, so that
> > they can be accessed in Explorer via file/folder right-click ->
> > restore previous versions.
>
> How are you actually planning to effect a restore  from snapshot?
>
> > For this we need return a list of "@GMT-%Y.%m.%d-%H.%M.%S" labels back
> > to SMB clients in response to snapshot enumeration requests, where each
> > label corresponds to a snapshot.
> > To avoid the requirement for special @GMT-* snapshot naming in the .snap
> > directory, I'd hoped to determine the snapshot creation time from the
> > stat.btime field and return a label based on that. However, snapshot btime
> > fields appear to directly reference the btime of the snapshot source.
> >
> > Is there any way to determine the snapshot creation time? If not, would
> > anyone object to me adding a new xattr which carries this information,
> > e.g. "ceph.snap.btime", assuming the value is stored somewhere on the
> > MDS?
>
> The snapshot creation time appears to be available in the
> ceph_mds_snap_realm struct. It would just need wired up somehow. An
> xattr sounds appropriate.

That's a snapid, not a timestamp (see SnapRealmInfo in src/common/snap_types.h).

Happily I do see a SnapInfo::stamp member of long standing that
appears to be the create time.
-Greg

>
> --
> Patrick Donnelly



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux