From owner-freebsd-questions@FreeBSD.ORG Sun Oct 18 09:31:34 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 955EB106566C for ; Sun, 18 Oct 2009 09:31:34 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id ED7338FC14 for ; Sun, 18 Oct 2009 09:31:33 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so1470482fga.13 for ; Sun, 18 Oct 2009 02:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=uJj6soUqnNrp5WoyrlA/lMdvkX6J/wM861THqzI5W6M=; b=JX631Z6XDBx6s2+J/kZbgK2dg4ZtQiy0kTmQ6ZWig6Lm8ZYv39qHfjcUY5SvYdEty9 d0ECOmXpd8rW5LLsN4doFCjIXlGI8n9IUFXNFse5PfaCsQbeBzasdHVq55qqtiQCGFVL 881FlDICCth6yreEY8My0M1UlmPEm6VVu3uys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=jorJGNaHTeFFciQI8owpKgZFfMmA8ngbpgxSeAu1GxIKdHCN5UoTBIJKruCYvOB4r/ +h0GyBi4xGMyY3kmsTzu5ELWoGmL79fAwsIx1J4QqLhasnW6uZ7EUuTSRaQqUwbfGz/I ByfsgB0KGy1EMKARR7vawTrmnzmG9QzSHaF5I= MIME-Version: 1.0 Received: by 10.239.141.131 with SMTP id c3mr304373hba.44.1255858292743; Sun, 18 Oct 2009 02:31:32 -0700 (PDT) In-Reply-To: <4ADA4A7C.6030003@gmail.com> References: <4AD8EB8F.9010900@videotron.ca> <4AD95740.6010408@gmail.com> <4ADA3D48.70307@videotron.ca> <4ADA4A7C.6030003@gmail.com> Date: Sun, 18 Oct 2009 10:31:32 +0100 Message-ID: From: krad To: michael Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: PJ , 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: Sun, 18 Oct 2009 09:31:34 -0000 2009/10/17 michael > PJ wrote: > >> michael wrote: >> >> >>> 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) >>>> < >>>> http://www.freebsd.org/cgi/man.cgi?query=tunefs&sektion=8&apropos=0&manpath=FreeBSD+7.2-RELEASE >>>> >. >>>> >>>> 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? >>>> >>>> Do people who write this stuff ever read it? Tell me that 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! >>>> _______________________________________________ >>>> freebsd-questions@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>>> To unsubscribe, send any mail to >>>> "freebsd-questions-unsubscribe@freebsd.org" >>>> >>>> >>> ok, in short since i didn't see anyone answer this directly, your >>> question of tunefs vs glabel: >>> >>> tunefs is for UFS: it labels a UFS filesystem, no matter the device, >>> ie: ad or da. tunefs is part of the filesystem utilities for UFS. >>> good example, can't tunefs -L SWAP /dev/ad0s1b if it is a swap. you >>> can glabel it. >>> >>> glabel is for labeling a device itself. you can glabel an ntfs >>> filesystem or ext2, whatever. >>> >>> >>> >>> >> Thanks for that, Michael. >> But can you explain what this means? It just is not clear for me. >> "# tu;nefs -L home /dev/da3" >> This puts a label on that disk? So now it can be referred to as home? >> da3 = home ? >> >> I'll try to delve into the man glabel further... but things still look >> murky. >> >> >> > tunefs -L HOME /dev/da3 will put the label /dev/ufs/HOME pointing to > /dev/da3 . da3=home. exactly correct. > the main idea behind that is that you can move the device around, etc. > since fstab is looking in /dev/ufs/NAMES_OF_DISKS/PARTITIONS instead of > /dev/da[0-9] type setup. you can move it to any controller and still boot(if > you have the driver for the controller). > > the glabel command can label ANY disk/slice/partition. its great when you > get away form the old mbr setup and switch to gpt. gpt lets you have an > arbitrary number of partitions. and when you think about it, names are so > much better than numbers anyway, its why we use DNS on networks. imagine > having to remember every ip you have to use. > > peace > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > "arbitrary number of partitions" erm 128 IIRC, so practically yes