OPNsense Forum

English Forums => General Discussion => Topic started by: Nikotine on January 04, 2022, 02:07:04 PM

Title: [solved] Upgrade ssd
Post by: Nikotine on January 04, 2022, 02:07:04 PM
I have been running Opnsense on an HP T620 plus for about 8 months now and have been adding/activating features.
Especially Sensei has been pushing the hardware to the limit, more specifically the 16 GB SSD.
Last week I noticed the dashboard was reporting 104% disk usage.
This happened the day after I had been adding a number of wifi devices (Shelly smart switches etc) and had been playing with VLANs.

Anyway, even with Sensei reporting data retention set to 1 day (instead of the default 2), disk usage is currently at 89%.
So I bought a new 250 GB SSD.
Overkill, but it came down to the GB/€ ratio.

My question is, how do I best upgrade the SSD?
I've read that I could export the settings, install Opnsense on the new SSD and then import the settings, but I have a few questions before I do that:
Title: Re: Upgrade ssd
Post by: bartjsmit on January 04, 2022, 07:35:12 PM
If you have an external storage device (NAS, USB, etc.) I would give Clonezilla a go: https://clonezilla.org/downloads.php

Create a complete, external, off-line snapshot for your old SSD and write it intelligently back to the new disk. You'll need to expand the 16 GB partition after copying. You can use a GUI for this step: https://gparted.org/livecd.php

Bart...
Title: Re: Upgrade ssd
Post by: Nikotine on January 04, 2022, 10:29:09 PM
Hmm, so burn an iso of clonezilla to backup the ssd to my nas. Then switch the ssd and clone it back. Finally burn an iso for gparted to extend the partition?
Title: Re: Upgrade ssd
Post by: bartjsmit on January 05, 2022, 09:51:07 AM
That's what I use :D It's a bit easier with PXE boot images but a couple of small USB sticks work fine.

This option is faster since it copies locally: https://www.wavlink.com/en_us/product/WL-ST334U.html but clearly not as ubiquitous.

Bart...
Title: Re: Upgrade ssd
Post by: Nikotine on January 05, 2022, 12:13:17 PM
Ok, I've prepared two bootable drives, one external HD for Clonezilla, with enough space left to save the cloned drive, and a small thumbdrive with gparted.
After the wife leaves tonight, I'll bring down the Opnsense machine and perform the surgery  :)
Fingers crossed!
Title: Re: Upgrade ssd
Post by: Nikotine on January 06, 2022, 12:18:39 AM
So cloning went smoothly with Clonezilla.
I now have the new SSD in the machine and written the clone back.
This all works, Opnsense boots but still sees just 16 GB.

The problem now is that Gparted doesn't want to extend the rootfs partition to include the unallocated space, whatever I try...
I suspect Gparted can't work with UFS partitions.

Luckily I still have the old SSD, the clone on a separate drive and even a backup of the config, so I can experiment a bit on the new SSD.
But in the meantime the wife is back home, so I need to hurry up   ;)
Title: Re: Upgrade ssd
Post by: Nikotine on January 06, 2022, 12:39:23 AM
I managed to do it, using the discussion here (https://forum.opnsense.org/index.php?topic=19250.0)!
I booted and opened a shell, then did:

I just rebooted and it worked!