repair "lvextend-instead-of-e2fsadm" usage
Quoted 10 lines · Jens,
thanks to all for the last hints ... it works (sort of). Now I've done something stupid - I've installed a new HDD and
pvcreate /dev/hdb1 vgextend /dev/vg01 /dev/hdb1 vgdisplay /dev/vg01 -> 3737 free 4MB extents lvextend +l 3737 /dev/vg01/homeinstead of using "e2fsadm" to resize the file system as well.
Quoted 7 lines
Is there a way to use resize2fs to get the same result, or would I have to (can I?) "lvreduce -l -3737 ..." the volume group first? How does the "reducing" work, does it just cut off the end?
The Trouble Is(tm), umounting the /home partition would include explaining to 200 scientists why and how long they cannot access their precious data, and I *really* don't want to go into details here. =;()
In either case, you will still have to unmount the filesystem in order to do the resize, unless you have my online resize patch in your kernel already.
If you _unmount_ your filesystem, you can simply use:
resize2fs /dev/vg01/home
(i.e. don't specify the size) and it will extend the filesystem to the full size of the partition. Note that using resize2fs will be much faster than doing e2fsadm, because you don't really need an fsck before doing the resize, but e2fsadm does it anyways.
If you have the online resize patch in your kernel already, but didn't do a "prepare" on the filesystem for resizing, you will still be able to do a resize to the next 16GB boundary, which may or may not be enough to use up all of the newly allocated PEs.
I have updated e2fsadm to call either ext2online or (resize2fs or ext2resize) depending on what is available and if the filesystem is mounted or not. I will send a patch to linux-lvm shortly.
Cheers, Andreas
Signature · 3 lines
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- DogbertQuoted 7 lines · Andreas Dilger
Quoted 3 lines · Jens,
... The Trouble Is(tm), umounting the /home partition would include explaining to 200 scientists why and how long they cannot access their precious data, and I *really* don't want to go into details here. =;()
resize2fs
/dev/vg01/home
That's what I did. I managed to shutdown the database and umount /home and do this by staying at work till 8pm =;()
Thanks. :)
Quoted 4 lines
(i.e. don't specify the size) and it will extend the filesystem to the full size of the partition. Note that using resize2fs will be much faster than doing e2fsadm, because you don't really need an fsck before doing the resize, but e2fsadm does it anyways.
well... resize2fs told me I should check the FS, and because this is production data, I did it. Just to be sure.
Quoted 1 line
If you have the online resize patch in your kernel already, but didn't do
I didn't even know it existed. =;)
Quoted 3 lines
I have updated e2fsadm to call either ext2online or (resize2fs or ext2resize) depending on what is available and if the filesystem is mounted or not. I will send a patch to linux-lvm shortly.
OK. Great work :)
What I am still somewhat missing in LVM is "cosmetics". I suppose there is no easy way to integrate all those tools into one consistent UI (needn't be "G"UI) so that they are not used in the wrong order ... or is there?
Signature · 3 lines
ciao, Jens (mailaddr im Header) http://www.pinguin.conetix.de "Schiebe nie etwas auf Boshaftigkeit, was http://www.hitch-hiker.de ausreichend durch Dummheit erklärt werden kann." http://www.linuxfaq.de