mountmsdosfs(): disk too big still a problem?

Kevin Kinsey kdk at daleco.biz
Thu Jul 14 02:31:14 GMT 2005


Tsampros Leonidas wrote:

>On Wed, Jul 13, 2005 at 11:57:05PM +0000, Tsampros Leonidas wrote:
>  
>
>>>Alex Teslik wrote:
>>>
>>>      
>>>
>>>>I have run into the "mountmsdosfs(); disk too big" problem while trying to
>>>>mount a 250GB FAT32 drive. This problem is pretty well documented:
>>>>
>>>>http://www.atm.tut.fi/list-archive/freebsd-stable/msg11027.html
>>>>
>>>>but I couldn't find any documentation regarding it being fixed when I 
>>>>googled
>>>>around.
>>>>I am running FreeBSD 4.10-RELEASE-p5 i386. Does anyone know if this 
>>>>problem is
>>>>fixed in 4.11 or 5.4?
>>>>
>>>>
>>>>        
>>>>
>>Recompile the kernel with 
>>
>>options           MSDOSFS_LARGE
>>
>>Works for me, 5.4-STABLE.
>>    
>>
>
>Of course , you have to be careful with this one.  From 5.3 Release
>notes: 
>
>The MSDOSFS_LARGE kernel option has been added to support FAT32
>file systems bigger than 128GB. This option is disabled by default. It
>uses at least 32 bytes of kernel memory for each file on disk;
>furthermore it is only safe to use in certain controlled situations,
>such as read-only mount with less than 1 million files and so
>on. Exporting these large file systems over NFS is not supported.
>
>>From cvs:
>
>date: 2004/07/03 13:22:38;  author: tjr;  state: Exp;  lines: +23 -1
>popular request, add a workaround that allows large (>128GB or so)
>FAT32 filesystems to be mounted, subject to some fairly serious limitations.
>
>This works by extending the internal pseudo-inode-numbers generated from
>the file's starting cluster number to 64-bits, then creating a table
>mapping these into arbitrary 32-bit inode numbers, which can fit in
>struct dirent's d_fileno and struct vattr's va_fileid fields. The mappings
>do not persist across unmounts or reboots, so it's not possible to export
>these filesystems through NFS. The mapping table may grow to be rather
>large, and may grow large enough to exhaust kernel memory on filesystems
>with millions of files.
>
>Don't enable this option unless you understand the consequences.
>  
>

Thanks for including the warnings.  To me, this basically means
"this is not (well) supported yet" and that means I didn't consider
it worth using or mentioning to the O.P.  However, in reading the
programmer's comments, it looks as if MSDOSFS_LARGE might be
worth looking into as long as the data weren't too critical and
the systems weren't huge... FAT32 still seems to be a good option
for cross-platform USB mass storage, for example, as NTFS isn't
really writable by FBSD either....

KDK



More information about the freebsd-questions mailing list