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.
As I screwed my linux install (the home folder is encrypted and through a series of unfortunate events, I know cannot decrypt it) I want to make another partition on the HDD and install linux mint to that partition, so I don't have to work from a live USB anymore. However, GParted won't resize the partition.
I Tried
I started GParted from the start menu, selected the prober hdd, and hit 'move/resize'. However, it says the minimum size is ~900 GB (almost the entire hard drive) even though there's only around 100GB used (which is what the file system shows me). Therefore, I can't decrease the partition size, even though it should be mostly empty.
I tried running GParted as root, to see if that helps, but the terminal gave the below response.
Code:
sudo gparted
======================
libparted : 2.3
======================
(gpartedbin:6758): GLib-CRITICAL **: Source ID 7 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 6 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 26 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 25 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 303 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 302 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 307 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 306 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 312 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 311 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 315 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 314 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 319 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 318 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 322 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 321 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 327 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 326 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 330 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 329 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 333 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 332 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 897 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 896 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 931 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 930 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1119 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1118 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1146 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1145 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1150 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1149 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1153 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1152 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1158 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1157 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1161 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1160 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1166 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1165 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1171 was not found when attempting to remove it
(gpartedbin:6758): GLib-CRITICAL **: Source ID 1170 was not found when attempting to remove it
I have tried to find a solution through DuckDuckGo, as well as the search on this forum, but I have been unsuccessful. The tutorials I find, all show the partition with unused space, but my GParted shows it is used almost entirely, with only 12 MiB unused.
Any help would be much appreciated, as I really don't want to format the entire HDD, because I still have hope of getting access to the encrypted folders which hold quite some files I can't easily replace (KeePass database, work-related stuff, research material and articles I wrote. There's many days of work in there).
relevant info
I'm running Linux Mint 17.2 on an external HDD, as my internal HD died months ago. It's the XFCE edition of Mint. I've been using Linux for around 6-8 months, so I have working knowledge of the terminal and most of the software on here, but I am not very familiar with the underlying workings of the OS.
Edit:
I just noticed the partition has an LVM flag. I imagine that could have something to do with it, but I don't know how this applies to the actions I have to undertake. I'll be looking for a solution and updating this question if I find anything. In the meantime, any help is still highly appreciated.
Last edited by Delusion of Adequacy; 02-24-2016 at 07:49 AM.
Reason: formatting - additional info
The above comment would indicate to me that you are running GParted from an installed system. You can't modify partitions from a running system that is mounted. It's always simpler to use GParted from the installation medium if you have it and Mint does. You could also download GParted and put it on a bootable CD. You need to unmount any partition before you resize or try to modify it in any way.
I don't use LVM but I think you can do it with a newer version of GParted. Check the link below or do an online search for "resize lvm partitons with GParted".
The above comment would indicate to me that you are running GParted from an installed system.
I'm running it from a live USB with Linux Mint 17.2
Quote:
Originally Posted by yancek
I don't use LVM but I think you can do it with a newer version of GParted. Check the link below or do an online search for "resize lvm partitons with GParted".
I can't see your link, but I'll see what else I can find.
Now at least GParted shows the partition as having unused space. However, when I now try to resize the partition down to the amount of space it actually uses, I get the below result.
What am I missing here?
Code:
GParted 0.18.0 --enable-libparted-dmraid --enable-online-resize
Libparted 2.3
Shrink /dev/sda5 from 931.24 GiB to 145.27 GiB 00:00:01 ( ERROR )
calibrate /dev/sda5 00:00:01 ( SUCCESS )
path: /dev/sda5
start: 501760
end: 1953456127
size: 1952954368 (931.24 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them 00:00:00 ( SUCCESS )
lvm pvck -v /dev/sda5
Found label on /dev/sda5, sector 1, type=LVM2 001
Found text metadata area: offset=4096, size=1044480
Scanning /dev/sda5
Found LVM2 metadata record at offset=14848, size=512, offset2=0 size2=0
Found LVM2 metadata record at offset=13312, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=11776, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=10240, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=8704, size=1536, offset2=0 size2=0
shrink file system 00:00:00 ( ERROR )
lvm pvresize -v --setphysicalvolumesize 152330240K /dev/sda5
0 physical volume(s) resized / 1 physical volume(s) not resized
Using physical volume(s) on command line
Archiving volume group "mint-vg" metadata (seqno 8).
/dev/sda5: Pretending size is 304660480 not 1952952320 sectors.
Resizing volume "/dev/sda5" to 1952952320 sectors.
Resizing physical volume /dev/sda5 from 0 to 37189 extents.
/dev/sda5: cannot resize to 37189 extents as later ones are allocated.
Now at least GParted shows the partition as having unused space. However, when I now try to resize the partition down to the amount of space it actually uses, I get the below result.
What am I missing here?
Code:
GParted 0.18.0 --enable-libparted-dmraid --enable-online-resize
Libparted 2.3
Shrink /dev/sda5 from 931.24 GiB to 145.27 GiB 00:00:01 ( ERROR )
calibrate /dev/sda5 00:00:01 ( SUCCESS )
path: /dev/sda5
start: 501760
end: 1953456127
size: 1952954368 (931.24 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them 00:00:00 ( SUCCESS )
lvm pvck -v /dev/sda5
Found label on /dev/sda5, sector 1, type=LVM2 001
Found text metadata area: offset=4096, size=1044480
Scanning /dev/sda5
Found LVM2 metadata record at offset=14848, size=512, offset2=0 size2=0
Found LVM2 metadata record at offset=13312, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=11776, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=10240, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=8704, size=1536, offset2=0 size2=0
shrink file system 00:00:00 ( ERROR )
lvm pvresize -v --setphysicalvolumesize 152330240K /dev/sda5
0 physical volume(s) resized / 1 physical volume(s) not resized
Using physical volume(s) on command line
Archiving volume group "mint-vg" metadata (seqno 8).
/dev/sda5: Pretending size is 304660480 not 1952952320 sectors.
Resizing volume "/dev/sda5" to 1952952320 sectors.
Resizing physical volume /dev/sda5 from 0 to 37189 extents.
/dev/sda5: cannot resize to 37189 extents as later ones are allocated.
Turned out there was a swap partition at the end of the logical volume. Deleted it, recreated it, tried to resize again, success!
Now to create the new partition for my new install, and one for my files. If all goes well, I'll list the thread resolved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.