[DRBD-user] DRBD Diskless with LVM

mickaelFr mickael.terrien at alcatel-lucent.com
Fri Dec 9 15:09:06 CET 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Now my configuration with one logical volume (active/passive) works with
8.3.11 on rhel6.

With a mydata.res file like this one:

resource mydata {
	protocol C;
	disk {
		on-io-error detach;
	}
	on hamain.mydomain.com {
	   	  device /dev/drbd0;
		  disk /dev/vg_rhel6/lv_data;
		  meta-disk internal;
		  address 172.27.134.88:7788;
	}
	on haslave.mydomain.com {
		  device /dev/drbd0;
		  disk /dev/vg_rhel6/lv_data;
		  meta-disk internal;
		  address 172.27.134.90:7788;
	}
}

There's a main step I had forgotten before running the "drbdadm create-md"
command which is:

- umount the lv partition so on my side /dev/vg_rhel6/lv_data

Then to anticipate below error running "drbdadm create-md" too:


  md_offset 55372546048
  al_offset 55372513280
  bm_offset 55370821632
  
  Found ext3 filesystem which uses 54074756 kB
  current configuration leaves usable 54073068 kB
  
  Device size would be truncated, which
  would corrupt data and result in
  'access beyond end of device' errors.
  You need to either
     * use external meta data (recommended)
     * shrink that filesystem first
     * zero out the device (destroy the filesystem)
  Operation refused.
  
  Command 'drbdmeta /dev/drbd0 v08 /dev/sda10 internal create-md' terminated
with exit code 40
  drbdadm aborting


I have run this command on the lv:

- dd if=/dev/zero bs=1M count=1 of=/dev/vg_rhel6/lv_data

Finally, to anticipate another error message "Failed to create file in
/var/lib/drbd", I created the directory with rights:

- mkdir /var/lib/drbd
- chmod on it

Then run the command:

- modprobe drbd
- drbdadm create-md r0

That's ok.
-- 
View this message in context: http://old.nabble.com/DRBD-Diskless-with-LVM-tp32503717p32941735.html
Sent from the DRBD - User mailing list archive at Nabble.com.




More information about the drbd-user mailing list