Don't make the mistake I made using gparted.

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
farkas
Level 4
Level 4
Posts: 414
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Don't make the mistake I made using gparted.

Post by farkas »

I'm making this post hoping that linux users will learn from my mistake and not repeat it.
I was too impatient and almost lost my data on my sdb HDD drive!

This a reminder (Warning!) that when using a disk utility it can take a long time.

I have a desktop with a 256GB SSD (boot drive) and a 1TB HDD. Got a new 1TB SSD to replace the 256GB SSD.
To make sure that I have adequate backups:
Cloned my current 256GB SSD to an external usb 500GB SSD. Took about 30 min.
Backed up my partitions to another external usb SSD. Also about 30 min.

The 1TB drive had just one partition. I am using it for storing pictures, text files and other stuff where rapid access is not necessary.
Decided to shrink it down to about 700GB and create a new partition 300GB to use for data backups of sda and timeshift.
Booted LM live usb. Opened gparted, selected sdb, the 1TB hdd.
Shrank the partition and clicked apply.

Gparted warned me that the pending operation may take a long time! It is NOT a lie! I was used to the speed of ssds. After about 45 min. I tough it was hung up, status bar not advancing, no indication of any progress.
This is where I made a BIG mistake!
Shut it down, even though it warned me of data loss and other consequences. Ignored them, to impatient.
Shut down and rebooted. Boot was normal. Normally I have sdb set to mount during boot, but when trying access sdb after reboot everything went wrong, error messages galore about "Cannot mount drive" .
Used Gnome disks, repair file systems utility, to make it mountable again, about 3 hrs. This time I was patient and let it do its work.
I'm both lucky and very fortunate that I didn't lose anything.

In System Settings>Screensaver set screen saver to never and lock screen and lock computer to off. Also in Power Settings both options to never.
This was to make sure that screen saver and power settings wouldn't interfere with the process.
Opened System Monitor>Resources, to see what's going on.
Opened gparted from installed LM 19.3 on sda. Hoping it would be faster than running it from a live usb.
Shrank the partition by about 300GB and clicked apply. Again no appearance of any progress in the progress bar or anything happening on the system monitor. CPU usage on all four cores max 4%. Memory usage of 1.2GB out of 16GB. The only indication that anything was going on the drive in use indicator LED was almost steadily on.
Also stuck a post it note to end of the progress bar on the screen. Checked it every once in a while, indeed the progress bar did advance. Very, very, very slowly. It gave me some reassurance that something was actually happening.
It took about 8 hrs. + to complete!
Rebooted, the HDD mounted as before on boot.

