From owner-freebsd-questions@FreeBSD.ORG Fri Oct 16 22:40:19 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 A05EC106566C for ; Fri, 16 Oct 2009 22:40:19 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from aiolos.otenet.gr (aiolos.otenet.gr [83.235.67.30]) by mx1.freebsd.org (Postfix) with ESMTP id 292F98FC19 for ; Fri, 16 Oct 2009 22:40:18 +0000 (UTC) Received: from pulstar.local (athedsl-4467958.home.otenet.gr [94.71.108.230]) by aiolos.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id n9GMeHJJ012497; Sat, 17 Oct 2009 01:40:17 +0300 Message-ID: <4AD8F651.1000001@otenet.gr> Date: Sat, 17 Oct 2009 01:40:17 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: PJ References: <4AD8EB8F.9010900@videotron.ca> In-Reply-To: <4AD8EB8F.9010900@videotron.ca> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" Subject: Re: I hate to bitch but bitch I must 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: Fri, 16 Oct 2009 22:40:19 -0000 PJ wrote: > Why is it that the manual pages, as thorough as they may be, are very, > very confusing. > Perhaps I am being too wary, but I find that too many > instructions/examples are stumbling blocks to appreciation of the whole > system: > for instance, let's look at the instructions for changing disk labels > with glabel or is it tunefs ? > man glabel(8): > > for UFS the file system label is set with > tunefs(8) > . > what happened to glabel? > man tunefs(8) > The *tunefs* utility cannot be > run on an active file system. To change an active file system, it must > be downgraded to read-only or unmounted. > > So, you have to run tunefs from an active file system to modify another > disk? > but from man tunefs: > BUGS > This utility should work on active file systems. > What in hades does this mean--just above it says cannot be run on active > file systems. ??? > To change the root file > system, the system must be rebooted after the file system is tuned. > > You can tune a file system, but you cannot tune a fish. > How cute... And fish eat bugs. > > Seriously, now to the manual: > To create a permanent label for a UFS2 file system without destroying > any data, issue the following command: > # tunefs -L /home/ /dev/da3 > > Oh? home is what? What does this have to do with the partitions? > Here's from man glabel(8): > > EXAMPLES > The following example shows how to set up a label for disk ``da2'', cre- > ate a file system on it, and mount it: > glabel label -v usr /dev/da2 > newfs /dev/label/usr > mount /dev/label/usr /usr > [...] > umount /usr > glabel stop usr > glabel unload > > The next example shows how to set up a label for a UFS file system: > tunefs -L data /dev/da4s1a > mount /dev/ufs/data /mnt/data > > Am I to understand that glabel is only for a new system? What's with the > newfs... I'm trying to set labels on an system that is already set up. > And, the glabel examle above is not for UFS file systems? Oh, that's for > tunefs? > So why are we even dealing with this glabel? > > from manual: > # tunefs -L /home/ //dev/da3/ > A label should now exist in /dev/ufs which may be added to /etc/fstab: > /dev/ufs/home /home ufs rw 2 2 > > Why? Is this necessary? and somewhere I saw "tunefs -L volume > /dev/da0s1a" or something like that. Does that mean that each partition > should be tunefsd? Maybe the guys who programmed this stuff understand; > I sure don't. I just want to be able to set the labels according to what > they say can be done... so shy not have a clear and concise explanation? > > Relax. You are having a bad day, and you are topping it by trying to perform some stuff while you are not in the right state of mind. If you do insist on continuing with this, do the following: Make a list of your partitions - I'll assume a device name of /dev/ad1 for the disk. You should have: ad1s1a for root => Label this as rootfs ad1s1b for swap => Label this as swap ad1s1e for tmp => Label this as tmpfs ad1s1d for var => Label this as varfs ad1s1f for usr => Label this as usrfs If you are unsure of the device names, try ls /dev/ad* (or ls /dev/da* if you are using SCSI disks, which I think you are not) Now, reboot: shutdown -r now Press 4 and enter single user mode in the loader. In the single user mode prompt type: glabel label rootfs /dev/ad1s1a glabel label swap /dev/ad1s1b glabel label tmpfs /dev/ad1s1e glabel label varfs /dev/ad1s1d glabel label usrfs /dev/ad1s1f You should get no error messages from these. Type exit and continue to multiuser boot. Change /etc/fstab: change /dev/ad1s1a to /dev/label/rootfs /dev/ad1s1b to /dev/label/swap and so on. Reboot once again. Everything should work. > Do people who write this stuff ever read it? Tell me t Yes, we do. All the time actually. > hat its clear and > simple and to the point... so far, I have been running back and forth > between half a dozen web pages trying to understand what is going on... > and doing things through a dense fog does not produce creative results!___ > > You will have best results when trying with a clear mind. Also having a test system (or a VMware / Virtualbox machine) will help you learn and practice unknown procedures without the anxiety of breaking something on your production system.