I have a Debian Xen DomU which has a DRBD mounted partition. I needed to resize this partition from 46G to 50G. I did the following:
- Stopped DRBD on the secondary node:
/etc/init.d/drbd stop
- Increased the underlying LVM dist to 50 GB:
lvresize -L 50G /lvm/device
- Started DRBD again and waited for the disk to sync:
/etc/init.d/drbd start
- Switched Primaries. And performed the same on the other node.
- Stopped drbd on the now secondary DRBD node:
/etc/init.d/drbd stop
- Increased the underlying LVM:
lvresize -L 50G /lvm/device
- Started DRBD again and waited for the disk to sync:
/etc/init.d/drbd start
- On both nodes issued:
drbdadm resize drbd-device
- On the primary node issued a:
resize2fs /dev/drbd0
I get this response:
$ resize2fs 1.40-WIP (14-Nov-2006)
The filesystem is already 12058624 blocks long. Nothing to do!
Using fdisk, both the drbd0 and the sda device drbd is using report the size of the device as 49392123904. Which is consistent with what resize2fs is saying. (12058624x4096 [blocksize]).
My issue is that df
isn't reporting the change to the disk size.
$ df -B 4096
/dev/drbd0 11869420 11155652 110968 100% /data
I have done this process before and had no issues. Is there something I am missing?
This guy wrote a nice howto about it:
http://theitdepartment.wordpress.com/2008/05/30/howto-resize-a-xen-drbd-lvm-vbd/
You do not need to fiddle with secondary/primary roles. Just do: 1. LVM resize on both sides 2. On the primary side: drbdadm resize RESOURCE (this will also update the meta-device)
Looking at /proc/drbd should show you a resync of the new portion in progress. If this is not the case try "drbdadm adjust RESOURCE" on both sides.
Now resize the unmounted file-system using the primary side /dev/drbd/by-res/RESOURCE