-
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
Can't create large vdevs #81
Comments
I think I just figured it out: http://www.mail-archive.com/zfs-discuss@opensolaris.org/msg12491.html I forgot to mention I'm running x86 atm |
By default the size of a zvol is limited to 2GB on 32-bit systems. This is just the way it works on Solaris so for now I kept the same behavior on Linux. That being said I'm not 100% positive this limitation can't be relaxed on a Linux system. I've never tried to see what will happen exactly. If you would like to try the experiment simply comment out the "#ifdef _ILP32" bit in zvol_check_volsize() as follows, then rebuild the source and see what happens (test data only please). I'd love to hear about your results. /* * Sanity check volume size. */ int zvol_check_volsize(uint64_t volsize, uint64_t blocksize) { if (volsize == 0) return (EINVAL); if (volsize % blocksize != 0) return (EINVAL); // #ifdef _ILP32 // if (volsize - 1 > MAXOFFSET_T) // return (EOVERFLOW); // #endif return (0); } |
Having MAXOFFSET_T defined to 0x7fffffffl was artificially limiting the maximum file size on 32-bit systems. In reality MAXOFFSET_T is used when working with 'long long' types and as such we now define it as LLONG_MAX. This resolves the 2GB file size limit for files and additionally allows zvols greater than 2GB on 32-bit systems. Closes #136 Closes #81
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Hi,
I created a 60G zpool on /dev/sdx1. When I try to create a 30G vdev, zfs says:
"cannot create 'pool1/vdev1': volume size exceeds limit for this system"
I finally was able to create a vdev of 2G. Any ideas?
Ubuntu 10.4, 2.6.32-24-generic, /dev/sdx1 is unpartitioned space.
The text was updated successfully, but these errors were encountered: