Little UFS2 FAQ (20023/04/23, v9), culled from contributions by: "Alex Wilkinson" "Alexander Pohoyda" "Anthony CARTER" "Bruce Evans" "David Schultz" "Frank van der Linden" "Manfred Antar" "Marcin Dalecki" "Narvi" "Peter Schultz" "Poul-Henning Kamp" "Robert Watson" "Takahashi Yoshihiro" "Terry Lambert" "The Anarcat" Changes can be sent to . Permalink: http://jeroen.vangelderen.org/stuff/Little_UFS2_FAQ.txt Which OSes support UFS2? FreeBSD 5-CURRENT and NetBSD. (Others?) Is this FAQ (and UFS2) applicable to FreeBSD 4-STABLE? Nope. An MFC is not planned. What is UFS1? The long-time BSD(?) native filesystem. What is UFS2? UFS2 -introduced in FreeBSD 5-CURRENT- is an extension to the well-known UFS. It adds 64 bit block pointers (breaking the 1T barrier), support for extended file storage, and a few other things. Short summary of changes: o 64-bit pointers up the wazoo (implies that inodes have doubled in size, and now are 256 bytes) o Layout and functional changes to help support variable-size blocks (extent-like allocation) o Extension of various flag fields o Addition of per-inode extended attribute extent o Lazy inode initialization (watch newfs(8) fly) Apart from these modifications all UFS1 code is being used in UFS2 unchanged. What is the difference between UFS and FFS? UFS (and UFS2) define on-disk data layout. FFS sits on top of UFS (1 or 2) and provides directory structure information, etc, etc. This FAQ is about a revision of UFS named UFS2. What is the rationale for UFS2? The motivating factor in the layout change was the need for better Extended Attribute (EA) support, and while the developers were at it they figured they'd do a bunch of other useful things too. UFS2 uses the same basic technologies as modern UFS1 (inodes, linear directory layout, soft updates, snapshotting, background file system checking, etc) so it was a relatively low-risk change. Why did you not add while you were at it? It would most likely require significant changes whereas the developers wanted to restrict themselves to low-risk modifications only. See previous question. Does UFS2 offer any performance improvement over UFS1? UFS2 has the potential to be faster for really large files by using jumbo blocks, but the code to do that has yet to be written. Additionally, because inodes lazily initialized in UFS2, newfs(8) runs much faster. Other than that, UFS2 performance should not significantly differ from UFS1. What is the UFS2 status on FreeBSD? As of 2003/04/20, newfs(8) and sysinstall(8) will create UFS2 file systems by default, unless explicitly specified. Users wanting to create UFS1 file systems for whatever reason (interoperability with earlier versions, etc) should be sure to employ the -O1 flag to newfs(8), or hit '1' in the label editor in sysinstall(8) to select UFS1. NOTE: PC98 machines machines are excempt and still default to UFS1. See "On which platforms can UFS2 be used as root filesystem?". What is the UFS2 status on NetBSD? As of 2003/04/02 UFS2 is not (yet) the default type for FFS filesystems. newfs(8) will create a normal FFS filesystem by default. If you want an UFS2 fileystem, specify "-O 2" as an option. No additional kernel options are needed for UFS2 support, it's contained within the FFS code. Please note that older fsck binaries will complain a bit about filesystems if you boot a new kernel, because of some superblock changes. This is harmless. However, if you have 1.6 fsck binaries, they will signal a fatal superblock mismatch with the first alternate, because they compare too many fields (even ones that aren't useful). This is annoying, and I'd advise peole to upgrade their fsck_ffs binary before using a new kernel. 1.6.1 will have an fsck that is forward compatible. Again, none of this signals actual filesystem damage, but it's still annoying. On which platforms can UFS2 be used as root filesystem? The answer to this is defined by /boot/loader. FreeBSD Alpha, IA64, and Sparc have no problems. On FreeBSD i386, the answer is yes, modulo the restriction that your root filesystem cannot be larger than 1.5TB. (David Schultz et al. proposed a patch to remove this limitation.) FreeBSD PC98 does not support UFS2 root partitions and it is unknown if work is underway to address this. NetBSD support I don't know anything about.. Is there a UFS to UFS2 conversion tool? No, but see next question. Will "dump" on UFS and "restore" on UFS2 filesystem work? Yes, that will work. Does UFS2 dynamically allocate inodes? No it does not. Inodes are preallocated, but UFS2 lazily initializes them. This mainly means that newfs(8) runs much faster. Does Grub work with UFS2? No. Not yet(?).