[DRBD-user] Quotacheck problem with drbd

Diego Julian Remolina dijuremo at ibb.gatech.edu
Mon Mar 14 18:54:05 CET 2005

Problem solved, 

Thanks to Eugene Crosser for pointing out my mistake.  I am sending this message
for the list in case anybody else runs into a similar problem.

The quotacheck problem was due to the fact that I had originally format the
physical partition /dev/sda6 as opposed to the drbd device /dev/drbd0.  I had
some data in /dev/sda6 and I though I could move to drbd without reformatting
it. Everything worked fine except quotacheck using the previous method.  Maybe
it can be done, but I did not follow the required steps, which I do not know upt
to this point.  If anyone could comment on how to do this, that would be great.

I took the opportunity to repartition my drive and set a separate partition for
metadata.  From my experience with Solaris Volume manager, you want to have your
metadata in a separate partition, what is the experts opinion for drbd?

What I did:
I deleted /dev/sda/6 and recreated it 1GB smaller.
I created a 1GB partition on /dev/sda7 for metadata.

[root at arwen /]# fdisk -l /dev/sda
Disk /dev/sda: 586.7 GB, 586774740992 bytes
255 heads, 63 sectors/track, 71337 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1318    10482412+  83  Linux
/dev/sda3            1319        3929    20972857+  83  Linux
/dev/sda4            3930       71337   541454760    5  Extended
/dev/sda5            3930        4190     2096451   82  Linux swap
/dev/sda6            4191       71209   538330086   83  Linux
/dev/sda7           71210       71337     1028128+  83  Linux

I then rebooted for the partition table to take effect in the kernel and ran
drbdsetup (you may want to run it with -d first to see what will be done):

[root at arwen ~]# drbdadm adjust export
/sbin/drbdsetup /dev/drbd0 disk /dev/sda6 /dev/sda7 0 --on-io-error=detach
/sbin/drbdsetup /dev/drbd0 syncer --rate=30M --group=1 --al-extents=257
/sbin/drbdsetup /dev/drbd0 net C

Next I forced this server to be the primary.
drbdsetup /dev/drbd0 primary --do-what-I-say

Then I created the filesystem with mkfs directly on the drbd device and used
tune2fs to disable mount count and interval checking:
mkfs -j /dev/drbd0
tune2fs -c -1 -i 0 /dev/drbd0

I finally mounted /dev/drbd0 on /export with quota support and rsynced all data

Next, did the exact same thing on the second server and the sync started when I
started drbd from the init script on the master.

quotacheck works fine now:
[root at arwen /]# quotacheck -ugmv /export/
quotacheck: Scanning /dev/drbd0 [/export] done
quotacheck: Checked 538 directories and 3223 files

# please have a a look at the example configuration file in
# /usr/share/doc/drbd.conf
resource export {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";
  startup {
    wfc-timeout         0;  ## Infinite!
    degr-wfc-timeout   60;  ## 2 minutes.
  disk {
    on-io-error detach;
  net {
    # timeout           60;
    # connect-int       10;
    # ping-int          10;
    # max-buffers     2048;
    # max-epoch-size  2048;
  syncer {
    rate   60M;
    group   1;
    al-extents 257;

  on arwen.ibb.gatech.edu {
    device      /dev/drbd0;
    disk        /dev/sda6;
    meta-disk   /dev/sda7[0];

  on aragorn.ibb.gatech.edu {
    device     /dev/drbd0;
    disk       /dev/sda6;
    meta-disk  /dev/sda7[0];

---------------end drbd.conf------------------------------------


Quoting Diego Julian Remolina <dijuremo at ibb.gatech.edu>:

> Hi,
> First let me say that drbd setup is really easy and works great.  I have two
> machines running RHEL 4 with drbd and heartbeat just fine.  I am currently
> running samba and trying to implement NFS4 with sec=krb5p support on them.
> I found a problem with quota support and was wondering if this is a known
> issue.
> My drbd device is mounted in /export as shown below:
> [root at arwen export]# mount | grep drbd
> /dev/drbd0 on /export type ext3 (rw,usrquota,grpquota)
> If I stop drbd, mount the physical device /dev/sda6 on /export and run
> quotacheck, then the command succeeds and the files aquota.user and
> aquota.group
> get updated correctly.  However, when I am using drbd, I run quotacheck and
> it
> fails as shown:
> root at arwen export]# quotacheck -u -g -m /export
> quotacheck: Something weird happened while scanning. Error 2133571361
> [root at arwen export]# quotacheck -v -u -g -m /export
> quotacheck: Scanning /dev/drbd0 [/export] quotacheck: Something weird
> happened
> while scanning. Error 2133571361
> Any ideas?
> Thanks,
> Diego
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

This mail sent through IMP: http://horde.org/imp/

More information about the drbd-user mailing list