how can i extend a partition knowing that All primary partitions are in use
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how can i extend a partition knowing that All primary partitions are in use
hi,
i'm newbie
i have a vm with 100G i added ~50Gi
now i need to apply it
the problem is i dont have available partitions
fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006f595
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 41940991 20719617 5 Extended
/dev/sda3 41940992 104857599 31458304 8e Linux LVM
/dev/sda4 104857600 209715199 52428800 8e Linux LVM
/dev/sda5 501760 41940991 20719616 8e Linux LVM
Command (m for help): n
All primary partitions are in use
Adding logical partition 6
No free sectors available
Disk /dev/sda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006f595
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 41940991 20719617 5 Extended
/dev/sda3 41940992 104857599 31458304 8e Linux LVM
/dev/sda4 104857600 209715199 52428800 8e Linux LVM
/dev/sda5 501760 41940991 20719616 8e Linux LVM
You have boxed yourseof in quite effectively. Since your extended partition is sandwiched in between other primary partitions and thus cannot be expanded, the only thing you can do without completely reorganizing the disk is to expand sda4. You can then use pvresize and vgextend to make that space available to the existing volume group, and then either create new LVs there or extend the existing LVs into that space.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.