LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-24-2016, 07:42 AM   #1
Delusion of Adequacy
LQ Newbie
 
Registered: Jan 2016
Distribution: Linux Mint 17.2 Rafaela Xfce 64 bit
Posts: 24

Rep: Reputation: Disabled
GParted won't reduce partition size


The Issue

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
 
Old 02-24-2016, 08:51 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
I started GParted from the start menu,
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".
 
Old 02-24-2016, 09:03 AM   #3
Delusion of Adequacy
LQ Newbie
 
Registered: Jan 2016
Distribution: Linux Mint 17.2 Rafaela Xfce 64 bit
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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 View Post
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.

Thanks for your input so far!
 
Old 02-24-2016, 10:00 AM   #4
Delusion of Adequacy
LQ Newbie
 
Registered: Jan 2016
Distribution: Linux Mint 17.2 Rafaela Xfce 64 bit
Posts: 24

Original Poster
Rep: Reputation: Disabled
I managed to resize the LVM partition using system-config-lvm as outlined here: http://askubuntu.com/questions/19612...hysical-volume

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.
 
Old 02-24-2016, 10:14 AM   #5
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
If you know you can't use the data currently on the disk, don't bother with resizing. Just delete the partition and add a new one.
 
Old 02-24-2016, 10:20 AM   #6
Delusion of Adequacy
LQ Newbie
 
Registered: Jan 2016
Distribution: Linux Mint 17.2 Rafaela Xfce 64 bit
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Delusion of Adequacy View Post
I managed to resize the LVM partition using system-config-lvm as outlined here: http://askubuntu.com/questions/19612...hysical-volume

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.
 
  


Reply

Tags
gparted, linux mint 17, partition, partitioning



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reduce partition size Gparted wont work marvinjean Linux - General 4 08-06-2014 04:02 PM
Linux not recognizing full partition size after being extended using gparted linuxrrr Linux - Newbie 6 07-01-2012 07:21 PM
[SOLVED] Need help to increase /home partition size - gparted not working quasar66 Ubuntu 2 01-20-2012 12:28 AM
correct partition size not reported after resizing with gparted rogerdv Linux - General 5 01-11-2010 10:35 AM
Reduce LVM Partition size without any data loss viral_Ahire Linux - Software 1 04-11-2008 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration