ZFS subvol xattr "on" vs "sa"

mailinglists

Renowned Member
Mar 14, 2012
641
67
93
Hi,

some time ago I migrated LXCs from PM 4.4 to 5.*

Recently I noticed that zfs subvols, that were transferred via pve-zsync do have xattr set to on, while newly created do have it set to sa.

I understand it has to do with saving attributes in such way that "sa" is faster than "on", right?
Can I just do zfs set xattr=sa /pat/to/zfsSubvol on all existing and running LXC disks?

For ZVOLs (KVM VMs), xattr, should not be set, correct?
 
Can anyone answer:
"Can I just do zfs set xattr=sa /pat/to/zfsSubvol on all existing and running LXC disks without causing problems for LXCs?"
 
Safe it is but I'm not sure if the data are moved.
 
Once again thank you for your reply.

What do you mean with "but I'm not sure if the data are moved"? Can you please elaborate a little. What kind of move?

I already did move data with pve-zsync a few months ago, when upgrading form 4.4, and have just recently noticed that xattr is on instead of sa.
None of the customers complained. Is it safe not to set it to sa and dnodesize=auto while LXCs are running?
 
You have two real possible values for xattr.
SA means you save the xattr in the inode
Dir == ON means you have a hidden dir where the xattr are stored (very slow).

If you change the xattr data will not be copied and can't be used anymore.
If you have a container which uses xattr you must use backup and restore to keep the xattrs.
 
Oh, now i started to get it. I somehow i just asumed xattr == posix ACL. Which is not, and my LXC instances do not use it according to their fstab.
Thank you for your time @wolfgang .
 

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!