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=`dumpfs 2> /dev/null $1 | head | grep superblock\ location`
eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ ]/printf 
%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.

-- 
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

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to