Skip to content
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

Closed
eliphant0723 opened this issue Nov 22, 2010 · 2 comments
Closed

Can't create large vdevs #81

eliphant0723 opened this issue Nov 22, 2010 · 2 comments

Comments

@eliphant0723
Copy link

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.

@eliphant0723
Copy link
Author

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

@behlendorf
Copy link
Contributor

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);
}

dajhorn referenced this issue in zfsonlinux/pkg-zfs Apr 23, 2011
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
pcd1193182 added a commit to pcd1193182/zfs that referenced this issue Oct 11, 2019
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants