Re: import-diff requires snapshot exists?

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

 



Snapshots are read-only, so all changes to the image can only be applied to the HEAD revision.

In general, you should take a snapshot prior to export / export-diff to ensure consistent images:

  rbd snap create rbd/small@snap1
  rbd export rbd/small@snap1 ./foo

  rbd import ./foo backup/small
  rbd snap create backup/small@snap1

  ** rbd/small and backup/small are now consistent through snap1 -- rbd/small might have been modified post snapshot

  rbd snap create rbd/small@snap2
  rbd export-diff --from-snap snap1 rbd/small@snap2 ./foo.diff
  rbd import-diff ./foo.diff backup/small

  ** rbd/small and backup/small are now consistent through snap2.  import-diff automatically created backup/small@snap2 after importing all changes. 

-- 

Jason Dillaman 
Red Hat 
dillaman@xxxxxxxxxx 
http://www.redhat.com 


----- Original Message -----
From: "Steve Anthony" <sma310@xxxxxxxxxx>
To: ceph-users@xxxxxxxxxxxxxx
Sent: Tuesday, March 3, 2015 2:06:44 PM
Subject:  import-diff requires snapshot exists?

Hello,

I've been playing with backing up images from my production site
(running 0.87) to my backup site (running 0.87.1) using export/import
and export-diff/import-diff. After initially exporting and importing the
image (rbd/small to backup/small) I took a snapshot (called test1) on
the production cluster, ran export-diff from that snapshot, and then
attempted to import-diff the diff file on the backup cluster.

# rbd import-diff ./foo.diff backup/small
start snapshot 'test1' does not exist in the image, aborting
Importing image diff: 0% complete...failed.
rbd: import-diff failed: (22) Invalid argument

This works fine if I create a test1 snapshot on the backup cluster
before running import-diff. However, it appears that the changes get
written into backup/small not backup/small@test1. So unless I'm not
understanding something, it seems like the content of the snapshot on
the backup cluster is of no importance, which makes me wonder why it
must exist at all.

Any thoughts? Thanks!

-Steve

-- 
Steve Anthony
LTS HPC Support Specialist
Lehigh University
sma310@xxxxxxxxxx



_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




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


  Powered by Linux