Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - LP

#1
Hi,

Thanks for your replies. The thin-provisioned SSD storage pool is DAS (storage installed directly in the server). I've considered setting up a new OPNsense instance and importing the configuration, though having to do that three times would obviously be a hassle. The issue is that we use OPNsense in school environments in conjunction with Linuxmuster as the school server; during the initial setup, various keys and configurations are exchanged and provisioned. I haven't found any information on whether I can simply swap out the OPNsense VM, given the dependencies involving LDAP and proxy authentication. I suspect the trust relationship would break if I replaced the VM. I'll try checking the Linuxmuster forum to see if anyone has experience with this and can provide some insight. That likely leaves setting up a new OPNsense VM in parallel, importing the config, and testing to see if everything works.

Does the configuration backup save everything, or do any manual adjustments need to be made after restoring the config?

Thanks!

Best regards,
Luca
#2
Hello everyone,

we have a total of 4 sites running OPNsense installations. Unfortunately, we are experiencing update issues at 3 of these sites. Here are the details:

OPNsense (virtualized)
Installed version: 25.7.11_9
Hypervisor: VMware ESXi-7.0U3w-24784741-standard
Hardware: HPE ProLiant DL325 Gen10 Plus v2 server

After updating OPNsense to version 26.1.x, the following errors occur during boot:

Startup log excerpt:

Trying to mount root from ufs:/dev/ufs/OPNsense [rw,noatime]...
Root mount waiting for: CAM
Mounting filesystems...
tinefs: soft updates remains unchanged as enabled
tunefs: issue TRIM to the disk remains unchanged as enabled
** /dev/ufs/OPNsense

...

(da0:mptt0:0:1:0): UNMAP failed, switching to WRITE SAME(16) with UNMAP BIO_DELETE
(da0:mptt0:0:1:0): UNMAP. CDB: 42 00 00 00 00 00 00 00 08 00
(da0:mptt0:0:1:0): CAM status: SCSI status error
(da0:mptt0:0:1:0): SCSI status: Check Condition
(da0:mptt0:0:1:0): SCSI sense: ILLEGAL Request asc:24,0 (invalid field in CDB)
(da0:mptt0:0:1:0): Command byte 7 is invalid
(da0:mptt0:0:1:0): Error 22, Unretryable error
g_vfs_done():ufs/OPNsense[DELETE(offset=55167287296, length=4096)]error=5

...

(da0:mptt0:0:1:0): WRITE SAME(16). CDB: 93 08 00 00 00 00 00 d8 d1 8f 00 00 00 40 00 00
(da0:mptt0:0:1:0): CAM status: SCSI Status Error
(da0:mptt0:0:1:0): SCSI status: Check Condition
(da0:mptt0:0:1:0): SCSI sense: Vendor Specific asc:80, 85 (Vendor Specific ASC)
(da0:mptt0:0:1:0): Info 0
(da0:mptt0:0:1:0): Error 5, Unretryable error
g_vfs_done():ufs/OPNsense[DELETE(offset=7275184128, lenght=32768)]error=5

Even after OPNsense has booted up, error messages appear spontaneously on the login screen:

FreeBSD/amd64                 (ttyv0)

