ZFS attach existing raidz2 pool

showiproute

Well-Known Member
Mar 11, 2020
609
31
48
35
Austria
Hello everyone,

I wanted to try the zfs-attach feature which allows to attach a disk to an existing raidz config:
Code:
If the existing device is a RAID-Z device (e.g. specified as "raidz2-0"), the new device will become part of that RAID-Z group. A "raidz expansion" will be initiated, and once the expansion completes, the new device will contribute additional space to the RAID-Z group. The expansion entails reading all allocated space from existing disks in the RAID-Z group, and rewriting it to the new disks in the RAID-Z group (including the newly added device). Its progress can be monitored with zpool status.
Source: https://openzfs.github.io/openzfs-docs/man/master/8/zpool-attach.8.html

As far as I can see Proxmox uses ZFS 2.2.2 which should have this feature included but the behaviour is like old ZFS version where zpool attach did only work with non raidz pools.


Also the Proxmox man pages (man zpool-attach) mentions that this is not possible.



Is Proxmox using the latest version of ZFS? If so how can I advance my raidz pool?
 
Okay seems my mistake as this only works for master branch and not 2.2.2.

Is there any possiblitiy to get this feature working on a current Proxmox e.g. self compiling?
 
@showiproute why not try it? It would either work or you see an error
Good point which I have done so far - kernel panic at the end.
Just wanted to know if someone has any good input.

In general I was able to compile ZFS from the current master branch and install it.
My Proxmox VM also worked with it but I was no longer able to use the PVE ZFS version and with the new features enable I was also no longer able to use the regular ZFS version due to enabled new features.
 
I would seriously not recommend running the ZFS "master" branch in anything but a disposable dev/test environment.

Have seen horror stories where people did this, ended up running ' zpool upgrade ' and then their pool is no longer compatible with anything outside of master, because of new or temporary features that do not get incorporated or get skipped for the next rev or three.

Stick to regular releases - e.g. 2.2.2, 2.2.3 unless you're prepared to destroy your pool and rebuild it for backwards/forwards compatibility.
 
I would seriously not recommend running the ZFS "master" branch in anything but a disposable dev/test environment.

Have seen horror stories where people did this, ended up running ' zpool upgrade ' and then their pool is no longer compatible with anything outside of master, because of new or temporary features that do not get incorporated or get skipped for the next rev or three.

Stick to regular releases - e.g. 2.2.2, 2.2.3 unless you're prepared to destroy your pool and rebuild it for backwards/forwards compatibility.
Thanks for the advise.
I have already decided not to use the master branch as this causes to much headaches in a production environment.
Unfortunately it seems that the only possibility currently is to destroy the existing pool and create a new one with the additional drives.
 
Currently the most interesting thing is to expand any raidz pool with adding new drives instead of destroy and rebuilding it.
 
@showiproute can you please post the output of
Code:
zpool status
My current pool layout would be:

Code:
  pool: Media
 state: ONLINE
  scan: resilvered 54.4G in 00:03:03 with 0 errors on Wed Mar 13 07:37:47 2024
config:

        NAME                                                 STATE     READ WRITE CKSUM
        Media                                                ONLINE       0     0     0
          raidz2-0                                           ONLINE       0     0     0
            scsi-35000cca27057ddcc                           ONLINE       0     0     0
            ata-HGST_HUH721212ALE600_8DG62YJX                ONLINE       0     0     0
            scsi-35000cca2783a9e80                           ONLINE       0     0     0
            scsi-35000cca2784e3e6c                           ONLINE       0     0     0
            scsi-35000cca27a1098b4                           ONLINE       0     0     0
            scsi-35000cca2783baf34                           ONLINE       0     0     0
        special
          mirror-1                                           ONLINE       0     0     0
            nvme-TS1TMTE220S_I039910075-part2                ONLINE       0     0     0
            nvme-TS1TMTE220S_G498460134-part2                ONLINE       0     0     0
        logs
          nvme-INTEL_SSDPED1D280GA_PHMB74230179280CGN-part2  ONLINE       0     0     0
        cache
          nvme-TS1TMTE220S_G498460134-part3                  ONLINE       0     0     0
          nvme-TS1TMTE220S_I039910075-part3                  ONLINE       0     0     0
          nvme-INTEL_SSDPED1D280GA_PHMB74230179280CGN-part3  ONLINE       0     0     0
 
okay now I see what you are trying to do. You cannot expand your pool with just one disk. You have to create another vdev which is also raidz2 type. At least I dont think it's possible right now with proxmox zfs version. So as of right now you have two options: create another raidz2 vdev into that pool or create another pool with less disks if you do not have 6 extra disks. It is a good idea to add the same amount of disks to avoid performance issue.
 
  • Like
Reactions: Kingneutron
okay now I see what you are trying to do. You cannot expand your pool with just one disk. You have to create another vdev which is also raidz2 type. At least I dont think it's possible right now with proxmox zfs version. So as of right now you have two options: create another raidz2 vdev into that pool or create another pool with less disks if you do not have 6 extra disks. It is a good idea to add the same amount of disks to avoid performance issue.
No, with a current stable release this is not possible - neither the Proxmox ZFS version nor the "official" one.

Only at the master branch at Github you can enable this new feature and add a new disk to an existing raidz pool.
Hopefully this will be launched at the near future.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!