PBS creating ZFS the wrong way

mgaudette112

Member
Dec 21, 2023
33
1
8
Hi,

I am using PBS with ZFS and while no expert, I do have basic knowledge about ZFS. I also know that to avoid issues, pools should be created using disks by ids, and to avoid using the /dev/sda method.

PBS is creating pools (from the UI) using /dev/sda. I have 4 pools (the "boot" one created on install, and 3 more). The bool pool is created using disk-id, and one of the other 4 is also fine. But I have 2 left that are using /dev/sdx and while I have the liberty to destroy and recreate them, they still are recreated using /dev/sdx.

(I can see all this by going into the zfs pool details)

1705668166994.png


Any idea on how to make the UI create those pools the "best practice" way?
 

Attachments

  • 1705668117422.png
    1705668117422.png
    155.5 KB · Views: 9
I also know that to avoid issues, pools should be created using disks by ids, and to avoid using the /dev/sda method.
ZFS is totally fine with using /dev/sda. ZFS identifies disks by reading the metadata stored on the formated disks and not by its device name. Its more about making failed disks easier identifyable to prevent user error replacing the wrong disk.

If you really want you could manually create the pool via CLI.

But would be interesting to know why the devs won't default to /dev/disk/by-id when creating it via GUI.
 
Last edited:
I know ZFS is fine with /dev/sdx, I also understand that adding a disk (after the pools have been created - for example a USB drive) can result in issues upon rebooting is the sdx numbering changes.

At least that was what my intense TrueNAS reading (and general ZFS reading) told me during my last project.
 
AFAIU ZFS is more resilient and scans for metadata on the disks in the system to determine if they are part of a pool and which pool.

It is much more of an issue if you use /dev/sdX paths in your fstab for example.

If you want to use the /dev/disk/by-id paths you can temporarily export the pool and then run zpool import {pool name} -d /dev/disk/by-id
 
  • Like
Reactions: mgaudette112
AFAIU ZFS is more resilient and scans for metadata on the disks in the system to determine if they are part of a pool and which pool.

It is much more of an issue if you use /dev/sdX paths in your fstab for example.

If you want to use the /dev/disk/by-id paths you can temporarily export the pool and then run zpool import {pool name} -d /dev/disk/by-id
Thank you - the pools were reimported properly, but needed some manually work to mount them back into the right mountpoints. So there is a little more to it, but in essence it worked.
 

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!