Thanks, Felix!<div>If I may - my question still stands.Two points here:</div><div>1. The configuration I posted was for a "2 minutes to reproduce on any machine" purpose. I have done the same with FC exported LUNs with Read-Only set on the storage device with the same result.<br>
2. I have read Florian's comment however while entertaining and pointing a real eventual problem it is not a reason to condemn the concept - sparse virtual disks are widely used in virtualization and to make things worse accessed through NFS.</div>
<div>Proper resource planning and making sure how one's application use disk IO take us a long way and away from contention memory pressure situations.</div><div><br></div><div>I have made additional test - instead of using "blockdev" I used "losetup -r" to set the "read-only" flag on the primary data LUN.</div>
<div>It turns out that this way DRDB does not catch the "read-only" state of the underlying device and enables the drbd resource allowing it to sync to the remote target. Of coarse mounting is possible in "ro" mode.</div>
<div><br></div><div>My vote goes to classify this as a bug. </div><div>Dimitar</div><div><br><div class="gmail_quote">On Fri, May 11, 2012 at 12:49 AM, Felix Frank <span dir="ltr"><<a href="mailto:ff@mpexnet.de" target="_blank">ff@mpexnet.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I don't really see what the issue is, but I would definitely like to<br>
bring this back up:<br>
<br>
<a href="http://lists.linbit.com/pipermail/drbd-user/2011-May/016009.html" target="_blank">http://lists.linbit.com/pipermail/drbd-user/2011-May/016009.html</a><br>
<br>
So this may end your problems "the other way" ;-)<br>
<br>
Cheers,<br>
Felix<br>
<div class="im"><br>
On 05/11/2012 03:24 AM, Dimitar Boyn wrote:<br>
> Hi,<br>
> I use sparse files to organize a DRBD resource.<br>
> I am using build from source drbd-8.4.1.<br>
> I use the default commons with device configured as:<br>
><br>
> [root@nodeb ~]# cat /etc/drbd.d/drbd0.res<br>
> resource DRBD0 {<br>
><br>
> syncer {<br>
> csums-alg md5;<br>
> }<br>
</div>> on <a href="http://nodea.cyclone-trading.com" target="_blank">nodea.cyclone-trading.com</a> <<a href="http://nodea.cyclone-trading.com" target="_blank">http://nodea.cyclone-trading.com</a>> {<br>
> device /dev/drbd0;<br>
> disk /dev/loop0;<br>
> address <a href="http://192.168.150.128:7791" target="_blank">192.168.150.128:7791</a> <<a href="http://192.168.150.128:7791" target="_blank">http://192.168.150.128:7791</a>>;<br>
> meta-disk /dev/loop1[0];<br>
> }<br>
> on <a href="http://nodeb.cyclone-trading.com" target="_blank">nodeb.cyclone-trading.com</a> <<a href="http://nodeb.cyclone-trading.com" target="_blank">http://nodeb.cyclone-trading.com</a>> {<br>
> device /dev/drbd0;<br>
> disk /dev/loop0;<br>
> address <a href="http://192.168.150.129:7791" target="_blank">192.168.150.129:7791</a> <<a href="http://192.168.150.129:7791" target="_blank">http://192.168.150.129:7791</a>>;<br>
<div class="im">> meta-disk /dev/loop1[0];<br>
> }<br>
> }<br>
><br>
> The underlying loop devices go to sparse files as follows:<br>
> [root@nodeb ~]# losetup -a<br>
> /dev/loop0: [0802]:791356 (/root/LUN0.sparse)<br>
> /dev/loop1: [0802]:791357 (/root/LUN1.sparse)<br>
> [root@nodeb ~]# ll LUN*<br>
> -rw-r--r--. 1 root root 1099511627776 May 9 09:37 LUN0.sparse<br>
> -rw-r--r--. 1 root root 134217728 May 9 08:24 LUN1.sparse<br>
> [root@nodeb ~]# du -h LUN*<br>
> 423M LUN0.sparse<br>
> 33M LUN1.sparse<br>
><br>
><br>
> everything works as expected until I down DRBD0 mark loop0 as read-only<br>
> and then try to "up" the DRBD0 resource:<br>
><br>
> [root@nodeb ~]# drbdadm down all<br>
> [root@nodeb ~]# cat /proc/drbd<br>
> version: 8.4.1 (api:1/proto:86-100)<br>
> GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by<br>
</div>> <a href="mailto:root@NodeA.cyclone-trading.com">root@NodeA.cyclone-trading.com</a> <mailto:<a href="mailto:root@NodeA.cyclone-trading.com">root@NodeA.cyclone-trading.com</a>>,<br>
<div class="HOEnZb"><div class="h5">> 2012-05-09 07:39:38<br>
><br>
> [root@nodeb ~]# blockdev --getro /dev/loop0<br>
> 0<br>
> [root@nodeb ~]# blockdev --setro /dev/loop0<br>
> [root@nodeb ~]# blockdev --getro /dev/loop0<br>
> 1<br>
> [root@nodeb ~]# drbdadm up DRBD0<br>
> 0: Failure: (104) Can not open backing device.<br>
> Command 'drbdsetup attach 0 /dev/loop0 /dev/loop1 0' terminated with<br>
> exit code 10<br>
><br>
> I will highly appreciate the insight on why using a read-only source is<br>
> a problem - once the metadata device is accessible for writes.<br>
><br>
> Many Thanks!<br>
> ./Dimitar Boyn<br>
</div></div></blockquote></div><br><br>
</div>