All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs send does not work from readonly device
@ 2014-09-23 12:58 GEO
  2014-09-24 13:29 ` Duncan
  0 siblings, 1 reply; 4+ messages in thread
From: GEO @ 2014-09-23 12:58 UTC (permalink / raw)
  To: linux-btrfs

Let's say we have a snapshot called "snapshot" on our device "/dev/sdb".
Now we boot a qemu machine and attatch the disk read only (since we do not
want to put our data at risk in the vm, and read only should be enough to
get our snapshot data).

I used

qemu-system-x86_64 -drive -file=/dev/sdb,if=scsi,readonly -hda
<path_to_guest_operating_system>

When we are in the qemu instance (suppose our device  /dev/sdb is mounted
on /mnt/import), we want to import our data now using btrfs send/receive:

btrfs send /mnt/import/snapshot | btrfs receive  /

we get the following problems in syslog due to the fact that our device is
read only:

delayed_refs has NO entry
BTRFS warning (device sdb): btrfs_update_root:151: Aborting unsused
transaction(No space left)
BTRFS warning (device sdb): Skipping commit of aborted transaction.
BTRFS warning (device sdb): cleanup_transaction:1547: Aborting unused
transaction (No space left)

Apart from the snapshot folder being created in / nothing happens, the
process simply hangs forever, with no actual data getting imported.

Is that supposed to be that way? Why is readonly not enough to import data
using btrfs send?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs send does not work from readonly device
  2014-09-23 12:58 btrfs send does not work from readonly device GEO
@ 2014-09-24 13:29 ` Duncan
       [not found]   ` <CAOsFrTcVrWjSks0K-NzokHinBZVRxGGwmRzG_tdzxaU7AAC=xQ@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Duncan @ 2014-09-24 13:29 UTC (permalink / raw)
  To: linux-btrfs

GEO posted on Tue, 23 Sep 2014 14:58:06 +0200 as excerpted:

> Is that supposed to be that way? Why is readonly not enough to import
> data using btrfs send?

This is a known issue.  The subvolume itself needs to be set read-only, 
and of course that can't be done when the whole filesystem is set read-
only.

But a read-only filesystem should be sufficient, provided it can be 
forced to remain read-only thru the entire send.  I think that's the 
worry, that someone will switch their system from ro to rw in the middle 
of a send, thus screwing it up.

But they're aware of the problem and should eventually have a fix.  But 
I'm not sure how long as there's other work going on too, of course.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs send does not work from readonly device
       [not found]   ` <CAOsFrTcVrWjSks0K-NzokHinBZVRxGGwmRzG_tdzxaU7AAC=xQ@mail.gmail.com>
@ 2014-09-25 19:39     ` G EO
       [not found]     ` <vXff1o01A11vvw101XfhvK>
  1 sibling, 0 replies; 4+ messages in thread
From: G EO @ 2014-09-25 19:39 UTC (permalink / raw)
  To: Duncan; +Cc: linux-btrfs

The snapshots underneath are set read only anyway in my case, since
the they landed there by btrfs receive or I am thinking wrong here?
Duncan, do you remember the bug number?


Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: btrfs send does not work from readonly device
       [not found]     ` <vXff1o01A11vvw101XfhvK>
@ 2014-09-26  1:47       ` Duncan
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan @ 2014-09-26  1:47 UTC (permalink / raw)
  To: G EO; +Cc: linux-btrfs

On Thu, 25 Sep 2014 21:39:41 +0200
G EO <1g2e3o4@gmail.com> wrote:

> The snapshots underneath are set read only anyway in my case, since
> the they landed there by btrfs receive or I am thinking wrong here?
> Duncan, do you remember the bug number?

I don't.  I remember seeing the discussion on the list.  Without
googling my local list archive it seems to me it might have been in one
of Marc Merlin's threads.

-- 
Duncan - No HTML messages please, as they are filtered as spam.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-26  2:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23 12:58 btrfs send does not work from readonly device GEO
2014-09-24 13:29 ` Duncan
     [not found]   ` <CAOsFrTcVrWjSks0K-NzokHinBZVRxGGwmRzG_tdzxaU7AAC=xQ@mail.gmail.com>
2014-09-25 19:39     ` G EO
     [not found]     ` <vXff1o01A11vvw101XfhvK>
2014-09-26  1:47       ` Duncan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.