I am fairly new to LVM and am trying to figure out how to let the OS recognize an extended LV partition once it's been resized. For example: (none):/boot # df -h Filesystem Size Used Avail Use% Mounted on <snip> /dev/mapper/system-tmp 1.0G 33M 992M 4% /tmp (none):/boot # lvextend /dev/system/tmp -L +1GB Extending logical volume tmp to 2.00 GB Logical volume tmp successfully resized (none):/boot # df -h Filesystem Size Used Avail Use% Mounted on <snip> /dev/mapper/system-tmp 1.0G 33M 992M 4% /tmp The system still sees it as 1GB. I've tried unmounting/mounting, rebooting, and searching the system and google for the magical command I'm looking for. Any assistance would be greatly appreciated along with any advice if you think I'm going about the resize incorrectly/stupidly. Thanks! Warren ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
I am fairly new to LVM and am trying to figure out how to let the OS recognize an extended LV partition once it's been resized. For example:
(none):/boot # df -h
Filesystem Size Used Avail Use% Mounted on <snip> /dev/mapper/system-tmp 1.0G 33M 992M 4% /tmp
(none):/boot # lvextend /dev/system/tmp -L +1GB Extending logical volume tmp to 2.00 GB Logical volume tmp successfully resized
(none):/boot # df -h
Filesystem Size Used Avail Use% Mounted on <snip> /dev/mapper/system-tmp 1.0G 33M 992M 4% /tmp
The system still sees it as 1GB. I've tried unmounting/mounting, rebooting, and searching the system and google for the magical command I'm looking for. Any assistance would be greatly appreciated along with any advice if you think I'm going about the resize incorrectly/stupidly.
Thanks! Warren
The answer was the command 'resize_reiserfs' after increasing the lv size for those who are interested. I found this just by playing around in the console with autocomplete. However, if this is not the best method for doing this I'd still be interested in learning more. Thanks, Warren
Quoting Warren Crigger <warren@leetnet.com>:
The answer was the command 'resize_reiserfs' after increasing the lv size for those who are interested. I found this just by playing around in the console with autocomplete.
However, if this is not the best method for doing this I'd still be interested in learning more.
That's right. lvextend extends the volume. Then you must resize the file system to utilize the extra space. If you are using ext2 or ext3 for a file system, the equivalent program is resize2fs. It is often a good idea to check the filesystem before extending it, in fact, resize2fs will suggest that you do a fsck before proceeding. I use ext3 a lot and the process looks like this lvextend -L+5G /dev/system/lvm_root fsck -f /dev/system/lvm_root resize2fs /dev/system/lvm_root -Derek
The answer was the command 'resize_reiserfs' after increasing the lv size for those who are interested. I found this just by playing around in the console with autocomplete.
However, if this is not the best method for doing this I'd still be interested in learning more.
That's right. lvextend extends the volume. Then you must resize the file system to utilize the extra space. If you are using ext2 or ext3 for a file system, the equivalent program is resize2fs. It is often a good idea to check the filesystem before extending it, in fact, resize2fs will suggest that you do a fsck before proceeding. I use ext3 a lot and the process looks like this
lvextend -L+5G /dev/system/lvm_root fsck -f /dev/system/lvm_root resize2fs /dev/system/lvm_root
-Derek
Ok, great. I will be working with ext3 lv's as well and I wasn't sure how to resize those. I did see resize2fs but I assumed that was only for ext2 - so thanks!
participants (3)
-
Derek Dresser
-
Warren Crigger
-
warren@leetnet.com