[SOLVED] Can't create partitions but have lots of free disk space
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Can't create partitions but have lots of free disk space
I am not exactly a newbie, but this problem has me foxed. I have a system that I setup some years ago, so I don't remember how I did it, but the partition table looks like this:
As you see, the various logical partitions 5-9 are inside an extended partition (no. 3). But there is a big chunk of unused space after the end of the extended partition.
parted, fdisk, partition manager all refuse to create a new logical partition because there is no space inside the extended partition. The only option is one primary partition. But I want two new partitions, so I can't use that option.
How can I safely make the extended partition bigger without damaging any of the existing partitions inside it? This is the primary HD of my system, so I am also worried about having file systems mounted, and I may need to boot from a live CD or something.
You're going to have to boot off of live media and use a tool like gparted to expand the extended partition. Because your Linux install resides completely inside the extended partition, it is not possible to do this from within the running system. I found a thread on ask Ubuntu that roughly describes the procedure: http://askubuntu.com/questions/59121...nded-partition .
Make sure you heed the advice given in the answers there to back up your data before you try this. Any mucking about with the partition table is inherently risky IMO and contains a non-zero risk of data loss. In fact, if this system contains data you care about, you should be backing it up regularly anyway, since hard drives can and regularly do fail (sometimes very suddenly - don't rely on smartmontools to give you advanced warning!).
Frankly, I don't know how you did it either. With reference to your partition table, sda3 is the extended partition, which is supposed to equal sda(5+6+7+8+9).
On a sane system, the partitions (totaling 1114.6GB) would be less than, or equal to the extended partition (1016GB)they reside in. Your system fails that basic test, so I can understand why programs are hesitant to operate. Please post the output of
Code:
fdisk -l /dev/sda
in 'Code' tags like this one
Code:
Device Boot Start End Blocks Id System
/dev/sda1 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 14682111 6291456 82 Linux swap
/dev/sda3 14682112 67110911 26214400 83 Linux
/dev/sda4 67110912 468862127 200875608 5 Extended
/dev/sda5 67112960 130027519 31457280 83 Linux
/dev/sda6 130029568 182458367 26214400 83 Linux
/dev/sda7 182460416 468862127 143200856 83 Linux
Code tags are got with the '#' icon. Then we see start & end cylinders. It would appear from the information you have posted that sda7 doesn't exist, and indeed they would add up without it. This might be as simple as verifying that sda7 doesn't exist, then deleting it in fdisk. Can you mount sda7?
Frankly, I don't know how you did it either. With reference to your partition table, sda3 is the extended partition, which is supposed to equal sda(5+6+7+8+9).
It is possible to resize partitions online - particulalrly that extended if space exists contiguous to it. Not recommended - gparted liveCD is my go-to.
Show us the output of this instead - shows what (if any) free space exists
I recently did something similar, so let me give a heads up and a bit of moral support:
The heads up: when I tried to resize the extended partition using gparted from a live boot of Linux Mint 18, it errored out due to an outdated support program. (Apologies, I didn't take the time to note specifics.) But switching to a live boot of Fedora 25, that has a newer gparted, worked nicely.
I unmounted the /dev/sda swap partitions that were auto mounted by the live boot, resized the extended partition to include the rest of the disk (leaving a little unallocated space at the end because I'm superstitious that way), and was then able to successfully create several more logical partitions.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,363
Rep:
For the sake of simplicity, you can get a live boot of GParted only (latest version on a minimal Debian image) for this type of situation. It's faster than live-booting a full (large) distro like Fedora.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.