From owner-freebsd-questions@FreeBSD.ORG Mon Nov 16 03:21:35 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 342BA106566B for ; Mon, 16 Nov 2009 03:21:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id CF0968FC08 for ; Mon, 16 Nov 2009 03:21:34 +0000 (UTC) Received: from r55.edvax.de (port-92-195-53-77.dynamic.qsc.de [92.195.53.77]) by mx02.qsc.de (Postfix) with ESMTP id 026B51F6B9; Mon, 16 Nov 2009 04:21:32 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id nAG3LVMU003565; Mon, 16 Nov 2009 04:21:32 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 16 Nov 2009 04:21:31 +0100 From: Polytropon To: David Allen Message-Id: <20091116042131.d522b7f6.freebsd@edvax.de> In-Reply-To: <2daa8b4e0911151823sd98f726ma4b8eebf05b16dd0@mail.gmail.com> References: <2daa8b4e0911151823sd98f726ma4b8eebf05b16dd0@mail.gmail.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: 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 Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 03:21:35 -0000 On Sun, 15 Nov 2009 19:23:15 -0700, David Allen wrote: > 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 The Handbook says in 18.3.1 sub 3: A disk can have up to eight partitions, labeled a-h. A few of the partition labels have special uses. The a partition is used for the root partition (/). Thus only your system disk (e.g, the disk you boot from) should have an a partition. The b partition is used for swap partitions, and you may have many disks with swap partitions. The c partition addresses the entire disk in dedicated mode, or the entire FreeBSD slice in slice mode. The other partitions are for general use. Note the last sentence. Due to this statement, I think the usage of 'e' is arbitrary, 'd' could be okay, too, but when the Handbook says 'e' in the example (maybe with the intention of 'e' like in 'example'?), you can use 'e', too, especially when you want to use more than one partition. I have to admit that I never put slices on extra hard disks, I'm always using the whole disk, so # newfs /dev/ad3 would give me /dev/ad3 (which is the same as /dev/ad3c), and the entry /dev/ad3 /foo ufs rw 2 2 would go into fstab. I'm sure you already know this because it seems that you read up until 18.3.2.2 - you're omitting slices, "dedicated" mode. :-) Bottom line: The naming convention mentioned in the Handbook and your examples are completely okay. > 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. That's completely intended. :-) > 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 I would say: No. The entry for those partitions should rather be: /dev/ad1e.eli /home/david/private ufs rw,noauto 0 0 /dev/ad3e /fake ufs rw,noauto 0 0 /dev/ad3f /reserved ufs rw,noauto 0 0 The "ufs" in the FS field tells the system which FS to use when later mounting (e. g. with requiring a pass phrase from the operator), and "noauto" in the options field that prohibits mounting the file system at startup. If you used "xx" in the FS field, you could not easily # mount /reserved because the mount command wouldn't know which FS to use (allthough I think UFS might be a default here). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...