[zfs-discuss] DRBD or AVS with ZFS
shadowsor at gmail.com
Mon Oct 3 23:44:09 EDT 2011
I didn't really think that's what you meant, I was just stating that I
was confused by our comment. My fault.
I think it would work either way, actually, I just don't know what's
best for what he is trying to accomplish:
block dev (/dev/sdb) --> /dev/drbd0 --> zpool --> zfs
This would replicate the zfs subdevices, so that he would also have
zfs devices and a zpool that would need to be imported on the
replicated box when it becomes the drbd primary.
block dev (/dev/sdb) --> zpool --> zvol (/dev/zd0) --> /dev/drbd0 --> mkfs.ext3
This would allow for deduplication/compression on the ext3 filesystem
residing on the zvol and the performance benefits, and the replicated
box wouldn't necessarily need to use ZFS at all since drbd is only
mirroring the ext3 data. There are however more layers, and while I've
used drbd I'm not sure how it may interact with zfs and in-flight
writes, between drbd's log, zfs's log, what's actually been synced,
In theory both would work. Let us know what you do and how it works out!
On Mon, Oct 3, 2011 at 7:31 PM, Mike Gracy <ghstridr at gmail.com> wrote:
> You should never do a mkfs on any zfs volume. I never said that. I just
> wondering aloud if dbrd was completely fs agnostic.
> Reading docs over at dbrd make me think that this is intercepting the
> kernel's write to the disk and send a copy to a receiver on another machine
> with the same setup.
> You would need to have the target zfs vol unmounted of course. There are
> probably several ways to install and configure dbrd. I would think that one
> of those ways was adding it to an existing system so that you wouldn't have
> to repartition/reformat anything.
> On Monday, October 3, 2011, Marcus Sorensen wrote:
>> It sounds like you're saying he should create a zpool from, say
>> /dev/sdb1 and then also use /dev/sdb1 for your drbd device. This would
>> destroy your zfs when you did a mkfs.ext3 on /dev/drbd0.
>> Instead you could create /dev/drbd0 from /dev/sdb, /dev/drbd1 from
>> /dev/sdc, etc, and then add /dev/drbd0,1 into a zpool. Or you could
>> create a zpool from /dev/sdb and /dev/sdc, create a zvol block device
>> from that, and then put that into /dev/drbd0. If it were md raid I
>> would do the latter, but with zfs this requires a bit more thought.
>> On Mon, Oct 3, 2011 at 5:38 PM, Mike Gracy <ghstridr at gmail.com> wrote:
>> > Well, in theory it should work as long as you point it to a partition or
>> > whole device.
>> > I don't know if it's still best practice, but create a single partition
>> > on
>> > each drive meant to be in a zfs volume and point drbd at that.
>> > As long as dbrd doesn't care about what file system is on a given block,
>> > then it should work.
>> > On Monday, October 3, 2011, Corwin wrote:
>> >> Has anyone played with any synchronous replication of ZFS? Enabling
>> >> compression typically gives a 3x performance increase for MySQL w/
>> >> InnoDB so I really want to use ZFS for my database file system but I
>> >> am not sure how ZFS would handle being on a /dev/drbdX device.
>> >> Thanks,
>> >> Michael Bushey
More information about the zfs-discuss