ext2
If you are using LVM 1 with ext2 as the file system then you can use the e2fsadm command mentioned earlier to take care of both the file system and volume resizing as follows:
# umount /home # e2fsadm -L-1G /dev/myvg/homevol # mount /home
If you prefer to do this manually you must know the new size of the volume in blocks and use the following commands:LVM 2 Caveat There is currently no e2fsadm equivalent for LVM 2 and the e2fsadm that ships with LVM 1 does not work with LVM 2.
# umount /home # resize2fs /dev/myvg/homevol 524288 # lvreduce -L-1G /dev/myvg/homevol # mount /home
reiserfs
Reiserfs seems to prefer to be unmounted when shrinking
# umount /home # resize_reiserfs -s-1G /dev/myvg/homevol # lvreduce -L-1G /dev/myvg/homevol # mount -treiserfs /dev/myvg/homevol /home
xfs
There is no way to shrink XFS file systems.
jfs
There is no way to shrink JFS file systems.
Differences between LVM1 and LVM2
Features | LVM1 | LVM2 |
---|---|---|
RHEL AS 2.1 support | No | No |
RHEL 3 support | Yes | No |
RHEL 4 support | No | Yes |
Transactional metadata for fast recovery | No | Yes |
Shared volume mounts with GFS | No | Yes |
Cluster Suite failover supported | Yes | Yes |
Striped volume expansion | No | Yes |
Max number PVs, LVs | 256 PVs, 256 LVs | 2**32 PVs, 2**32 LVs |
Max device size | 2 Terabytes | 8 Exabytes (64-bit CPUs) |
Volume mirroring support | No | Yes, in Fall 2005 |
Table 1. A comparison of LVM 1 and LVM 2
No comments:
Post a Comment
tag ur valuable ideas below