Skip to contentSkip to conversation

Btrfs and raw zvol-like partition

DISCUSSION Sébastien Wacquiez 3 participants 5 messages Apr 12, 2009 – Apr 13, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

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

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

Thanks !

S=E9bastien Wacquiez

PS : see http://opensolaris.org/os/community/zfs/source/zfstour.png if=20 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw

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

Regards,
Andrey

Quoted 4 lines · On Sun, Apr 12, 2009 at 11:26 AM, S=C3=A9bastien Wacquiez <[email protected]>= 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

Quoted 2 lines

powerful (growing!) snapshot and easy raid management from zfs. It's particulary usefull when you use it with virtual server, allowing you=

to

Quoted 3 lines

centralize all your backup problematic, etc

Does btrfs plan to support this kind of feature ? (please, don't tell=

me

Quoted 1 line

that lvm do, lvm just sucks when you make a snapshot of your disk, an=

d lack

Quoted 8 lines

of the "growing", commit, rollback, diffsend feature).

Thanks !

S=C3=A9bastien Wacquiez

PS : see http://opensolaris.org/os/community/zfs/source/zfstour.png i=

f you

Quoted 3 lines

don't know what zvol do.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=

" in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=

ml

Quoted 1 line

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Andrey Kuzmin a =C3=A9crit :

Quoted 4 lines

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

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

I surely mislead myself, but I think that the "volume management" of ZF= S=20
could be done with file.

Alloc on write ? Use sparse file. Resizing ? Append or truncate the=20 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=20 surely the way data is written.
2/ Be able to export those file directly as block device. (Allowing=20 some more optimisation :) )

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

Regards,

S=C3=A9bastien Wacquiez
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 4 lines · On Sun, Apr 12, 2009 at 10:32 PM, S=C3=A9bastien Wacquiez <[email protected]>= wrote:

Andrey Kuzmin a =C3=A9crit :

Quoted 3 lines

zvol (interface) does not just =C2=A0'export raw device' but rather implements volume =C2=A0abstraction and integrates volume management=

into

Quoted 6 lines
Quoted 2 lines

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

Quoted 1 line

could be done with file.

Basically volume abstraction aims to provide a layer above raw device implementing extra functionality not found with raw disk (e.g., fault-tolerance), expandability (one can add disks to a volume as needed) and single point of control over a bunch of disks.

Quoted 2 lines

Alloc on write ? Use sparse file. Resizing ? Append or truncate the f=

ile.

Quoted 1 line

Snapshot ? Snapshot the file. Another Volume ? An other file :)

Basically you're right and, for instance, (deprecated) opensolaris user-spce iSCSI target supports exporting a regular zfs file to remote clients as raw scsi block device. At the same time, implementing a 'volume' on-top of a regular zfs file might be unsafe (file-system makes some assumptions wrt I/O that are fine with raw devices below real volume but do not necessarily hold for a regular file) .

Quoted 3 lines

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

Quoted 2 lines

the way data is written.
2/ Be able to export those file directly as block device. (Allowing s=

ome

Quoted 3 lines

more optimisation :) )

It's why I called this feature "export raw device" (as in "export raw=

file

Quoted 1 line

as block device"). As I say, it could be emulated with file and loopb=

ack,

Quoted 1 line

but it'll surely be slow ... So I wanna know if btrfs plan to have th=

ose

Quoted 1 line

type of optimization (and the user land tools to simplify it's manage=

ment).

Quoted 1 line

That's a question to linux-btrfs@, I'm quite new to this one.

Regards,
Andrey

Quoted 7 lines

Regards,

S=C3=A9bastien Wacquiez
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=

" in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=

ml

Quoted 1 line

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Sébastien Wacquiez
Quoted 4 lines · On Sun, 2009-04-12 at 09:26 +0200, S=C3=A9bastien Wacquiez wrote:

Hi,
=20
A nice feature is ZFS is the "ZVOL" layer, that permit you to export=20 (directly) a raw device from your zfs pool of disc, with the benefit =

of=20

Quoted 2 lines

powerful (growing!) snapshot and easy raid management from zfs. It's=20 particulary usefull when you use it with virtual server, allowing you=

to=20

Quoted 3 lines

centralize all your backup problematic, etc
=20
Does btrfs plan to support this kind of feature ? (please, don't tell=

me=20

Quoted 1 line

that lvm do, lvm just sucks when you make a snapshot of your disk, an=

d=20

Quoted 2 lines

lack of the "growing", commit, rollback, diffsend feature). =20

I've always been interested in a btrfs export via loop or dm. The problem with loop is that it needs to be switched over to O_DIRECT or something similar.

At any rate, it would be a fun project for someone looking to know dm better.

-chris

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html