Ask Your Question
0

I cant resize Fedora19 logical partition

asked 2014-01-19 10:52:30 -0600

Maroš gravatar image

First I apologize for bad English.

I have Win7, Fedora 18 and Fedora 19 installed on my machine and I shrinked F18 partition(/dev/sda4) and moved unallocated area after F19 logical partition(/dev/sda5) to enlarge this partition. It looks like this:

davinci.fmph.uniba.sk/~molek3/ask/ask1.png

My problem is that if I resize sda5 partition, F19 dont know about it and still thinks there is only 2 GB free space. However, every partitioning utility(Gparted, F19 Discs utility) shows that sda5 has size 350 GB.

I tried GParted on sda4, GParted Live USB as well and I tried system-config-lvm, but this utility dont show unallocated space so I cant resize it.

Please, what can I do with it? I beg for walkthrough, because Im not skilled user.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2014-01-19 17:05:56 -0600

deusdara gravatar image

Hi

First you have to enlarge the extended partition which your logical partition (/dev/sda5) is inside.

Then you can enlarge your logical partition.

edit flag offensive delete link more

Comments

Thank you for your answer, but I did enlarge extended partition firstly. Look at this picture: davinci.fmph.uniba.sk/~molek3/ask/ask1.png (sorry, I dont have enough karma to post pictures)

Maroš gravatar imageMaroš ( 2014-01-20 01:53:43 -0600 )edit
0

answered 2014-01-20 04:30:07 -0600

Gileade Oseiass gravatar image

I found this in tldp.org doc / HOWTO / LVM-HOWTO / extendlv.html. I have not had time to test. First do a test on another computer.


To extend a logical volume you simply tell the lvextend command how much you want to increase the size. You can specify how much to grow the volume, or how large you want it to grow to:

lvextend -L12G /dev/myvg/homevol

lvextend -- extending logical volume "/dev/myvg/homevol" to 12 GB lvextend -- doing automatic backup of volume group "myvg" lvextend -- logical volume "/dev/myvg/homevol" successfully extended

will extend /dev/myvg/homevol to 12 Gigabytes.

lvextend -L+1G /dev/myvg/homevol

lvextend -- extending logical volume "/dev/myvg/homevol" to 13 GB lvextend -- doing automatic backup of volume group "myvg" lvextend -- logical volume "/dev/myvg/homevol" successfully extended

will add another gigabyte to /dev/myvg/homevol.

After you have extended the logical volume it is necessary to increase the file system size to match. how you do this depends on the file system you are using.

By default, most file system resizing tools will increase the size of the file system to be the size of the underlying logical volume so you don't need to worry about specifying the same size for each of the two commands.

ext2/ext3

Unless you have patched your kernel with the ext2online patch it is necessary to unmount the file system before resizing it. (It seems that the online resizing patch is rather dangerous, so use at your own risk)


   # umount /dev/myvg/homevol/dev/myvg/homevol
   # resize2fs /dev/myvg/homevol
   # mount /dev/myvg/homevol /home


If you don't have e2fsprogs 1.19 or later, you can download the ext2resize command from ext2resize.sourceforge.net and use that:


   # umount /dev/myvg/homevol/dev/myvg/homevol
   # ext2resize /dev/myvg/homevol
   # mount /dev/myvg/homevol /home


For ext2 there is an easier way. LVM 1 ships with a utility called e2fsadm which does the lvextend and resize2fs for you (it can also do file system shrinking, see the next section).

Warning 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.
so the single command


   # e2fsadm -L+1G /dev/myvg/homevol


is equivalent to the two commands:


   # lvextend -L+1G /dev/myvg/homevol
   # resize2fs /dev/myvg/homevol


Note    Note


You will still need to unmount the file system before running e2fsadm.

reiserfs

Reiserfs file systems can be resized when mounted or unmounted as you prefer:

    Online:


       # resize_reiserfs -f /dev/myvg/homevol


    Offline:


       # umount /dev/myvg/homevol
       # resize_reiserfs /dev/myvg/homevol
       # mount -treiserfs /dev/myvg/homevol /home


xfs

XFS file systems must be mounted to be resized and the mount-point is specified rather than the device name.


   # xfs_growfs /home


jfs

Just like XFS the JFS file system must be mounted to be resized and the mount-point is specified rather than the device name. You need at least Version 1.0.21 of the jfs-utils ...
(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-01-19 10:52:30 -0600

Seen: 625 times

Last updated: Jan 20 '14