<h1>
Background</h1>
<p>
It all happened when I noticed that a disk space monitor sitting in the top right hand side on my Gnome desktop was red.</p>
<p>
On inspection I discovered that my root filesystem was 87% full.</p>
<p>
The root partition was only 37GB in size which meant there was less than 4GB of space left.</p>
<p>
When I thought back I remembered that my PC was running a bit slower than usual and that that the lack of space in the root partition could have been to blame.</p>
<p>
I had some tasks that I wanted to complete and thought I’d better do something about the lack of space before it became an even bigger problem.</p>

<h1>
What happened</h1>
<p>
As per usual all this happened when I was short of time and I was in a bit of a hurry.</p>

<ul>
<li>
<strong>
Lesson one don’t do this sort of thing when your in a bit of a hurry.</strong>
</li>
</ul>
<p>
Because I was in a hurry I didn’t spend time doing a complete backup.</p>

<ul>
<li>
<strong>
Lesson two do a backup.</strong>
</li>
</ul>
<p>
My plan was to get some space back by shrinking my home partition leaving some empty space to allow me to increase the size of my root partition.</p>
<p>
For speed and ease I decided to use Gparted as I have used this many times in the past.</p>
<p>
<a href="https://en.wikipedia.org/wiki/GParted" rel="noopener noreferrer" target="_blank">
Wikipedia article about Gparted</a>
</p>
<p>
<a href="https://gparted.org/" rel="noopener noreferrer" target="_blank">
Official Gparted webpage </a>
</p>
<p>
It’s not a good idea to try and resize and or move a mounted filesystem so a bootable live version of Gparted would be a good idea. The reason for this is that if you run Gparted from your normal Linux OS and the OS decides to write something to the disk while Gparted is also trying to write or move things on the disk then as you could imagine very bad things could and probably would happen.</p>
<p>
I knew I had an old bootable live CDROM with Gparted on it as I had used this many times in the past though not for a few years. As I was short on time I thought this would be the quickest way to get the job done.</p>
<p>
I booted up the live CD and setup the various operations such as shrinking the home partitions, moving it to the right to leave space for the root partition then finally increasing the size of the almost full root partition.</p>
<p>
What I didn’t notice at the time is that there was a tiny explanation mark on at least one of the partitions. I probably missed this because I was in a hurry.</p>

<ul>
<li>
<strong>
Lesson three don’t rush things and be on the lookout for any error messages.</strong>
</li>
</ul>
<p>
When I clicked the green tick button to carry out the operations it briefly seemed to start and almost instantly stopped saying that there were errors and that the operation was unsuccessful and something about unsupported 64 bit filesystems. At this point I thought / hoped that nothing had actually happened. My guess was that the old live Gparted distribution I was using didn’t support Ext4 though I could be completely wrong on this.</p>

<ul>
<li>
<strong>
Lesson four don’t use old versions of Gparted particularly when performing operations on modern filesystems.</strong>
</li>
</ul>
<p>
<a href="https://en.wikipedia.org/wiki/Ext4" rel="noopener noreferrer" target="_blank">
Wikipedia article about the Ext4 filesystem</a>
</p>
<p>
I removed the Gparted bootable CD and rebooted my PC. At this point I got lots of errors scrolling up the screen</p>
<p>
I then got a message I’ve never see before from memory I think it said Journaling</p>
<p>
It then said something about pass 1 pass 2 pass 3 and continued all the way to 5.</p>
<p>
Then it talked about recovering data blocks.</p>
<p>
At this point I got very nervous. I had all sorts of fears going through my head. I imagined I may have lost all the contents of my hard-rive. The whole experience was very scary.</p>
<p>
I let it complete all operations and eventually my Ubuntu operating system came up and seemed okay.</p>
<p>
I rebooted the PC and this time it booted correctly with no error messages and everting was okay.</p>
<p>
I have often seen things said about Journaling filesystems and how good they are though until this point I had never seen any real examples of them repairing a filesystem.</p>
<p>
Both my root and home partitions were EXT 4 and thankfully EXT 4 supports Journaling which I believe on this occasion saved me from a great deal of pain.</p>

<ul>
<li>
<strong>
Lesson five it might be a good idea to use Journaling filesystems.</strong>
</li>
</ul>
<p>
<a href="https://en.wikipedia.org/wiki/Journaling_file_system" rel="noopener noreferrer" target="_blank">
Wikipdeai article about Journaling filesystems</a>
</p>
<p>
This still left me with the original problem in that I had little free space on my root filesystems.</p>
<p>
This time I decided to take my time and break the task up into smaller chunks and not to do it in one go.</p>
<p>
First I downloaded the newest Live distribution version of Gparted</p>
<p>
I performed the checksum test to make sure the download was successful with no errors.</p>
<p>
The next day I tried to write it to a CD-ROM something I haven’t done for a very long time.</p>
<p>
I initially couldn’t understand why I couldn’t click on the write button then I looked at my blank CD-ROM using the UBUNTU GNOME DISKS application. It reported that the disk was read only.</p>
<p>
I did a bit of goggling and came across a post saying that they had come across this and that they solved this by installing the CD-ROM writing application Brasero.</p>
<p>
<a href="https://en.wikipedia.org/wiki/Brasero_(software" rel="noopener noreferrer" target="_blank">
Wikipedia article about Brasero</a>
)</p>
<p>
<a href="https://wiki.gnome.org/Apps/Brasero" rel="noopener noreferrer" target="_blank">
Official website for Brasero</a>
</p>
<p>
Installing Brasero solved the problem and allowed me to write the image file to CD-ROM. I was actually surprised that it wasn’t installed as I’ve used this application in the past. Just goes to show how long it’s been since I’ve written anything to CD-ROM!</p>
<p>
I booted the CD-ROM to check that Gparted worked and didn’t see any explanation marks on any of my partitions. I was short on time and didn’t want to rush things so decided to stop at this point.</p>
<p>
Later on I popped the live bootable Gparted CD-ROM running version 1.6.0.3 AMD 64 version into my PC and booted it up.</p>
<p>
Everything seemed okay and there were no errors showing.</p>
<p>
I took my home partition SDA6 and shrunk it down by about 20 GB and then shifted it 20 GB to the right to the end of the disk.</p>
<p>
This left a 20 GB gap at the end of my root partition.</p>
<p>
I then increased the size of my root partition SDA5 by approximately 20 GB to fill the empty space.</p>
<p>
It took Gparted about one hour and 40 minutes to complete all the operations.</p>
<p>
The root partition is now reporting 61% full rather than 86% full.</p>
<p>
The root partition is now approximately 53 GB in size with 31 GB used. 22 GB is now free which is a bit more comfortable.</p>
<p>
<a href="hpr4348_image_1.jpeg">
<img src="hpr4348_image_1_tn.jpeg" alt="">
</a>
</p>

<p>
<strong>
Picture 1 </strong>
Is a screenshot of GParted showing the new sizes of my root and home partitions.</p>
<p>
I removed the GParted CD from my CD-ROM drive and rebooted the PC to thankfully find all was well and no errors reported.</p>

<h1>
Conclusion</h1>
<p>
My PC is now running more smoothly.</p>
<p>
All I can say after all this is that I consider myself very lucky this time and I hope I learned some valuable lessons along the way.</p>

