Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
/ 2006-02-19 00:07:34 +0000
\ Casey Allen Shobe:
[ Node1, LBA ]
> /dev/hda3 520 1245 5831595 83 Linux
[ Node2, C/H/S ]
> /dev/hda3 8249 19857 5850936 83 Linux
> hda3 is what drbd0 uses. As you can see the block size is different for each.
> It contains a reiserfs partition and doesn't seem to be causing any
> problems...yet...but it concerns me.
> I don't have any recollection of which machine the filesystem was mkfs'd on.
now. as long as you mkfs'd on /dev/drbdX, as is recommended,
and drbd has been connected while you mkfs'd, all is well.
if not:
below perl scriptlet should help in "guessing" the size occupied by reiserfs
and the size of the device.
save as "get_size_of_reiserfs.pl",
and use like "perl get_size_of_reiserfs.pl /dev/drbd0" on the primary node.
[ remember, if you use drbd "meta-data internal", the /dev/drbdX
is 128MB smaller than the lower level device (/dev/hda3)! ]
if it seems to be larger than the available space on the drbd,
you should shrink the fs as long as you still can.
-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-
#!/usr/bin/perl
@ARGV == 1 or die "usage: $0 device\n";
$device = $ARGV[0];
-b $device or die "$device is not a block device\n";
open B, "<", $device or die "open $device: $!\n";
sysread(B,$data,0x11000) == 0x11000 or die "sysread: $!\n";
if ( "ReIsErFs" eq substr($data,0x10034,8) or
"ReIsEr2Fs" eq substr($data,0x10034,9) )
{
$bnum = unpack "V",substr($data,0x10000,4);
$bsize = unpack "v",substr($data,0x1002c,2);
$size = $bnum * $bsize;
$bd_size = `blockdev --getsize64 $device`;
print "$device:\n";
print "blockdev --getsize64 reports a size of $size Bytes\n";
print "seems to contain a reiserfs of ($bnum \@ $bsize) == $size Bytes\n";
$size /= 1024;
print " == $size KBytes\n";
} else {
die "$device does not look like a reiserfs to me... :(";
}
-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-8<-=-
--
: Lars Ellenberg Tel +43-1-8178292-0 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com :
__
please use the "List-Reply" function of your email client.