-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zfs create -V manpage and code discrepancy #8541
Comments
Nice find. I suggest we update the code to round up as described in the documentation. We'll want to update the man page as well since the maximum blocksize can now exceed 128k. |
Hi @behlendorf - I am getting confused while seeing the dir structure. I read few tickets. I know this ticket has a straight forward fix. Can you tell me how the directories are structured? or point me docs? Few things I did -
|
@tapaswenipathak sure thing. The bulk of the ZFS implementation is located in Specifically, the logic which check this can be found here in the You're going to want to address this by updating the |
Round up the volume size requested in `zfs create -V size` to the next higher multiple of the volblocksize. Updates the man page and adds a test to verify the new behavior. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reported-by: puffi <puffi@users.noreply.github.com> Signed-off-by: Alex John <alex@stty.io> Closes #8541 Closes #10196
Round up the volume size requested in `zfs create -V size` to the next higher multiple of the volblocksize. Updates the man page and adds a test to verify the new behavior. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reported-by: puffi <puffi@users.noreply.github.com> Signed-off-by: Alex John <alex@stty.io> Closes openzfs#8541 Closes openzfs#10196 (cherry picked from commit 47c9299)
Round up the volume size requested in `zfs create -V size` to the next higher multiple of the volblocksize. Updates the man page and adds a test to verify the new behavior. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reported-by: puffi <puffi@users.noreply.github.com> Signed-off-by: Alex John <alex@stty.io> Closes openzfs#8541 Closes openzfs#10196
System information
Describe the problem you're observing
man zfs
states underzfs create -V
:size is automatically rounded up to the nearest 128 Kbytes to ensure that the volume has an integral number of blocks regardless of blocksize.
But the following command (with a volblocksize of 8K)
zfs create -V 35K nvme/foo
fails with the following error message:cannot create 'nvme/foo': volume size must be a multiple of volume block size
Describe how to reproduce the problem
Create a zvol with a size that's not aligned to the volblocksize (see command above).
The text was updated successfully, but these errors were encountered: