[DRBD-user] How to shrink a filesystem safely with DRBD

Lars Ellenberg Lars.Ellenberg at linbit.com
Sat Sep 17 20:59:55 CEST 2005


/ 2005-09-17 11:17:00 +0200
\ trickytools:
> Hello,
> 
> I had to activate drbd on top of an existing filesystem (ext3).
> I reduced the filesystem size  to make drbd able to store its internal data.
> 
> After some test I got the following message:
> 
> "drbd1: attempt to access beyond end of device"
> 
> According to the mailing list archive it seems the size of the ext3 fs and
> the size of drbd differ.
> I understand what is the size of the ext3 fs, but what is the size
> considered by drbd, the partition size ?
> 
> Here are the commands I used (/dev/sda3 partition size is initially equal to
> 10Go):

just for the rest of the world: Go is Giga octets (french for byte)

now, it would be interessting what exactly "G" is, here.
1000*1000*1000 ? 1024*1024*1024 ?

> # umount /dev/sda3
> # e2fsck -f /dev/sda3
> # resize2fs /dev/sda3 9800M

the same for "M", here.
but I guess it is 1024*1024 in resize2fs.
9800 * 1024 * 1024 == 10276044800

how sure are you about those 10 "giga" byte ?

> # e2fsck -f /dev/sda3
> # drbdadm attach myresource
> # drbdadm connect myresource
> # drbdadm primary myresource

you probably needed to --do-what-I-say, right?

> # drbdadm invalidate myresource

you hopefully did invalidate on the other node, right?

> # mount /dev/drbd1 ....

btw, how big is the device on the other node?

and what does drbd say in the kernel log about the device size?
the lines about "creating state block... bits in bitmap ... etc."

on a tangent, is this file system nfs exported?

-- 
: 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.



More information about the drbd-user mailing list