Cannot upgrade to 23.7

Started by poweruser, October 25, 2023, 11:39:26 PM

Previous topic - Next topic
I am trying to upgrade from 23.1.11_2 to 23.7 and getting the following message:
Fetching packages-23.7-amd64.tar: ..............[fetch: /var/cache/opnsense-update/60516/packages-23.7-amd64.tar] failed, no update found
Sometimes it also adds "No space left on device". I have it installed on 10GB disk, so space should not be an issue.

If it is indeed insufficient space, how should I go about increasing it with minimum disruption to the service? I am running it as a VM in Proxmox.


October 25, 2023, 11:59:10 PM #1 Last Edit: October 26, 2023, 12:00:59 AM by meyergru
FWIW, your root partition has only 316 MBytes left, which is not all that much.

If you want, resize the disk image in Proxmox, then partition and ZFS. Take a look at this thread: https://forum.opnsense.org/index.php?topic=19250.0. This involves a reboot of the VM, however.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 770 up, Bufferbloat A

October 26, 2023, 07:49:54 AM #2 Last Edit: October 26, 2023, 10:52:22 AM by poweruser
Using the command 'gpart show', I noticed that the swap partition occupies 8GB out of the total 10GB disk space. While this clarifies the storage situation, it is quite surprising.
Considering the VM has 4GB of RAM and is currently utilizing less than 3GB, is such a sizable swap space truly essential?

The disk was partitioned by OPNsense installation, so there should be some reason behind it.

Now what I know what to look for I found thesehttps://roofman.me/2021/01/26/opnsense-resize-disk-space/ instructions for OPNsense swap partition. I am thinking to take 4GB from swap and add it to the main partition.

I wouldn't. Think about it a bit more. If you found that your appliance used 8GB of swap, it means it needed that. What would have happened if it didn't have it? That's what will happen if you take it away.

I said that there is a 8GB swap partition, not that it uses it. It actually does not use it at all.
It's just strange that OPNsense created such a large swap partition by default

At least with 21.x, the size of the swap partition was being asked for during installation. However, once you use some plugins like zenarmor or similar, memory use can get quite a bit higher. And the less RAM you have, the more potential need for swap could arise.

On virtualisation, there is not much of a problem to change this later on anyway and on hardware, probably using a SSD these days, overallocation to counter wearout is in order, too.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 770 up, Bufferbloat A

Quote from: poweruser on October 26, 2023, 11:38:17 AM
I said that there is a 8GB swap partition, not that it uses it. It actually does not use it at all.
It's just strange that OPNsense created such a large swap partition by default
Right I misread it. So yes as meyergru says, last time I installed from scratch as oppossed to upgrades, it asked for swap size. And yes if you see you don't need it, then reducing it is reasonable.

I managed to resize the swap partition and its new size is displayed correctly in the Web UI.

I am not sure how to proceed with the data partition resize though. It is the last partition and I guess I need to move it first.

Any advise?

Can be done and easier since is a proxmox vm. You'd need to be offline, the filesystem needs to be unmounted.
So one way is you'd have to stop the vm, modify in Proxmox to add an iso of a live distro to boot from. Boot the live media and change the size from there.
I imagine the virtual disk is a qcow type, so you might need to look if you need additional steps. Maybe not as the overall disk size is not changing.
Another way is to save config, create a new installation with a new virtual disk and import config. Quicker.
Save your config in any and all cases, of course to a different location.

It's possibly easier to use the space for a new ZFS and merge it with the other one? I don't think it's a problem, but I've never done it.


Cheers,
Franco

so the partition is zfs franco. That is a filesystem tree we see. Then free space next to it. There is no way to merge two zfs filesystems unless you start doing unionfs style stuff. In the end, they'd be still separate trees.

But isn't ZFS capable of using the space of another partition on the same disk? Like striping across disks is already easily supported in the installer...

For the ZFS gurus it's probably just a few commands.


Cheers,
Franco

i see what you mean now. Yes it is possible with autoexpand,
OP see https://forums.freebsd.org/threads/extend-zfs-partition.55964/
No guarantees of course. Working with partitions and filesystems comes with risk.

I ended up increasing the virtual disk and increasing the partition size as discribed here https://roofman.me/2021/01/26/opnsense-resize-disk-space/ with the difference that instead of growfs I had to use zpool online -e zroot vtbd0p4

I tried creating a new VM with a clean OPNsense installation but encountered several issues with it. I may try it later.
The issues I encountered:

  • The new instance immediately starts all services (e.g. DHCP) causing connectivity disruptions while I still installing it.
  • It does not in fact asks how I want to partition the disk. There is an "Extended Installation" option with options to modify partitions, but it seems to be bugged and I did not manage to change sizes