
| This forum is proudly powered by Scientific Linux 6 | SL website Download SL Help Search Members |
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| zeusys |
|
|||
|
SLF Newbie Group: Members Posts: 1 Member No.: 378 Joined: 4-July 11 |
Hi I want to resize LogVol00 which is mounted as / partition. I need to know if it's possible to resize it (-2GB) or not ? and if yes, how I can do that? After that I want to use this released space as my swap.How I can access to that free space using fdisk?
|
|||
| scottro |
Posted: Jul 12 2011, 07:52 PM
|
|
|
SLF Member ![]() ![]() ![]() Group: Members Posts: 54 Member No.: 49 Joined: 14-April 11 |
Reducing volumes always has a bit of risk. Not that much risk, but a bit...it also takes longer than enlarging.
http://tldp.org/HOWTO/LVM-HOWTO/reducelv.html Has a reasonable writeup on it. |
|
| spoovy |
Posted: Jul 12 2011, 08:18 PM
|
|
![]() SLF Moderator ![]() ![]() ![]() ![]() Group: Moderators Posts: 281 Member No.: 5 Joined: 8-April 11 |
Doesn't system-config-lvm support shrinking volumes?
-------------------- |
|
| scottro |
Posted: Jul 12 2011, 10:57 PM
|
|
|
SLF Member ![]() ![]() ![]() Group: Members Posts: 54 Member No.: 49 Joined: 14-April 11 |
Hrrm, probably does. I've never used it. To be honest, I haven't found myself, in a long time, having a need to shrink--usually, it's just been swap, where a default install made it too large, and I forgot until afterwards. When that happens, I just delete it, enlarge what I need to enlarge, then re-create.
It's a pity that disk druid, which is a pretty easy to use partitioning tool, is only available during install, as far as I know. Gparted doesn't handle LVM and the system-config-lvm tool is somewhat limited, not showing you if there's an existing non LVM partition that you'll wind up destroying. |
|
| NeoAmsterdam |
Posted: Jul 13 2011, 05:05 AM
|
|
![]() SLF Geek ![]() ![]() ![]() ![]() Group: Members Posts: 156 Member No.: 181 Joined: 16-May 11 |
Last time I tried with system-config-lvm, it deleted the existing LVM and created a new one in its place.
Since the drives comprising the LVM had no data, there was no risk*. But I'd prefer to use the command line as per the LVM How-To if there's anything that needs be kept on the LVM. * Back up early, and back up often. |
|
| helikaon |
Posted: Jul 13 2011, 08:00 AM
|
|||||||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 514 Member No.: 4 Joined: 8-April 11 |
Hi, is the volume filling up whole space of the VG or is there some space left there? Is this only volume you have in the volume group? post here output of: # vgdisplay Anyway, i suppose, you have this scenario: 1. Whole HDD taken by one VG (volume group) and the space of VG whole taken by one LV (logical volume). 2. you want to create new LV for swap entirely ... here comes to my mind big Question - where is your swap located now? Is there any? :-) Basic law for playing with LVM: 1. to downsize (decrease, shrink) size of LV (logical volume) you need to FIRST UNMOUNT the FS that is created on the LV 2. to increase size of LV, you can SAFELY do it WHILE the FS is MOUNTED Procedure: 1. reduce filesystem (suppose its ext3 FS, maybe ext4 right?) => unmounting REQUIRED => you need to boot from bootable CD so that your root FS is not active and mounted! 2. shrink LV LogVol00 3. create new LV in the freed space NOTE: here we have problem - your only existing LV is mounted as root partition ("/"). Therefore you can not shrink it while system is booted - remember the FS has to be unmounted first - and unfortunatelly you can NOT unmount root FS (which makes sense ofc) So you need to boot from bootable CD. Commands to resize
now you'd have roughly 20GB free space on VG - check it with
Command to crate LV and tag it as swap
Done. Remember, this is done while you're booted of the boot CD. cheers, This post has been edited by helikaon: Jul 13 2011, 09:03 AM -------------------- |
|||||||
![]() |
![]() ![]() ![]() |