Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Thanks, Felix! If I may - my question still stands.Two points here: 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. 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. 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. I have made additional test - instead of using "blockdev" I used "losetup -r" to set the "read-only" flag on the primary data LUN. 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. My vote goes to classify this as a bug. Dimitar On Fri, May 11, 2012 at 12:49 AM, Felix Frank <ff at mpexnet.de> wrote: > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20120511/5cd9905d/attachment.htm>