Date: Sat, 14 Apr 2001 10:15:48 -0500 From: Andrew Hesford <ajh3@chmod.ath.cx> To: Gunnar Isaksson <sm5iuf@telia.com> Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD filesystem limitations Message-ID: <20010414101548.A91019@cec.wustl.edu> In-Reply-To: <3AD80959.91CBE6C5@telia.com>; from sm5iuf@telia.com on Sat, Apr 14, 2001 at 10:24:57AM %2B0200 References: <3AD80959.91CBE6C5@telia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 14, 2001 at 10:24:57AM +0200, Gunnar Isaksson wrote: > It's my memory that fsck is much faster on FreeBSD > due to some magic in the filesystem. Is this the > case? (My 46GB disks would like that) This is very much the case. Soft updates makes sure that writing files is ordered, so that blocks are allocated before inodes, and inodes before directory entries are made. I'm sure it's more complex than this, but I don't want to pay to read Marshall Kirk McKusick's paper on the Usenix site, so the abstract must do for me. :) The result of this ordering is that every directory entry is known to be a valid file. Hence, fsck only needs to run through the free block map and check for allocated but unclaimed blocks, and then check for unclaimed inodes. This is a simple task and can be done rapidly. Ext2, on the other hand, makes no guarantee of ordered disk writes. Therefore, fsck must go through and check every directory entry, every inode, and every block to see if everything is in shape. Essentially, ext2 fsck looks at the entire disk, whereas ffs fsck only looks at a small portion of it. The result is quite simple: on a 20G hard disk, I once had linux filling all the space. When the filesystems were dirty, I had to wait 15-20 minutes alone for the fsck operation to complete. With FFS, when something goes wrong, I can boot to single-user, fsck everything (the same 20G is now FFS-ized), and reboot (to check that the system comes up normally) in less than 5 minutes. Of course, there are other time-saving features, too. Linux systems don't allow you to mount your filesystems unless they are clean, because doing otherwise would be hazardous to your data. Thus you cannot boot until you've checked every auto-mounted filesystem. With FFS and soft updates, a few unclaimed inodes and blocks aren't hurting your data, so you can go ahead and mount dirty filesystems. This is why FreeBSD never forces a manual check on you at boot time. Later, when the system is running, you can run fsck to reclaim the blocks and inodes at your convenience. Again, this is perfectly safe. I like to fsck after every problem, though, because I am a Nazi when it comes to system administration. > I have no memory of any filesize limitation on > FreeBSD and would like to know if there is anything > similar to the Linux 2GB limit? I don't deal with files that large, but I am virtually certain this limitation does not exist. Certainly there is a limitation in every filesystem, but I believe that FFS's limitations are so ridiculously large, nobody will run into them for a long time. I believe the filesystem size is limited to a few terabytes, although this is less of a problem than it is for, say, Windows machines: UNIX likes to divide filesystems up, so even on multiple-terabytes systems individual partitions won't be terabytes large. Windows, on the other hand, likes to lump everything together. I know this has nothing to do with file size, but it's an interesting fact. -- Andrew Hesford ajh3@chmod.ath.cx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010414101548.A91019>