67% FRAG - any advice?

Nov 16, 2022
123
18
23
Sweden
Code:
CPU(s):              40 x Intel(R) Xeon(R) CPU E5-2630L v4 @ 1.80GHz (2 Sockets)
Kernel Version:      Linux 6.8.12-13-pve (2025-07-22T10:00Z)
Boot Mode:           EFI
Manager Version:     pve-manager/8.4.11/14a32011146091ed

Code:
pool: mainstorage
state: ONLINE
scan: scrub repaired 0B in 4 days 07:08:43 with 0 errors on Thu Oct 16 07:32:45 2025

NAME                                    STATE     READ WRITE CKSUM
mainstorage                             ONLINE       0     0     0
  mirror-0                              ONLINE       0     0     0
    ata-TOSHIBA_HDWG480__SERIAL         ONLINE       0     0     0
    ata-TOSHIBA_HDWG480__SERIAL         ONLINE       0     0     0
  mirror-2                              ONLINE       0     0     0
    ata-HGST_HUS728T8TALN6L4_SERIAL     ONLINE       0     0     0
    ata-HGST_HUS728T8TALN6L4_SERIAL     ONLINE       0     0     0
  mirror-3                              ONLINE       0     0     0
    ata-TOSHIBA_HDWG480_SERIAL          ONLINE       0     0     0
    ata-TOSHIBA_HDWG480_SERIAL          ONLINE       0     0     0
  mirror-4                              ONLINE       0     0     0
    ata-TOSHIBA_HDWG480_SERIAL          ONLINE       0     0     0
    ata-TOSHIBA_HDWG480_SERIAL          ONLINE       0     0     0
logs   
  mirror-1                              ONLINE       0     0     0
    ata-INTEL_SSDSC2BA400G4_SERIAL      ONLINE       0     0     0
    ata-INTEL_SSDSC2BA400G4_SERIAL      ONLINE       0     0     0

errors: No known data errors

pool: rpool
state: ONLINE
scan: scrub repaired 0B in 00:03:01 with 0 errors on Sun Oct 12 00:27:09 2025

NAME                                         STATE     READ WRITE CKSUM
rpool                                        ONLINE       0     0     0
  mirror-0                                   ONLINE       0     0     0
    ata-WDC_WDS250G2B0A-00SM50_SERIAL-part3  ONLINE       0     0     0
    ata-Samsung_SSD_860_EVO_250GB_SERIAL-p3  ONLINE       0     0     0

errors: No known data errors

Code:
NAME         SIZE   ALLOC  FREE   FRAG   CAP    DEDUP  HEALTH
mainstorage  29.1T  23.8T  5.31T  67%    81%    1.00x  ONLINE

As you would imagine, it's slow, super slow! Are there any way of fixing fragmentation while being online? I've been thinking about shutting it all off, then make a clean backup of everything to PBS - nuke the mainstorage and recreate it (with larger disks) and then restore from PBS... but it would take some time with 20+ TB data and slow disks.