I'm configuring a kvm hosting machine with the following device stack:
Code:
rootfs swap
| /
lvol lvol
| /
vg
boot |
\ pv
\ |
drbd
|
lvol
|
vg
|
pv
|
/dev/sda
|
3ware
/ \
d1 d2
So here is the problem. The lvol is too small. I shut down the guestVM, unattached the drbd driver, and extended the lvol size.
Now how do I run resize2fs on the second partition of the hard drive image in the lvol? I found a neat trick to mount the partition with the following offest:
Code:
dan@xen:~$ sudo parted /dev/mapper/vg-ftl_www unit B print
[sudo] password for dan:
Model: Linux device-mapper (dm)
Disk /dev/mapper/vg-ftl_www: 10737418240B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32256B 106928639B 106896384B primary ext3 boot
2 106928640B 10733990399B 10627061760B primary lvm
Any ideas short of dumping the entire lvol, split it, resize and reassemble? Google has failed me, and it hasn't in a very, very long time.