login: (da0: pvscs i0:0:1:0): WRITE SAME(16). CDB: 93 08 00 00 00 00 02 65 58 cf 0
0 00 00 40 00 00
(da0: pvscs 10:0:1:0): CAM status: SCSI Status Error
(da0: pvscs 10:0:1:0): SCSI status: Check Condition
(da0:pvscs i0:0:1:0): SCSI sense: Vendor Specific asc:80,85 (Vendor Specific ASC)
(da0:pvscsi0:0:1:0): Info: 0
(da0:pvscsi0:0:1:0): Error 5, Unretryable error
g_vfs_done():ufs/OPNsense[DELETE(offset =20580499456, length=32768) lerror = 5
g_vfs_done():ufs/OPNsense[DELETE(offset =20580564992, length=32768) Jerror = 5
g_vfs_done():ufs/OPNsense[DELETE(offset=20580466688, length=32768) lerror = 5

Difference compared to the other site where there are no issues -> Proxmox virtualization

Research into the problem revealed that the log entries may indicate an issue with the TRIM command (UNMAP) in virtualized environments. The VM resides on a thin-provisioned SSD storage pool. OPNsense attempts to free up unused storage blocks, but the virtualization host or the emulated controller does not correctly interpret the SCSI commands (UNMAP / WRITE SAME). This can lead to file system errors (Error 5, Error 22).

Tried a quick fix — disable UNMAP/TRIM

echo 'vfs.unmap_enabled=0' >> /boot/loader.conf.local
Long-term configuration (host side)

If TRIM is to be used (to keep the VM disk thin):

Proxmox: Set the controller to "VirtIO SCSI single" and enable the "Discard" option for the disk.
VMware: Check that the virtual hardware version is up to date and the correct controller type (e.g., VMware Paravirtual) is selected.


So, I switched the storage controller in VMware to Paravirtual. I also updated the firmware versions for all host server components, as outdated RAID controller firmware can sometimes be the cause. I booted OPNsense in single-user mode and ran a filesystem check using the `fsck` command; the output confirmed that the "FILE SYSTEM IS CLEAN." I tested the update repeatedly.

Despite this, the errors persist when starting OPNsense after the update, and I had to roll back to a pre-update snapshot. Does anyone have any ideas regarding the cause or how to fix this? It is possible that the VM's .vmdk file is corrupted, but right now I'm a bit stumped. I'm happy to provide further information if needed. I would appreciate any help!

Best regards,
Luca
#3
Hallo Zusammen,

wir haben insgesamt 4 Standorte mit OPNsense Installationen. Leider gibt es gleich an 3 Standorten Probleme beim Updaten. Folgende Rahmenbedingungen:

OPNsense (virtualisiert)
Installierte Version 25.7.11_9
Hypervisor VMware ESXi-7.0U3w-24784741-standard
Hardware HPE ProLiant DL325 Gen10 Plus v2 Server

Nach dem Update der OPNsense auf Version 26.1.x treten folgende Fehler beim Booten auf:

Auszug Log beim Starten:

Trying to mount root from ufs:/dev/ufs/OPNsense [rw,noatime]...
Root mount waiting for: CAM
Mounting filesystems...
tinefs: soft updates remains unchanged as enabled
tunefs: issue TRIM to the disk remains unchanged as enabled
** /dev/ufs/OPNsense

...

(da0:mptt0:0:1:0): UNMAP failed, switching to WRITE SAME(16) with UNMAP BIO_DELETE
(da0:mptt0:0:1:0): UNMAP. CDB: 42 00 00 00 00 00 00 00 08 00
(da0:mptt0:0:1:0): CAM status: SCSI Status Error
(da0:mptt0:0:1:0): SCSI status: Check Condition
(da0:mptt0:0:1:0): SCSI sense: ILLEGAL Request asc:24,0 (invalid field in CDB)
(da0:mptt0:0:1:0): Command byte 7 is invalid
(da0:mptt0:0:1:0): Error 22, Unretryable error
g_vfs_done():ufs/OPNsense[DELETE(offset=55167287296, lenght=4096)]error=5

...

(da0:mptt0:0:1:0): WRITE SAME(16). CDB: 93 08 00 00 00 00 00 d8 d1 8f 00 00 00 40 00 00
(da0:mptt0:0:1:0): CAM status: SCSI Status Error
(da0:mptt0:0:1:0): SCSI status: Check Condition
(da0:mptt0:0:1:0): SCSI sense: Vendor Specific asc:80, 85 (Vendor Specific ASC)
(da0:mptt0:0:1:0): Info 0
(da0:mptt0:0:1:0): Error 5, Unretryable error
g_vfs_done():ufs/OPNsense[DELETE(offset=7275184128, lenght=32768)]error=5

Selbst wenn die OPNsense hochgefahren ist erscheinen Fehlermeldungen selbstständig im Login-Screen:

FreeBSD/amd64                 (ttyv0)

login: (da0: pvscs i0:0:1:0): WRITE SAME(16). CDB: 93 08 00 00 00 00 02 65 58 cf 0
0 00 00 40 00 00
(da0: pvscs 10:0:1:0): CAM status: SCSI Status Error
(da0: pvscs 10:0:1:0): SCSI status: Check Condition
(da0:pvscs i0:0:1:0): SCSI sense: Vendor Specific asc:80,85 (Vendor Specific ASC)
(da0:pvscsi0:0:1:0): Info: 0
(da0:pvscsi0:0:1:0): Error 5, Unretryable error
g_vfs_done():ufs/OPNsense[DELETE(offset =20580499456, length=32768) lerror = 5
g_vfs_done():ufs/OPNsense[DELETE(offset =20580564992, length=32768) Jerror = 5
g_vfs_done():ufs/OPNsense[DELETE(offset=20580466688, length=32768) lerror = 5

Unterschied zu dem anderen Standort wo es keine Probleme gibt -> Virtualisierung Proxmox

Bei bei der Recherche nach dem Problem hat sich herausgestellt, dass die Logeinträge auf ein Problem mit dem TRIM-Befehl (UNMAP) in virtualisierten Umgebungen hindeuten können. Die VM liegt auf einem SSD-Speicherpool mit Thin-Provisioned. Die OPNsense versucht, ungenutzte Speicherblöcke freizugeben, aber der Virtualisierungs-Host oder der emulierte Controller versteht die SCSI-Befehle (UNMAP / WRITE SAME) nicht korrekt. Dies kann zu Dateisystemfehlern (Error 5, Error 22) führen.


kurzfristigen Fix ausprobiert — UNMAP/TRIM deaktivieren

echo 'vfs.unmap_enabled=0' >> /boot/loader.conf.local

Langfristige Konfiguration (Host-Seite)

Falls TRIM genutzt werden soll (um die VM-Disk dünn zu halten):

Proxmox: Stelle den Controller auf VirtIO SCSI single und aktiviere bei der Disk die Option Discard.
VMware: Prüfe, ob die virtuelle Hardware-Version aktuell ist und der Controller-Typ (z. B. VMware Paravirtual) eingestellt ist.


Also habe ich den Speicher-Controller unter vmware auf Paravirtual umgestellt. Ebenso habe ich die Firmware Versionen aller Komponenten des Host-Servers aktualisiert, da auch eine alte Firmware des RAID-Controllers eine Ursache sein kann. Ich habe bereits die OPNsense im Single User Mode gebootet und das File System checken lassen mit dem Befehl fsck. Hier wurde mir die Ausgabe mit FILE SYSTEM IS CLEAN quittiert. Ich habe jedes Mal erneut das Update getestet.

Trotz dessen treten die Fehler weiterhin beim Starten der OPNsense nach dem Update auf und ich musste auf einen Snapshot vor dem Update zurückrollen. Hat jemand evtl. eine Idee zur Ursache oder wie ich den Fehler beheben kann? Es könnte womöglich auch eine beschädigte vmdk Datei der VM sein aber im Moment bin ich etwas ratlos. Falls weitere Infos benötigt werden liefere ich diese gerne nach. Ich bin für jede Hilfe dankbar!

Viele Grüße
Luca