This video will show you how to get ZFS working in XCP-NG and cover the pros and cons of this setup along with tips on how to adjust the memory and sync settings to get better performance
How to Setup Graylog Logging
Command used
yum install zfs.x86_64
modprobe -v zfs
zfs set sync=disabled localzfs
Chapters
00:00 XCP-ng Raid Support
01:36 The Ad
02:30 XCP-ng Raid Documentation
03:17 How To Add ZFS Packages
03:39 Control Domain Memory and ZFS
04:48 Creating The ZFS Pool
07:10 Disable ZFS Sync
07:42 Creating the Storage in XCP-ng
09:05 Monitoring Raid and ZFS
@LTS_Tom I follow alot of your guidance as I am confident you have alot of knowledge in the linux, xcp-ng and zfa space, so I wanted to get your thoughts on something about zfs pool creation. I was going through your guide about settings up zfs (great guide) and I started asking some of our ai buddies (claude, chatgpt and grok) about some stuff and they pointed out something that I wanted to get your input on (because you have alot of first hand experience on linux and xcp). Is there any real concern when it comes to using the device names vs ids, why or why not?
It is speculated the using the device id is better when setting up the ZFS pools because the device names can change on reboots.
Claude said this and chatgpt and grok agreed on this and explained why (obviously AI can produce incorrect information based on multiple sources of correct and incorrect information, which is why I leave room for valuable human input before making production based decisions).
Yes, Claude is 100% correct — using the persistent /dev/disk/by-id/ paths (especially the readable nvme-Dell_DC_NVMe_…_serial ones) is the recommended and safest practice for ZFS on Linux (including XCP-ng).
/dev/disk/by-id/nvme-Dell_DC_NVMe_7500_U.2_ISE_RI_960GB_24364F1FCC03 → ../../nvme6n1
The /dev/nvme0n1, /dev/nvme3n1 etc. names are not stable and should never be used for pool creation.
Why by-id is the right choice:
Kernel device names like nvmeXn1 can (and do) change on reboot, after adding/removing drives, PCIe rescans, or even BIOS updates.
/dev/disk/by-id/ names are derived from the drive’s own serial number + model → they stay the same no matter where the drive sits or what order the kernel discovers it.
OpenZFS, Proxmox, TrueNAS, Ubuntu docs, and basically every serious ZFS guide all say the same thing: use by-id (or by-path for slot-aware setups) when creating pools
The answer they gave is correct but the context they are overlooking is that once created ZFS does not use the disk ID’s to mount. One reboot or import ZFS scans the available block devices in /dev. It isn’t looking for a specific partition table or disk ID, it’s looking for the vdev labels.
Once ZFS finds a disk with a valid label, it reads the metadata to understand the “big picture.” The label tells ZFS:
Pool Name and GUID: A unique identifier for the pool.
Top-Level Vdevs: How many mirrors, RAID-Z groups, or stripes make up the pool.
Member List: A list of all other devices (by their own GUIDs) that should be present for the pool to be healthy.
Transaction Group (TXG): A timestamp-like marker that tells ZFS which version of the pool data is the most recent.
This is why human experience is valuable, so thank you for your response. I pasted your answer into each of the chats I had and they all said pretty much the same thing. They all said you were technically correct with your answer, and then they re-evaluated their answer. They all still recommend using the device-ids for the raidz creation, and stated that after import, zfs itself doesnt find it important for operations, but it is important for the human side when interacting. They pretty much stated because of device name shifting, using the device-ids makes it easier to identify the drives in zpool status and zpool replace.
I definitely like having AI for the technical in depth referencing of information, but then also value the input of experienced users of the subject. I think it gives the best accuracy across both, but also clears up concerns one may have when doing things one way vs another.
Thank you very much for taking the time to give your input.
In case you find the interest to see what each of them said, here are the share links to the answers each gave (Grok seems to give the most insightful response with additional references).