[DRBD-user] Is DRBD not starting if the "Read-Only" flag of block device is set by design or as a bug?

Felix Frank ff at mpexnet.de
Fri May 11 09:49:04 CEST 2012

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


Hi,

I don't really see what the issue is, but I would definitely like to
bring this back up:

http://lists.linbit.com/pipermail/drbd-user/2011-May/016009.html

So this may end your problems "the other way" ;-)

Cheers,
Felix

On 05/11/2012 03:24 AM, Dimitar Boyn wrote:
> Hi,
> I use sparse files to organize a DRBD resource.
> I am using build from source drbd-8.4.1.
> I use the default commons with device configured as:
> 
> [root at nodeb ~]# cat /etc/drbd.d/drbd0.res
> resource DRBD0 {
> 
>   syncer {
>     csums-alg md5;
>   }
>   on nodea.cyclone-trading.com <http://nodea.cyclone-trading.com> {
>     device      /dev/drbd0;
>     disk        /dev/loop0;
>     address     192.168.150.128:7791 <http://192.168.150.128:7791>;
>     meta-disk   /dev/loop1[0];
>   }
>   on nodeb.cyclone-trading.com <http://nodeb.cyclone-trading.com> {
>     device      /dev/drbd0;
>     disk        /dev/loop0;
>     address     192.168.150.129:7791 <http://192.168.150.129:7791>;
>     meta-disk   /dev/loop1[0];
>   }
> }
> 
> The underlying loop devices go to sparse files as follows:
> [root at nodeb ~]# losetup -a
> /dev/loop0: [0802]:791356 (/root/LUN0.sparse)
> /dev/loop1: [0802]:791357 (/root/LUN1.sparse)
> [root at nodeb ~]# ll LUN*
> -rw-r--r--. 1 root root 1099511627776 May  9 09:37 LUN0.sparse
> -rw-r--r--. 1 root root     134217728 May  9 08:24 LUN1.sparse
> [root at nodeb ~]# du -h LUN*
> 423M    LUN0.sparse
> 33M     LUN1.sparse
> 
> 
> everything works as expected until I down DRBD0 mark loop0 as read-only
> and then try to "up" the DRBD0 resource:
> 
> [root at nodeb ~]# drbdadm down all
> [root at nodeb ~]# cat /proc/drbd
> version: 8.4.1 (api:1/proto:86-100)
> GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by
> root at NodeA.cyclone-trading.com <mailto:root at NodeA.cyclone-trading.com>,
> 2012-05-09 07:39:38
> 
> [root at nodeb ~]# blockdev --getro /dev/loop0
> 0
> [root at nodeb ~]# blockdev --setro /dev/loop0
> [root at nodeb ~]# blockdev --getro /dev/loop0
> 1
> [root at nodeb ~]# drbdadm up DRBD0
> 0: Failure: (104) Can not open backing device.
> Command 'drbdsetup attach 0 /dev/loop0 /dev/loop1 0' terminated with
> exit code 10
> 
> I will highly appreciate the insight on why using a read-only source is
> a problem - once the metadata device is accessible for writes.
> 
> Many Thanks!
> ./Dimitar Boyn



More information about the drbd-user mailing list