linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* feature request: btrfs-image without zeroing data
@ 2011-07-11  0:00 krzf83@gmail.com 
  2011-07-11  9:31 ` Stephane Chazelas
  0 siblings, 1 reply; 4+ messages in thread
From: krzf83@gmail.com  @ 2011-07-11  0:00 UTC (permalink / raw)
  To: linux-btrfs

Documentation says that btrfs-image zeros data. Feature request is for
disabling this. btrfs-image could be used to copy filesystem to
another drive (for example with snapshots, when copying it file by
file would take much longer time or acctualy was not possible
(snapshots)). btrfs-image in turn could be used to actualy shrink loop
devices/sparse file containing btrfs - by copying filesystem to new
loop device/sparse file.

Also it would be nice if copying filesystem could occour without
intermediate dump to a file...

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

* Re: feature request: btrfs-image without zeroing data
  2011-07-11  0:00 feature request: btrfs-image without zeroing data krzf83@gmail.com 
@ 2011-07-11  9:31 ` Stephane Chazelas
  2011-07-11 12:39   ` krzf83@gmail.com 
  0 siblings, 1 reply; 4+ messages in thread
From: Stephane Chazelas @ 2011-07-11  9:31 UTC (permalink / raw)
  To: krzf83@gmail.com ; +Cc: linux-btrfs

2011-07-11 02:00:51 +0200, krzf83@gmail.com :
> Documentation says that btrfs-image zeros data. Feature request is for
> disabling this. btrfs-image could be used to copy filesystem to
> another drive (for example with snapshots, when copying it file by
> file would take much longer time or acctualy was not possible
> (snapshots)). btrfs-image in turn could be used to actualy shrink loop
> devices/sparse file containing btrfs - by copying filesystem to new
> loop device/sparse file.
> 
> Also it would be nice if copying filesystem could occour without
> intermediate dump to a file...
[...]

I second that.

See also
http://thread.gmane.org/gmane.comp.file-systems.btrfs/9675/focus=9820
for a way to transfer btrfs fs.

(Add a layer of "copy-on-write" on the original devices (LVM
snapshots, nbd/qemu-nbd cow...), "btrfs add" the new device(s)
and then "btrfs del" of the cow'ed original devices.

-- 
Stephane

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

* Re: feature request: btrfs-image without zeroing data
  2011-07-11  9:31 ` Stephane Chazelas
@ 2011-07-11 12:39   ` krzf83@gmail.com 
  2011-07-11 12:58     ` Stephane Chazelas
  0 siblings, 1 reply; 4+ messages in thread
From: krzf83@gmail.com  @ 2011-07-11 12:39 UTC (permalink / raw)
  To: Stephane Chazelas; +Cc: linux-btrfs

2011/7/11 Stephane Chazelas <stephane_chazelas@yahoo.fr>:
> 2011-07-11 02:00:51 +0200, krzf83@gmail.com :
>> Documentation says that btrfs-image zeros data. Feature request is for
>> disabling this. btrfs-image could be used to copy filesystem to
>> another drive (for example with snapshots, when copying it file by
>> file would take much longer time or acctualy was not possible
>> (snapshots)). btrfs-image in turn could be used to actualy shrink loop
>> devices/sparse file containing btrfs - by copying filesystem to new
>> loop device/sparse file.
>>
>> Also it would be nice if copying filesystem could occour without
>> intermediate dump to a file...
> [...]
>
> I second that.
>
> See also
> http://thread.gmane.org/gmane.comp.file-systems.btrfs/9675/focus=9820
> for a way to transfer btrfs fs.
>
> (Add a layer of "copy-on-write" on the original devices (LVM
> snapshots, nbd/qemu-nbd cow...), "btrfs add" the new device(s)
> and then "btrfs del" of the cow'ed original devices.
>
> --
> Stephane
>

Copying on block level (dd, lvm) is old trick, however this takes same
ammount of time regardless of actual space used in filesystem. Hence
this feature request. Images inside filesystem can copy only actualy
used data and metadata, which dramaticly reduces copy times in large
volumes that are not filled up...

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

* Re: feature request: btrfs-image without zeroing data
  2011-07-11 12:39   ` krzf83@gmail.com 
@ 2011-07-11 12:58     ` Stephane Chazelas
  0 siblings, 0 replies; 4+ messages in thread
From: Stephane Chazelas @ 2011-07-11 12:58 UTC (permalink / raw)
  To: krzf83@gmail.com ; +Cc: linux-btrfs

2011-07-11 14:39:18 +0200, krzf83@gmail.com :
> 2011/7/11 Stephane Chazelas <stephane_chazelas@yahoo.fr>:
[...]
> > See also
> > http://thread.gmane.org/gmane.comp.file-systems.btrfs/9675/focus=9820
> > for a way to transfer btrfs fs.
> >
> > (Add a layer of "copy-on-write" on the original devices (LVM
> > snapshots, nbd/qemu-nbd cow...), "btrfs add" the new device(s)
> > and then "btrfs del" of the cow'ed original devices.
[...]
> Copying on block level (dd, lvm) is old trick, however this takes same
> ammount of time regardless of actual space used in filesystem. Hence
> this feature request. Images inside filesystem can copy only actualy
> used data and metadata, which dramaticly reduces copy times in large
> volumes that are not filled up...

The method I suggest doesn't copy the whole disks, please read
more carefully. It can also work to copy from a 3 disk setup to
a 1 disk setup or the other way round.

With btrfs, you can add devices to a FS dynamically, you can
also delete devices in which case data is being transfered to
the other devices. The method I suggest uses that feature.

Cheers,
Stephane

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

end of thread, other threads:[~2011-07-11 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11  0:00 feature request: btrfs-image without zeroing data krzf83@gmail.com 
2011-07-11  9:31 ` Stephane Chazelas
2011-07-11 12:39   ` krzf83@gmail.com 
2011-07-11 12:58     ` Stephane Chazelas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).