Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi Lars, I changed the drbd.conf to: on dlssi3 { device=/dev/nbd/0 disk=/dev/hde2 address=15.70.191.200 port=7788 meta-disk=/dev/hde5 meta-index=0 } where /dev/hde2 is 10G and /dev/hde5 is 1G. I'm attaching a file with the output of starting the drbd device and the fsck failure. Also attached is the drbd.conf. Note that the second node has not been started at this point. What am I doing wrong? En Chiang On Thu, 2004-03-25 at 22:02, Lars Ellenberg wrote: > / 2004-03-25 20:09:41 +0530 > \ En Chiang Lee: > > Hi, > > > > I was trying to mirror an existing ext3 filesystem using drbd to another > > node in an OpenSSI cluster, so I associated /dev/nbd/0 with /dev/hde2. > > > > on dlssi3 { > > device=/dev/nbd/0 > > disk=/dev/hde2 > > address=15.70.191.200 > > port=7788 > > meta-disk=internal > ^^^^^^^^ > > > meta-index=-1 > > } > > > > With this, I am able to mount the filesystem. However, when I try fsck > > on /dev/nbd/0, I get the following error: > > > > [root at dlssi3 root]# fsck /dev/nbd/0 > > fsck 1.32 (09-Nov-2002) > > e2fsck 1.32 (09-Nov-2002) > > /: recovering journal > > The filesystem size (according to the superblock) is 2560351 blocks > > The physical size of the device is 2527583 blocks > > Either the superblock or the partition table is likely to be corrupt! > > Abort<y>? yes > > > (2560351-2527583) * (4K blocks) == 128 M > > you pretty likely already corrupted the underlying filesystem > (at least the last 128M of it). > > If you want to have "meta-disk=internal", > the right way to go is to create the filesystem on the /dev/nbd/0, > then it will get the right size. > > > > In the archives, there is mention of using "size=<somesize>", but that > > is deprecated according the the sample drbd.conf. (If I was to use size= > > how would the value be specified? fs blocks? GB?) > > the size parameter is in 1K, but also takes M and G as unit modifiers. > > > I'm trying this with drbd-0.7_pre5. > > > > How would I go about using drbd on an existing file system? > > You can have the meta data in some other device (not internal), and > adjust the meta-disk and meta-index accordingly. > > OR you can resize (shrink) the file system first. > *BEFORE* the last 128M of the device get overwritten with bitmap data. > > Lars Ellenberg > _______________________________________________ > drbd-user mailing list > drbd-user at lists.linbit.com > http://lists.linbit.com/mailman/listinfo/drbd-user > -------------- next part -------------- [root at dlssi3 /]# cat /proc/drbd version: 0.7-pre5 (api:72/proto:72) 0: cs:Unconfigured 1: cs:Unconfigured [root at dlssi3 /]# mkfs -t ext3 /dev/hde2 mke2fs 1.32 (09-Nov-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1281696 inodes, 2560359 blocks 128017 blocks (5.00%) reserved for the super user First data block=0 79 block groups 32768 blocks per group, 32768 fragments per group 16224 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root at dlssi3 /]# drbdadm up r0 [root at dlssi3 /]# drbdadm primary r0 [root at dlssi3 /]# cat /proc/drbd version: 0.7-pre5 (api:72/proto:72) 0: cs:WFConnection st:Primary/Unknown ld:Consistent ns:0 nr:0 dw:0 dr:0 al:0 bm:2571 lo:0 pe:0 ua:0 1: cs:Unconfigured [root at dlssi3 /]# fsck /dev/nbd/0 fsck 1.32 (09-Nov-2002) e2fsck 1.32 (09-Nov-2002) The filesystem size (according to the superblock) is 2560359 blocks The physical size of the device is 320044 blocks Either the superblock or the partition table is likely to be corrupt! Abort<y>? yes [root at dlssi3 /]# [root at dlssi3 /]# blockdev --getsize /dev/nbd/0 2560358 [root at dlssi3 /]# blockdev --getsize /dev/hde2 20482875 [root at dlssi3 /]# -------------- next part -------------- resource "r0" { protocol = B incon-degr-cmd="halt -f" startup { wfc-timeout=10 # wait for 10 seconds for connection otherwise continue degr-wfc-timeout=10 # 2 minutes. } disk { on-io-error = panic } syncer { rate=10M group=1 al-extents=257 } on dlssi3 { device=/dev/nbd/0 disk=/dev/hde2 address=15.70.191.200 port=7788 meta-disk=/dev/hde5 meta-index=0 } on dlssi1 { device=/dev/nbd/0 disk=/dev/ida/c0d0p3 address=15.70.191.198 port=7788 meta-disk=internal meta-index=-1 } }