From owner-freebsd-stable@FreeBSD.ORG Mon Nov 30 00:31:09 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 EC030106566C for ; Mon, 30 Nov 2009 00:31:09 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6BEFB8FC17 for ; Mon, 30 Nov 2009 00:31:09 +0000 (UTC) Received: from inchoate.gsoft.com.au ([203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id nAU0V6Zh073595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 30 Nov 2009 11:01:06 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-stable@freebsd.org Date: Mon, 30 Nov 2009 11:01:03 +1030 User-Agent: KMail/1.9.10 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1995073.iMKMxeipkr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200911301101.05002.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Pete French 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:31:10 -0000 --nextPart1995073.iMKMxeipkr Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 30 Nov 2009, Pete French wrote: > 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... You can run dumpfs, eg line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location` eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ ]/pri= ntf %0x $((0x\1 << 32 | 0x\2))/p'` I use this in a script to determine the ID so I can modify fstab after the install has finished. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1995073.iMKMxeipkr Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBLExJI5ZPcIHs/zowRAueSAJ4phAyi3jU5wlJxOoeZEcA4HdqLPQCfeOx0 lvrCCSPz+Zyt/oBmGSYJLLg= =r7pl -----END PGP SIGNATURE----- --nextPart1995073.iMKMxeipkr--