From owner-freebsd-current@FreeBSD.ORG Wed Apr 23 06:20:46 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E07C37B401 for ; Wed, 23 Apr 2003 06:20:46 -0700 (PDT) Received: from possum.cryptohill.net (cambist.cryptohill.net [24.244.145.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 481AE43FBF for ; Wed, 23 Apr 2003 06:20:45 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (catv7146.extern.kun.nl [131.174.117.146]) by possum.cryptohill.net (Postfix) with ESMTP id 9CC25AE2D1 for ; Wed, 23 Apr 2003 09:20:43 -0400 (EDT) Date: Wed, 23 Apr 2003 15:20:47 +0200 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed From: "Jeroen C. van Gelderen" To: current@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <64FEF4DA-758E-11D7-9A25-000393754B1C@vangelderen.org> X-Mailer: Apple Mail (2.552) Subject: Little UFS2 FAQ X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2003 13:20:46 -0000 Little UFS2 FAQ (20023/04/23), culled from contributions by: Peter Schultz "Poul-Henning Kamp" Marcin Dalecki CARTER Anthony Robert Watson Terry Lambert Frank van der Linden Manfred Antar Narvi Takahashi Yoshihiro Alexander Pohoyda Bruce Evans "Wilkinson,Alex" What is UFS1? The long-time BSD(?) native filesystem. What is UFS2? UFS2 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. Which OSes support UFS2? FreeBSD and NetBSD. (Others?) 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. 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. Does the /boot/loader now understand UFS2 on the root filesystem (i386)? 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. Does the /boot/loader now understand UFS2 on the root filesystem (PC98)? Nope. It is unknown if work is underway to address this. Is there a UFS to UFS2 conversion tool? No. You can however dump/restore from UFS to UFS2. 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(?). -- Jeroen C. van Gelderen - jeroen@vangelderen.org "They accused us of suppressing freedom of expression. This was a lie and we could not let them publish it." -- Nelba Blandon, Nicaraguan Interior Ministry Director of Censorship