Re: ceph snapshot

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

 



On Wed, Nov 24, 2021 at 12:55 AM 151448592 <151448592@xxxxxx> wrote:
>
> Hi Greg
> If we get a snapshot list, we get the rbd_directory object of the rdb image, the omap atributes of the  rbd_directory object is get from OSD using crush method, is it correct?

I think so, though I'm not sure I totally understand the question. The
rbd_directory is a per-pool object that maps rbd names to IDs. omap
for an object is stored alongside data and xattrs in the same OSD.

>
> Does the create and delete of clone is the same with snap? Could you help to explan the command flow of the purge snap?

If you're interested in rbd specifically you'll need to read the docs
for the details of how it interacts with layering and the rbd trash.
But when you delete a snapshot, the monitor marks it for removal
(removed_snaps, via new_removed_snaps in OSDMap::Incremental). The
OSDs schedule work to delete everything in that queue, and when
they've deleted the data for a snapshot they report success on a PG
basis. When every PG in a pool has removed a snapshot, it gets added
to an Incremental's new_purged_snaps and thus from the removed_snaps
queue.
-Greg

>
> Regards
> Shuo
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "Gregory Farnum" <gfarnum@xxxxxxxxxx>;
> 发送时间: 2021年11月24日(星期三) 中午12:34
> 收件人: "151448592"<151448592@xxxxxx>;
> 抄送: "dev"<dev@xxxxxxx>;
> 主题: Re: ceph snapshot
>
> On Tue, Nov 23, 2021 at 10:36 PM 151448592 <151448592@xxxxxx> wrote:
> >
> > I have a quesion, when we create rbd snap, the snap_seq will add one. If we delete snap,would snap_seq will be reused?  or the snap_seq is always monotonic increasing?
>
> The snap_seq is a monotonically-increasing value. It's a 'seq'uence
> number used to indicate that the set of allocated snapshots has
> changed.
>
> > In addition, when we create snap, the monitor will return snap_seq to rbd, the RBD metadata save the snapshot name and snap_seq. Does the monitor need to send the create snap command to OSD?
>
> Nope, one the OSD side snapshots are created implicitly when a write
> operation contains them in the snapset.
>
> > When we delete snap, we delete the metedata in RBD and sent delete snap to monitor.  Does the monitor send to corresponding OSD to delete snap according the crush method?
>
> There's a deleted_snaps set in the OSDMap, and when OSDs process the
> map that adds them they queue up the snapshot for deletion where it
> exists within their PGs. (Or maybe it's called deleting_snaps?)
> Once upon a time that set lived for eternity as an interval set, but
> these days we track the snaps that have yet to be deleted, and the
> OSDs report when they've finished deleting so that the set can be
> trimmed.
> -Greg

_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx




[Index of Archives]     [CEPH Users]     [Ceph Devel]     [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