[DRBD-user] DRBD unable to do IO tasks - SLES 10 SP2

Carlos Eduardo Pedroza Santiviago segfault at gmail.com
Sat Dec 6 19:31:46 CET 2008

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'm trying to setup 2 servers using drbd, but there's something weird
preventing me to do so.

The two servers are LPARs on IBM p595 using SAN disks, running SLES 10 SP2.

Here is the drbd.conf:

resource r0 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";
  startup {
    wfc-timeout 5;
    degr-wfc-timeout 20;
  }

  disk {
    on-io-error   panic;
  }

  syncer {
    rate 10M;
    group 1;
    al-extents 257;
  }

  on chi02b {
    device     /dev/drbd0;
    disk       /dev/mapper/dados-shared;
    address    10.100.1.102:7788;
    meta-disk  internal;
  }

  on chi02a {
    device    /dev/drbd0;
    disk      /dev/mapper/dados-shared;
    address   10.101.1.102:7788;
    meta-disk internal;
  }

}

On one side (chi02a), i'm able to do everything with the drbd
commands, like drbrsetup /dev/drbd0 primary --do-what-I-say,
formatting /dev/drbd0 with ext3 and so on.

However, on the chi02b side, i cannot use any drbd commands as it
complains about an IO problem, like:
chi02b:/ # rcdrbd restart
Restarting all DRBD resourcesERROR: Module drbd is in use
ioctl(,SET_DISK_CONFIG,) failed: Device or resource busy
Command '/sbin/drbdsetup /dev/drbd0 disk /dev/mapper/dados-shared
internal -1 --on-io-error=panic' terminated with exit code 20
.

But, what is driving me nuts is that i actually can write to the
"/dev/mapper/dados-shared" disk, which is basic logical volume (so, it
cant be a SAN/disk problem):
chi02b:/ # lvdisplay /dev/dados/shared
  --- Logical volume ---
  LV Name                /dev/dados/shared
  VG Name                dados
  LV UUID                P30Kd3-gP38-bY2h-0LL1-Mmch-4fjk-DA2pSw
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GB
  Current LE             1280
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:15

chi02b:/ # mkfs.ext3 /dev/dados/shared
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
655360 inodes, 1310720 blocks
65536 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
chi02b:/ # mount /dev/dados/shared /mnt
chi02b:/ # dd if=/dev/zero of=/mnt/data bs=1k count=500000
500000+0 records in
500000+0 records out
512000000 bytes (512 MB) copied, 3.52 seconds, 145 MB/s
chi02b:/ # ls -la /mnt/data
-rw-r--r-- 1 root root 512000000 Dec  6 16:26 /mnt/data

Another weird thing is that i'm unable to unload drbd module once its loaded:

chi02b:/ # rcdrbd stop
Stopping all DRBD resourcesERROR: Module drbd is in use
.
chi02b:/ # lsmod | grep drbd
drbd                  218984  1
chi02b:/ # rmmod -f drbd
ERROR: Removing 'drbd': Resource temporarily unavailable
chi02b:/ # lsmod | grep drbd
drbd                  218984  1
chi02b:/ # rpm -qa | grep drbd
drbd-kmp-ppc64-0.7.22_2.6.16.60_0.21-42.16
drbd-0.7.22-42.16
chi02b:/ # cat /proc/drbd
version: 0.7.22 (api:79/proto:74)
SVN Revision: 2572 build by lmb at dale, 2006-10-25 18:17:21
 0: cs:Unconfigured
chi02b:/ # drbdadm connect all
chi02b:/ # cat /proc/drbd
version: 0.7.22 (api:79/proto:74)
SVN Revision: 2572 build by lmb at dale, 2006-10-25 18:17:21
 0: cs:WFConnection st:Secondary/Unknown ld:Inconsistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
chi02b:/ # cat /proc/drbd
version: 0.7.22 (api:79/proto:74)
SVN Revision: 2572 build by lmb at dale, 2006-10-25 18:17:21
 0: cs:DiskLessClient st:Secondary/Primary ld:Inconsistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

And why "DiskLessClient"? On chi02a i see:

drbd0: drbd0_receiver [18669]: cstate Unconnected --> WFConnection
drbd0: drbd0_receiver [18669]: cstate WFConnection --> WFReportParams
drbd0: Handshake successful: DRBD Network Protocol version 74
drbd0: PARTNER DISKLESS
drbd0: Connection established.
drbd0: drbd0_receiver [18669]: cstate WFReportParams --> Connected
drbd0: Primary/Unknown --> Primary/Secondary

Any ideais? :-)

-- 
Carlos Eduardo Pedroza Santiviago -- http://softwarelivre.net



More information about the drbd-user mailing list