From owner-freebsd-stable@FreeBSD.ORG Mon Nov 27 14:28:31 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8834C16A47C for ; Mon, 27 Nov 2006 14:28:31 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6B0543D5D for ; Mon, 27 Nov 2006 14:23:04 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (wvaron@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kARENk2Y035889; Mon, 27 Nov 2006 15:23:52 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kARENjD6035888; Mon, 27 Nov 2006 15:23:45 +0100 (CET) (envelope-from olli) Date: Mon, 27 Nov 2006 15:23:45 +0100 (CET) Message-Id: <200611271423.kARENjD6035888@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, security@jim-liesl.org In-Reply-To: <1164609934.3488.47.camel@emperor> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 27 Nov 2006 15:23:54 +0100 (CET) Cc: Subject: Re: Large msdosfs disk will not mount on RELENG_6 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, security@jim-liesl.org List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 14:28:31 -0000 secmgr wrote: > > > As far as I am aware windows 2000 and xp will only allow you to format up to > > a 32G dive with FAT32. Any bigger and it will force you to use NTFS. The > > other strange thing is tht you are trying to mount /dev/da0 and not > > /dev/de0s1. > > The 32 gb restriction was artificial. You can look it up in the M$ > "knowledge" base. Watch out for the hand waving. FreeBSD and Linux > (and probably other cluefull OS's)can handle a 500gb FAT32 drive > (assuming intelligent format values) w/o problem. That's not completely correct, at least as far as FreeBSD is concerned (I don't know if and how Linux solves the problem). The basic problem is that FAT doesn't support what UNIX calls "inode" numbers (sometimes also called "fileid"). But for a file system to be able to be handled under Free- BSD (and other UNIX systems), files have to be uniquely identified by such inode numbers. To solve that problem, FreeBSD's msdosfs uses a simple hack by assigning a number to each file based on the offset of its directory entry relative to the beginning of the file system. However, if the size of the file system exceeds 128 MB (which is the size of 2^32 directory entries), then those numbers don't fit into a 32 bit inode number anymore. If you try to mount such a file system, it will fail and print the error message "disk too big, sorry". If you compile your kernel with MSDOSFS_LARGE, then the kernel uses a different hack to generate appropriate inode numbers: Whenever you access a file, it assigns a number dynamically for this file. That approach works for FAT file systems of unlimited size, but it has two other draw- backs: First, the kernel needs to maintain a table for mapping between files and inode numbers. So, if the file system contains many files, the kernel will need a huge amount of kernel memory which won't be freed until the FS is unmounted (and if you run out of kernel memory, your machine panics). Second, when you unmount and remount the same file system, you might get different inode numbers for your files (because of the dynamic nature), which can confuse certain applications. In particular it breaks NFS because NFS -- being a stateless protocol -- requires constant inode numbers for exports. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. (On the statement print "42 monkeys" + "1 snake":) By the way, both perl and Python get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when the answer is clearly "41 monkeys and 1 fat snake". -- Jim Fulton