Resize Exended Partition with logical volume and ext4 file system
Hi,
I made the mistake to partition my disk with a first partition that I do not want to change and a second extended partition that takes all the remaining space (~700 GB) that is an extended partition managed by Logical Volume and formatted as ext4 sudo fdisk -l Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x000ea3cf Device Boot Start End Blocks Id System /dev/sda1 * 2048 499711 248832 83 Linux /dev/sda2 501758 1465147391 732322817 5 Extended Partition 2 does not start on physical sector boundary. /dev/sda5 501760 1465147391 732322816 8e Linux LVM Disk /dev/mapper/kubuntu-root doesn't contain a valid partition table I do not understand why I have the message about not containing a valid partition table. Can I do something about it ? The partitioning was done automagically when I installed Kubuntu 12.10. The extended partition is managed by logical volume $ pvscan PV /dev/sda5 VG kubuntu lvm2 [698.39 GiB / 0 free] Total: 1 [698.39 GiB] / in use: 1 [698.39 GiB] / in no VG: 0 [0 ] Now I want to shrink this partition, and it is used only 13% $ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/kubuntu-root 712656568 84080712 592375000 13% / So I have plenty of space to shrink. The problem is that GParted does not allow me to do this! GParted dialog box to resize partition tells me that the minimum size is equal to the maximum size , equal to the partition size. Therefore I cannot shrink it ! What can I do ? Should I resize the logical volume first ? resize the file system? Of course, I want to do this without reformatting my extended partition and restart everything from scratch. I want to resize my LVM to a smaller size, then resize the current extended partition to be smaller and create a new partition at the end of disk. What should I do ? HELP ! |
First thing - go back and use [code]...[/code] tags around the outputs in your initial post so we can read them.
Quote:
tldp.org has a how-to for LVM - it discusses how to resize lv's safely. Redhat/Fedora also offer system-config-lvm as a GUI front-end - other distros may have similar. There is no obvious need to reduce the extended, you could shrink the lv and simply use another logical(s) for your new partition(s). I find that a more flexible solution. |
what to do ?
Hi,
Thanks for the reply. So what is the next step for me ? I suppose I should take a live CD, then i should resize the file system, using which command to resize an ext4 fs ? after I resize the file system, then I resize the logical volume using lvreduce ?? after that Gparted will make it possible to create a new partition ? I want to have a dual boot to (a) boot from my current logical volume or (b) boot from a new partition I want to create after my logical volume How do I do that without deleting everything ? Thanks for the help -- vj |
All times are GMT -5. The time now is 09:20 AM. |