LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-11-2018, 01:16 PM   #1
Calab
Member
 
Registered: Oct 2003
Location: Calgary, AB, Canada
Distribution: CentOS, Ubuntu
Posts: 56

Rep: Reputation: 2
Question Do I need to consolidate free space before I shrink my / partition?


Currently I have Mint Linux 19 installed on a 2TB hard drive. I will be cloning the installation to a 500GB SSD in the next few days. My installation takes about 75GB at the moment (I just moved 700GB of files to a separate data drive).


To resize the partition I will be booting a "Live" installation USB stick and running gparted. Later on I will clone from the 2TB HDD to the 500GB SSD.

[edit] I just discovered that the disk utility in Mint can shrink the volume without the need for booting a "live" installation. Should I do this? [/edit]

What I want to know is if I should consolidate free space before resizing, or will gprarted move files if they are at the end of the 2TB drive so that the fit on the 500GB drive?


Is there anything I should know or do during this process?


Thanks!

Last edited by Calab; 11-11-2018 at 01:39 PM.
 
Old 11-11-2018, 02:45 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
mirror this live USB distro to other n usb
It's very unclear what you mean. Are you doing your own bespoke distro for strangers to install? Are you creating template for other machines in your home/company? Are you doing your own bespoke distro for you to install in other places, adjusting as needed?

Please clarify.
 
Old 11-11-2018, 03:03 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
You are migrating your HD to SSD.
You don't say how many partitions you have or whether you have an efi boot - but..

You don't need to consolidate a partition before shrinking it (but do leave some spare space for future use).

Quote:
I just discovered that the disk utility in Mint can shrink the volume without the need for booting a "live" installation. Should I do this?
Not if you are shrinking your / or /home partition(s).
The partition must be unmounted whilst it is being resized by gparted.

Your idea of booting from a live distro stick is the correct one.

Take a backup first!

Last edited by JeremyBoden; 11-11-2018 at 03:06 PM.
 
Old 11-11-2018, 05:33 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
If your cloning procedure can't handle the target partition being smaller than the source, don't use that procedure.
Simply copying your data (as you apparently already have for your data drive) is the best solution. Writing "unused" blocks needlessly to a SSD is a really bad idea.
Even the EFI partition can be just copied - for the boot entries you'll need run grub-install and possibly update-grub too. No idea how Win10 will react if you have that (EFI).

For common Linux filesystems (say ext4) you can resize on-the-fly - including the root. Note this is not true of xfs. Likewise the swap has to be managed separately if you are planning on resizing that.
Nothing is ever as straightforrward as it first seems ...
 
Old 11-13-2018, 01:12 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Calab View Post
What I want to know is if I should consolidate free space before resizing
not necessary in my experience; i think it has to do with how journaling filesystems handle these things physically.
anyhow, if you shrink the partition gparted will do whatever is required.
 
Old 11-13-2018, 11:56 AM   #6
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by Calab View Post
To resize the partition I will be booting a "Live" installation USB stick and running gparted. Later on I will clone from the 2TB HDD to the 500GB SSD.

[edit] I just discovered that the disk utility in Mint can shrink the volume without the need for booting a "live" installation. Should I do this? [/edit]

What I want to know is if I should consolidate free space before resizing, or will gprarted move files if they are at the end of the 2TB drive so that the fit on the 500GB drive?


Is there anything I should know or do during this process?


Thanks!
I can't say for sure with Linux Mint, but I assume the answer is "no" based on my experience. Defragmenting the partition is part of the resize process. At least it is in Mageia. I'm pretty sure resizing would not work if defragmenting/copying was not part of the process.

There could also be potential effects from resizing an encrypted partition.
 
Old 11-15-2018, 12:55 AM   #7
Calab
Member
 
Registered: Oct 2003
Location: Calgary, AB, Canada
Distribution: CentOS, Ubuntu
Posts: 56

Original Poster
Rep: Reputation: 2
Talking Done!

Well, for what it's worth...


I booted my Mint Linux installer USB stick and used gparted to resize the partition under 400GB and then copied the partition to the new drive.


Everything went fine. No surprises at all.
 
  


Reply

Tags
partition, resize



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
[SOLVED] consolidate free space on ext4 qrange Linux - Software 15 05-01-2018 02:01 AM
Too small of free space on Disc: C to partition? 47.06 GB or 2145 MB in Shrink Window Zupe Linux - Newbie 17 09-27-2016 07:15 AM
How do I shrink a volume group once I have created free space in it? Mountain Linux - General 5 10-28-2009 08:54 PM
Gparted not letting me shrink Vista partition despite free space allele Linux - Software 5 06-24-2009 06:37 AM
LXer: IDC: Linux server shipments shrink as enterprises consolidate ... LXer Syndicated Linux News 0 03-07-2007 09:01 PM

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

All times are GMT -5. The time now is 05:41 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