From owner-freebsd-stable@FreeBSD.ORG Mon Nov 30 00:23:48 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 348C0106566B for ; Mon, 30 Nov 2009 00:23:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id EC8238FC17 for ; Mon, 30 Nov 2009 00:23:47 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id nAU0NkO1042470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 29 Nov 2009 18:23:46 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id nAU0NjlB009103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 29 Nov 2009 18:23:45 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id nAU0NjPK009082; Sun, 29 Nov 2009 18:23:45 -0600 (CST) (envelope-from dan) Date: Sun, 29 Nov 2009 18:23:45 -0600 From: Dan Nelson To: Pete French Message-ID: <20091130002344.GL89004@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Sun, 29 Nov 2009 18:23:46 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-stable@freebsd.org Subject: Re: how to get the UFSID of a mounted filesystem ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 00:23:48 -0000 In the last episode (Nov 30), Pete French said: > I observer that when I mount a UFS filesystem using the device name then > the entry vanishes from /dev/ufsid, and glabel list no longer shows the > device. Which begs the question, how do I find out the ufsid of a mountde > filesystem (e.g. '/' so that I can change it's fstab entry for the next > reboot?) > > Am slightly embarassed to have to ask for help! Am sure this was easy and > in dmesg last time I did this... Easiest way is to run dumpfs on the device you currently have mounted. The fsid will be on the 2nd line of the output: (root@studio) /root># dumpfs /dev/da2s1a | head -2 magic 19540119 (UFS2) time Sun Nov 29 18:19:39 2009 superblock location 65536 id [ 49b21fba 667e8575 ] Next easiest is to run "mount -v" as root, which will give you the fsid, but byte-swapped so you have to mess with it to get a value that matches what glabel expects: /dev/ufsid/49b21fba667e8575 on /tmp/z (ufs, local, soft-updates, fsid ba1fb24975857e66) -- Dan Nelson dnelson@allantgroup.com