Re: Btrfs and raw zvol-like partition

2009-04-12 Thread Andrey Kuzmin
zvol (interface) does not just  'export raw device' but rather
implements volume  abstraction and integrates volume management into
file-system.

Regards,
Andrey



On Sun, Apr 12, 2009 at 11:26 AM, Sébastien Wacquiez s...@enix.org wrote:
 Hi,

 A nice feature is ZFS is the ZVOL layer, that permit you to export
 (directly) a raw device from your zfs pool of disc, with the benefit of
 powerful (growing!) snapshot and easy raid management from zfs. It's
 particulary usefull when you use it with virtual server, allowing you to
 centralize all your backup problematic, etc

 Does btrfs plan to support this kind of feature ? (please, don't tell me
 that lvm do, lvm just sucks when you make a snapshot of your disk, and lack
 of the growing, commit, rollback, diffsend feature).

 Thanks !


 Sébastien Wacquiez

 PS : see http://opensolaris.org/os/community/zfs/source/zfstour.png if you
 don't know what zvol do.
 --
 To unsubscribe from this list: send the line unsubscribe linux-btrfs in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Btrfs and raw zvol-like partition

2009-04-12 Thread Sébastien Wacquiez

Andrey Kuzmin a écrit :

zvol (interface) does not just  'export raw device' but rather
implements volume  abstraction and integrates volume management into
file-system.
  

Yep. I suck at writing english, thanks for pointing that out :)

I surely mislead myself, but I think that the volume management of ZFS 
could be done with file.


Alloc on write ? Use sparse file. Resizing ? Append or truncate the 
file. Snapshot ? Snapshot the file. Another Volume ? An other file :)


In fact, the two thinks that have to be done, for me, is :
1/ Optimise the different layer to bypass permission, acl,  co, and 
surely the way data is written.
2/ Be able to export those file directly as block device. (Allowing 
some more optimisation :) )


It's why I called this feature export raw device (as in export raw 
file as block device). As I say, it could be emulated with file and 
loopback, but it'll surely be slow ... So I wanna know if btrfs plan to 
have those type of optimization (and the user land tools to simplify 
it's management).



Regards,


Sébastien Wacquiez
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: btrfs and /proc/self/mountinfo

2009-04-12 Thread Kay Sievers
On Sun, Apr 12, 2009 at 07:35, David Zeuthen zeut...@gmail.com wrote:

 But we'd still need some kind of way of having the kernel tell user
 space what devices are currently claimed by the btrfs filesystem
 instance (and we'd need notifications on changes too). Otherwise we
 don't have enough information for the desktop shell and partitioning
 programs to let the user know that /dev/sdb2 or /dev/sdc1 or whatever
 is currently claimed by the 0:19 btrfs mount at /media/fedora-usb.

 One idea is to have a pollable file, /proc/fs/btrfs/devs, that maps
 from the dev_t of the btrfs filesystem instance (as used in
 /proc/self/mountinfo) to the set of dev_t for block devices currently
 claimed? E.g. for the example above we'd have

  /proc/fs/btrfs/devs:
  0:19    8:18

Btrfs used to export some information in /sys/fs/btrfs/, this is
disabled for now. Maybe we can possibly make it export something like:
  $ tree /sys/fs/btrfs/
  /sys/fs/btrfs/
  |-- 969d1386-a002-4c28-94f2-47be23f344e4
  |   |-- ba1532f3-849b-400b-9c76-2c9aee126c52
  |   |   |-- device - ../../../devices/.../block/sda/sda3
  |   |   |-- attribute1
  |   |   |-- ...
  |   `-- 45645656-849b-400b-9c76-2c9aee126c52
  |   |-- device - ../../../devices/.../block/sdb/sdb3
  |   |-- attribute1
  |   
  `-- 645645686-a002-4c28-94f2-47be23f344e4
  |-- ...


So you could look for a device link at the subvolume devices? Or if
that does not fit for some reason, we could also add a btrfs class,
to export details about the subvolumes.

Thanks,
Kay
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html