I built this PC about six years ago and installed LM 17.3 with the erase and install option. Updated and upgraded to LM 19.3, no changes to partitions. (if it works don't mess with it)
Following, https://easylinuxtipsproject.blogspot.c ... .html#ID16, suggestion to not defrag an SSD, I didn't defrag my SSD or HDD either since installation. Didn't really matter because the HDD wasn't my boot drive and access speed to it was a very low priority. That was probably one of reasons for the long time to shrink the partition, files scattered all over the drive.

Looking back
Do heed gparted's warning that the operation may take a long time.
Maybe defrag the HDD before repartitioning, may not save much time, depending on how long it might take to defrag.
If I repartition an HDD again, especially large ones, 1TB or greater, I'll start it late at night, and get a good night's sleep, it should be done by morning.

I used Foxclone for cloning and partition backups.
viewtopic.php?f=47&t=315557
https://www.foxclone.com/
A heck of lot easier than clonezilla.
Last edited by farkas on Sun Apr 05, 2020 10:19 pm, edited 1 time in total.
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.

User avatar
Pierre
Level 20
Level 20
Posts: 10265
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Don't make the mistake I made using gparted.

Post by Pierre »

YES - using the program Gparted, on certain function_tools,
- can take a Long Time .. especially on those Big HDDs with lots of /DATA

you should be able to monitor it's progress, in real time, though
- it does give feedback, on what it's doing, at any given moment.
click on that little gear icon .. to see that.

YEP - - have been impatient, also, with some BAD results.
:roll:
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
AZgl1500
Level 13
Level 13
Posts: 4581
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Don't make the mistake I made using gparted.

Post by AZgl1500 »

I also learned the Hard Way many years ago.

I now have a practice of only doing Image Backups at night, just before I go to bed.
I have at times, awoke at 0500 hours and look to see what has happened.
the progress bar has moved, but the HDD light is still flickering once in a while.

Leave it alone....
the above admonishments about making sure Screensaver is OFF, and all Power Settings are set to NEVER are an absolute must.

My first failure with Linux was a screen saver locking up the machine, I had to use the BIOS to shut it down.
a fresh new install was the only thing left for me to do.

Never used Fox Clone, going to check that out.
Linux Mint 19.3 Cinnamon

User avatar
Pierre
Level 20
Level 20
Posts: 10265
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Don't make the mistake I made using gparted.

Post by Pierre »

AZgl1500 wrote:
Sun Apr 05, 2020 6:55 am
I also learned the Hard Way many years ago.

the above admonishments about making sure Screensaver is OFF, and all Power Settings are set to NEVER are an absolute must.
that's a Good Point - - check that your Screen_Saver & Power settings are set to NEVER .. ..
- those will interfere, for sure .. not a good thing.
:roll:
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

Lady Fitzgerald
Level 4
Level 4
Posts: 384
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Don't make the mistake I made using gparted.

Post by Lady Fitzgerald »

AZgl1500 wrote:
Sun Apr 05, 2020 6:55 am
I also learned the Hard Way many years ago.

I now have a practice of only doing Image Backups at night, just before I go to bed.
I have at times, awoke at 0500 hours and look to see what has happened.
the progress bar has moved, but the HDD light is still flickering once in a while.

Leave it alone....
the above admonishments about making sure Screensaver is OFF, and all Power Settings are set to NEVER are an absolute must.

My first failure with Linux was a screen saver locking up the machine, I had to use the BIOS to shut it down.
a fresh new install was the only thing left for me to do.

Never used Fox Clone, going to check that out.
I already have screen saver set to off, power settings to never, etc. but the screen saver will come on anyway after an extended time without any input on my part. So far, that has not interfered with long running operations, such as enormous backups; just nudging the mouse brings back the screen and the operation appears to have kept running while the screen saver was active. I also have the power setting on my notebook set to do nothing when I close the lid so all that happens is the screen only shuts off. If I have a long operation running, I just close the lid and forget about it for a while.

I also save large operations for overnight while I'm sleeping, watching TV, or reading a book while the operation is running. I'm far less likely to get impatient that way.
Jeannie

Linux Mint Cinnamon 19.3
Lenovo B50 15" notebook

WHVW
Level 5
Level 5
Posts: 648
Joined: Tue May 19, 2015 4:31 pm

Re: Don't make the mistake I made using gparted.

Post by WHVW »

farkas:

All that screensaver stuff, yeah, it's one of the First Things I do on a new install. But defrag? I was taught from the beginning that 'nix systems NEVER need drfragging, due to the way drives are written to....in fact that it could even be harmful.
I have read many articles that also take that position, since that it is only Windoze systems that need defrag due to the quasi-spiral method of writing data: when files, pictures, programmes, etc. are "erased" they create gaps in the rings, which are filled up by new files, pictures, programmes, etc. as they are created. This causes the arm in the HD (same basic idea as in a record player) to need to jump all over the place as it generates a consistent stream of data. As you might expect, this jumping around takes much more time to read/write then it would if the data were in one continuous physical location. Hence the need for defragging, which places all the little blocks of data in a pile to then replace them in a coherent sequence. Linux, and indeed all the 'nixes never need defragging because they don't use that kind of a read/write system.

Lady Fitzgerald

If you are still getting screensaver action, most likely you have missed a setting: that's very easy to do since there are a few different places you need to go to get them all..I always miss one on a new install.

Lady Fitzgerald
Level 4
Level 4
Posts: 384
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Don't make the mistake I made using gparted.

Post by Lady Fitzgerald »

WHVW wrote:
Sun Apr 05, 2020 11:59 pm
...Lady Fitzgerald

If you are still getting screensaver action, most likely you have missed a setting: that's very easy to do since there are a few different places you need to go to get them all..I always miss one on a new install.
Curious. I thought there was only one--the one in system settings--and that one only allows you to delay it for one hour.
Jeannie

Linux Mint Cinnamon 19.3
Lenovo B50 15" notebook

RIH
Level 5
Level 5
Posts: 583
Joined: Sat Aug 22, 2015 3:47 am

Re: Don't make the mistake I made using gparted.

Post by RIH »

Lady Fitzgerald wrote:
Mon Apr 06, 2020 12:51 am
Curious. I thought there was only one--the one in system settings--and that one only allows you to delay it for one hour.
The first item in the list is NEVER.
Host: bob-Aspire-TC-705 Kernel: 4.15.0-101-generic x86_64 bits: 64
compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.4.8
Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic

User avatar
farkas
Level 4
Level 4
Posts: 414
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: Don't make the mistake I made using gparted.

Post by farkas »

WHVW
As I noted in my OP that I never defragged either of of my drives since the original build. The only reason I mentioned it is that defragging prior to shrinking a large partition on an HDD may save some time. Pure speculation on my part. Someone with knowledge about how linux uses an HDD should be able put to rest my speculation, one way or another.
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.
A generation which ignores history has no past and no future.

Lady Fitzgerald
Level 4
Level 4
Posts: 384
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Don't make the mistake I made using gparted.

Post by Lady Fitzgerald »

RIH wrote:
Mon Apr 06, 2020 1:02 am
Lady Fitzgerald wrote:
Mon Apr 06, 2020 12:51 am
Curious. I thought there was only one--the one in system settings--and that one only allows you to delay it for one hour.
The first item in the list is NEVER.
Well sonnuva gun! I'm either getting blind or senile in my old age (or both). :? :oops: Thanks for pointing that out!
Jeannie

Linux Mint Cinnamon 19.3
Lenovo B50 15" notebook

User avatar
hal8000
Level 4
Level 4
Posts: 399
Joined: Sun May 04, 2008 2:04 pm
Location: UK

Re: Don't make the mistake I made using gparted.

Post by hal8000 »

In the future never try and use any disk resize operations on a partition.

Copy the data from the partition and backup elsewhere, then delete the partition
and create a new partition table.
When you create a new partition table you have a choise of gpt partition or dos based
partition table,
Always go for a gpt partition table with linux.
If its a dual boot with windoze then it has to be a dos partition table.
Hope that helps.

pbear
Level 14
Level 14
Posts: 5206
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Don't make the mistake I made using gparted.

Post by pbear »

Pierre wrote:
Sun Apr 05, 2020 6:40 am
you should be able to monitor it's progress, in real time, though
- it does give feedback, on what it's doing, at any given moment.
As in, it does or it should? I've not noticed any way to monitor progress of a GParted job.

File Manager either. Had one the other day where a copy ran for an hour (30 GB in data).
When it finally gave up, turned out less than 1 GB had transferred.

User avatar
AZgl1500
Level 13
Level 13
Posts: 4581
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Don't make the mistake I made using gparted.

Post by AZgl1500 »

pbear wrote:
Mon Apr 06, 2020 7:12 pm
Pierre wrote:
Sun Apr 05, 2020 6:40 am
you should be able to monitor it's progress, in real time, though
- it does give feedback, on what it's doing, at any given moment.
As in, it does or it should? I've not noticed any way to monitor progress of a GParted job.

File Manager either. Had one the other day where a copy ran for an hour (30 GB in data).
When it finally gave up, turned out less than 1 GB had transferred.
I have noticed that NEMO does not do well with trying to copy folders with huge amount of files.

so, I create the 'new folder' and with Split windows, just drag over on smaller folder at a time.

Or, just use LuckyBackup and assign it the job, tell it 'RUN' and leave it alone.
rsync will do the job.
Linux Mint 19.3 Cinnamon

WHVW
Level 5
Level 5
Posts: 648
Joined: Tue May 19, 2015 4:31 pm

Re: Don't make the mistake I made using gparted.

Post by WHVW »

RIH, Lady Fitzgerald:

In System Settings>Preferences>Screesaver is one, and in System Settings>Hardware>Power Management is another. Also "Enable timer when logging out or shutting down" in System Settings>Preferences may also affect that. I have always kept it set to "off". For point of reference, I am talking LM 19.1 .

Later.

pbear
Level 14
Level 14
Posts: 5206
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Don't make the mistake I made using gparted.

Post by pbear »

AZgl1500 wrote:
Mon Apr 06, 2020 8:02 pm
rsync will do the job.
I'm inclining that direction, not least because the --info=progress2 option gives me a way to keep track. Reports amount transferred (not %), so have to notice and remember total job size at the start, but otherwise seems reliable and accurate.

User avatar
AZgl1500
Level 13
Level 13
Posts: 4581
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Don't make the mistake I made using gparted.

Post by AZgl1500 »

pbear wrote:
Mon Apr 06, 2020 8:52 pm
AZgl1500 wrote:
Mon Apr 06, 2020 8:02 pm
rsync will do the job.
I'm inclining that direction, not least because the --info=progress2 option gives me a way to keep track. Reports amount transferred (not %), so have to notice and remember total job size at the start, but otherwise seems reliable and accurate.
I said that because LuckyBackup is just a GUI for rsync
Linux Mint 19.3 Cinnamon

Lady Fitzgerald
Level 4
Level 4
Posts: 384
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Don't make the mistake I made using gparted.

Post by Lady Fitzgerald »

WHVW wrote:
Mon Apr 06, 2020 8:42 pm
RIH, Lady Fitzgerald:

In System Settings>Preferences>Screesaver is one, and in System Settings>Hardware>Power Management is another. Also "Enable timer when logging out or shutting down" in System Settings>Preferences may also affect that. I have always kept it set to "off". For point of reference, I am talking LM 19.1 .

Later.
Thank you! Got it covered.
Jeannie

Linux Mint Cinnamon 19.3
Lenovo B50 15" notebook

Lady Fitzgerald
Level 4
Level 4
Posts: 384
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Don't make the mistake I made using gparted.

Post by Lady Fitzgerald »

AZgl1500 wrote:
Mon Apr 06, 2020 8:02 pm
...I have noticed that NEMO does not do well with trying to copy folders with huge amount of files.

so, I create the 'new folder' and with Split windows, just drag over on smaller folder at a time.

Or, just use LuckyBackup and assign it the job, tell it 'RUN' and leave it alone.
rsync will do the job.
I do something similar using FreeFileSync. Works every time.
Jeannie

Linux Mint Cinnamon 19.3
Lenovo B50 15" notebook

Post Reply

Return to “Software & Applications”