From owner-freebsd-questions@FreeBSD.ORG Mon Nov 16 16:04:40 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9080C1065676 for ; Mon, 16 Nov 2009 16:04:40 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id E0C828FC13 for ; Mon, 16 Nov 2009 16:04:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id nAGG4SCw018937; Tue, 17 Nov 2009 03:04:29 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 17 Nov 2009 03:04:27 +1100 (EST) From: Ian Smith To: David Allen In-Reply-To: <20091116120014.A477010656F8@hub.freebsd.org> Message-ID: <20091117022555.Y65262@sola.nimnet.asn.au> References: <20091116120014.A477010656F8@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Polytropon , freebsd-questions@freebsd.org Subject: Re: Partition naming, fstab, and geli X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 16:04:40 -0000 In freebsd-questions Digest, Vol 285, Issue 2, Message 2 On Sun, 15 Nov 2009 19:23:15 -0700 David Allen wrote: > Say I have performed a standard installation of FreeBSD onto a single IDE > drive with the following entries in /etc/fstab: > > /dev/ad0s1b none swap sw 0 0 > /dev/ad0s1a / ufs rw 1 1 > /dev/ad0s1d /var ufs rw 2 2 > /dev/ad0s1e /tmp ufs rw 2 2 > /dev/ad0s1f /usr ufs rw 2 2 > > Then I added more drives. > > 1. The Handbook suggests there is a convention that when partitioning a a > drive that's been added, to label the first new partition on that drive as > 'e' as opposed to 'a' (which is reserved for the /root partition). Does > the following satisfy that convention, or would starting with 'a' in each > case make more sense? > > /dev/ad1e /foo1 ufs rw 2 2 > /dev/ad1f /bar1 ufs rw 2 2 > /dev/ad1g /baz1 ufs rw 2 2 > > /dev/ad2e /foo2 ufs rw 2 2 > /dev/ad2f /bar2 ufs rw 2 2 > > /dev/ad3e /foo3 ufs rw 2 2 > /dev/ad3f /bar3 ufs rw 2 2 If you added these with sysinstall (or sade) it will tend to choose 'd' for the first partition on other than the / partition (which is named 'a' on install). Or at least, it's always started with 'd' for me :) But if you're doing it manually starting with 'e' is fine. I suspect the handbook section you quoted to Polytropon later is more an example than definitive. You can happily mount an 'a' partition from another drive that was once a system disk; it's more of a convention really. > 2. My second question is in regards to using the 'xx' fstype to have the > system ignore that device. > > Consider, for example, a geli encrypted partition. The .eli device > doesn't exist at boot time. I discovered by accident that the system > won't boot with an fstab entry for a device that doesn't exist. So if I > was to record an entry in fstab, I couldn't use > > /dev/ad1e.eli /home/david/private ufs rw 0 0 > > Does that mean that the following is what's typically to record fstab > entries for ignored devices? > > /dev/ad1e.eli /home/david/private xx rw 0 0 > /dev/ad3e /fake xx rw 0 0 > /dev/ad3f /reserved xx rw 0 0 Yes. Here I must differ with Polytropon, though your format for the options isn't perhaps quite right. From an old fstab here: # Device Mountpoint FStype Options Dump Pass# /dev/acd0 /cdrom cd9660 ro,noauto 0 0 /dev/ad0s1 /dos msdosfs ro,noauto 0 0 /dev/ad0s2b none swap sw 0 0 /dev/ad0s2a / ufs rw 1 1 /dev/ad0s2d /var ufs rw,noatime 2 2 /dev/ad0s2e /usr ufs rw,noatime 2 2 /dev/ad0s4d /paqi4.5 ufs ro,noauto,nodev,noexec,nosymfollow,noatime 2 3 /dev/ad0s4e /paqi4.5/var ufs ro,noauto,nodev,noexec,nosymfollow,noatime 2 4 /dev/ad0s4f /paqi4.5/usr ufs ro,noauto,nodev,noexec,nosymfollow,noatime 2 4 # 25Apr06 ext 20Gb USB disk. DON'T autoadd these, deadly if da0 absent! # .. xx fsopts, everything incl fsck must ignore .. /dev/da0s3d /usbdsk ufs xx,noauto,nosymfollow 3 3 /dev/da0s3e /usbdsk/var ufs xx,noauto,nosymfollow 4 4 /dev/da0s3f /usbdsk/usr ufs xx,noauto,nosymfollow 4 4 # 26May06 shintaro 1G flashdrive .. just doc, can't mount using these .. /dev/da0s1 /flash/dos msdosfs xx,noauto 0 0 /dev/da0s2d /flash/ufs ufs xx,noauto,noatime 3 3 /dev/da0s3d /flash/pvt ufs xx,noauto,noatime 3 3 As you say they're useful for doc, and not hard to edit into action. Note the additions above were assigned starting at 'd' by sysinstall. cheers, Ian