zpool create using file as device #13175
-
Hello devs, I was trying to make zfs filesystem in a file and I came up with something weird regarding allocated space on a zpool device. I'm attaching terminal logs, to better understand the situation. For comparison, I used ext4 in parallel. Thanks in advance for clues and help, much appreciated! **
** OKAY, excellent! ** now lets do the same, this time with ZFS
** missing 600M+ (12% of 5G) !! **
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You're using a mix of ZFS versions for userland and kernel, and you should stop using Ubuntu's broken setup. That's not related to your question, it's just a bad idea. That said, I think you're observing a result of how ZFS allocates metaslabs - looking at You could play with the
Maybe something someone might want to consider reviewing and revising if it's not already done better in git or 2.1. |
Beta Was this translation helpful? Give feedback.
You're using a mix of ZFS versions for userland and kernel, and you should stop using Ubuntu's broken setup. That's not related to your question, it's just a bad idea.
That said, I think you're observing a result of how ZFS allocates metaslabs - looking at
zdb -MM
, it's using 512 MB metaslabs for a 5GB file vdev, which means that there's going to be an area of (512 MB - however much it's using for fixed usage at the front and back of the pool) that's not covered, I think.You could play with the
zfs_vdev_default_ms_shift
and similar tunables to adjust how it bins up the space - for example, setting it from the default of 29 (512 MB) to 25 (32 MB) results in: