Re: [PATCH] DRBD support for blkid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 26, 2009 at 11:26:59AM +0100, Karel Zak wrote:
> 
>  Hi Bastian,
> 
> On Mon, Oct 19, 2009 at 04:48:44PM +0200, Bastian Friedrich wrote:
> > DRBD is the Distributed Replicated Block Device, a replication service for low 
> > level block devices. The kernel dependent code will probably[tm] be taken 
> > upstream shortly, see discussions on kernel mailing list.
> 
> OK. (I'm usually waiting until the kernel part is not in Linus's tree.)
> 
> > The attached patch provides (lib)blkid detection for v08 type drbd devices 
> > (v08 is the current one). Two people at linbit are CC'ed.
> > 
> > drbd may be used in "stacked" environments, such as LVM-on-DRBD-on-LVM. Due to
> 
> Well, does it mean that all (FS, LVM,...) signatures on physical
> device in the "stacked" environment are on valid offsets? I don't
> think so.
> 
> > that, flag BLKID_IDINFO_TOLERANT is required; also, the position of the info 
> > struct in idinfos seems to be critical.
> 
> It seems we can think about DRBD as about a raid device. So it should
> be enough to replace the "tolerant" flag with "raid" flag and probe
> for DRBD after real raids and before LVM.
> 
> (The "raid" flag has also special meaning -- when a raid is detected
> nothing other is probed and the raid signature is used.)

DRBD has data area, and meta data area.
The data area is completely transparent.

The meta data _may_ be "internal", which means various "magic numbers"
aka the "drbd superblock" could be found in the last 4k aligned 4k block
of the block device.

An other typical way to set it up is to have the meta data area
_external_, which means the data block device is not modified at all.
With external meta data, appart from the DRBD configuration, which
typically can be found in /etc/drbd.conf, and could be looked at with
"drbdadm", there is _nothing_ to relate the external meta device back to
the data device.

So if you find a DRBD "super block" in the first sector of a block
device, you can be sure it is (a false positive or) an external meta
data device, and NOT a data device.

Thus it does not help you at all to ignore it,
you will still probe and detect all possible things
on the respective data block device.

The only "heuristic" to detect those would be to ask "drbdadm",
not by probing for magic values at magic offsets.


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux