LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to enlarge logical partition in linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-enlarge-logical-partition-in-linux-897534/)

Wonder 08-16-2011 12:36 AM

How to enlarge logical partition in linux?
 
CentOS linux 5.4
/dev/sda is a 2000 GB harddrive.

parted gives the following information:

Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 2000GB 2000GB extended
5 64.5kB 1000GB 1000GB logical ext2


I want to enlarge logical partition 5 to 2000GB.
In parted i execute:
resize 5 64.5kB 2000GB

It gives me: Error: File system has an incompatible feature enabled.

How can i enlarge logical partition in linux?

trscookie 08-16-2011 10:12 AM

I would use gparted if you have the option, it looks like resize is used for the terminal:

man:
resize - set TERMCAP and terminal settings to current xterm window size

I think that you require LVM partitions to allow easy resizing.

frankbell 08-16-2011 09:47 PM

CentOS by default uses LVM. If your CentOS is using LVM, this might help:

http://www.gnu.org/software/parted/m...ted.html#SEC66

trist007 08-18-2011 01:05 AM

Code:

lvresize -r -L <whatever value you want to resize to> <name of vol group>    // this assumes there's room left to grab in the volume group
This(-r options) will resize the partition in addition to resizing the lvm.

You can check the size allocated and free from the volume group with
Code:

vgdisplay


All times are GMT -5. The time now is 04:55 PM.