reducing ext3 lvm's.
Hey guys,
I am trying to resize an LVM from 5000mb to 1000mb. It is currently using an ext3 filesystem. I need to be able to do this without losing any data that is on the partition. Now after doing a bit of research I came across the example: umount /home e2fsadm −L−1G /dev/myvg/ mount /home Now i know this will certainly work with an ext2 filesystem, but what about ext3? any comments are appreciated. cheers. |
hey guys,
I found a solution to this: Quote:
|
lvm2 on rhel 4 does not have e2fsadm(it's obsolete).
[root@d400-image ~]# lvresize --resizefs -L 1M /dev/lvm-hdx/lvm0 /dev/cdrom: open failed: Read-only file system Rounding up size to full physical extent 4.00 MB fsadm: execlp failed: No such file or directory fsadm failed: 2 Is there any solution in rhel 4 with NO e2fsadm but still want to shirnk the lv??? |
resize2fs, then lvreduce.
|
resize2fs does not exist on rhel 4
|
resize2fs /dev/lvm-hdx/lvm0 +100M
umount /dev/lvm-hdx/lvm0 lvreduce -L +100M /dev/lvm-hdx/lvm0 mount /dev/lvm-hdx/lvm0 ex2online /dev/lvm-hdx/lvm0 Shankar RHCE |
Did anyone test this?
I needed to decrease a LV from 2GB to 1GB. I followed a similar method online, but now I have an error when I try and fsck, here's what I did: Code:
$ umount /my/mount/point Thanks, |
Fixed it:
Code:
$ e2fsck -f /lv/device/path |
All times are GMT -5. The time now is 12:53 PM. |