Project

General

Profile

Actions

Bug #15126

closed

SG-1100 pfSense+ recovery results in non aligned disk slices

Added by David Burns 4 months ago. Updated 3 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Build / Release
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Release Notes:
Default
Affected Plus Version:
23.09.1
Affected Architecture:
SG-1100

Description

Currently preparing for an upgrade of SG-1100 remote worker fleet.

However after installing the latest SG-1100 recovery image (pfSense-plus-compat-recovery-23.09.1-RELEASE-aarch64.img.gz) it appears that the resulting image restore to SG-1100 eMMC is not aligned:
(reference https://docs.netgate.com/pfsense/en/latest/solutions/sg-1100/reinstall-pfsense.html)

gpart show mmcsd0
=>       1  15273599  mmcsd0  MBR  (7.3G)
         1    409600       1  efi  (200M)
    409601    131072       2  fat32  (64M)
    540673  14732927       3  freebsd  [active]  (7.0G)

This is a UFS build. Clearly the FreeBSD slice (starting sector 540673) is not aligned with 4k / 32k / 1M boundary. Non aligned writes may have an impact on eMMC life (depends on write workload of course).

Within the slice the actual UFS partition is at least 8k aligned (although suboptimal given that the UFS2 default block size is 32kB):

gpart show mmcsd0s3
=>       0  14732927  mmcsd0s3  BSD  (7.0G)
         0        16            - free -  (8.0K)
        16  14732911         1  freebsd-ufs  (7.0G)

Compare this to a Netgate 7100 (with ZFS):

gpart show mmcsd0
 40  61071280  mmcsd0  GPT  (29G)
        40      1024       1  freebsd-boot  (512K)
      1064       984          - free -  (492K)
      2048   4194304       2  freebsd-swap  (2.0G)
   4196352  56872960       3  freebsd-zfs  (27G)
  61069312      2008          - free -  (1.0M)

Hopefully image build can be corrected using appropriate gpart add -t freebsd -a 1M ... /dev/mmcsd0 argument parameters.

Lastly is the SG-1100 (aarch64) recovery image also used for SG-2100? If so this issue may also impact SG-2100.

Actions #1

Updated by Kris Phillips 4 months ago

David Burns wrote:

Currently preparing for an upgrade of SG-1100 remote worker fleet.

However after installing the latest SG-1100 recovery image (pfSense-plus-compat-recovery-23.09.1-RELEASE-aarch64.img.gz) it appears that the resulting image restore to SG-1100 eMMC is not aligned:
(reference https://docs.netgate.com/pfsense/en/latest/solutions/sg-1100/reinstall-pfsense.html)

[...]

This is a UFS build. Clearly the FreeBSD slice (starting sector 540673) is not aligned with 4k / 32k / 1M boundary. Non aligned writes may have an impact on eMMC life (depends on write workload of course).

Within the slice the actual UFS partition is at least 8k aligned (although suboptimal given that the UFS2 default block size is 32kB):

[...]

Compare this to a Netgate 7100 (with ZFS):

[...]

Hopefully image build can be corrected using appropriate gpart add -t freebsd -a 1M ... /dev/mmcsd0 argument parameters.

Lastly is the SG-1100 (aarch64) recovery image also used for SG-2100? If so this issue may also impact SG-2100.

I suspect this is likely due to the boot partition changes as outlined here: https://redmine.pfsense.org/issues/13967

Actions #2

Updated by David Burns 3 days ago

Quick update - it appears that the new pfSense+ 24.03 installer for SG-1100 (bundled in recovery image netgate-installer-aarch64-img.gz obtained via Netgate store) now correctly aligns the UFS/ZFS partition:

gpart show mmcsd0
=>      40  15273520  mmcsd0  GPT  (7.3G)
        40    532480       1  efi  (260M)
    532520      8152          - free -  (4.0M)
    540672    131072       2  ms-basic-data  (64M)
    671744  14598144       3  freebsd-ufs  (7.0G)
  15269888      3672          - free -  (1.8M)

Clearly the UFS partition start sector 671744 is 4k / 32k / 1MB aligned. (ZFS partition table is similar)

Lastly it is noted that there does not appear to be any reference to this issue in the release notes (eg Installer section)? Presumably this fix would also apply to SG-2100?

Thanks

Actions #3

Updated by Jim Pingle 3 days ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

This may not have been fixed specifically but happens to be handled better in the new installer from the start. The old ARM and ARM64 recovery images didn't install in a usual way, they wrote pre-made disk images to the device storage. The new installer handles things more like how it's been done on amd64 for years.

Unlike the old installer, the new unified installer is separate from any release of pfSense software so any changes made there wouldn't show up in release notes for pfSense software. It's an independent item which can be updated any time, for example, fixes there do not need to wait until the next release of pfSense software happens.

Either way it appears that the new installer renders this moot, so it can be closed.

Actions

Also available in: Atom PDF