Date: Sun, 24 Apr 2011 19:34:05 +0200 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Andrey Chernov <ache@freebsd.org> Cc: svn-src-head@freebsd.org, Alexander Motin <mav@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head Message-ID: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> In-Reply-To: <20110424161933.GA18775@vniz.net> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24/04/2011, at 18:19, Andrey Chernov wrote:
> On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote:
>> ATA device names in /etc/fstab or other places, make sure to =
update
>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX =
-> saY,
>> - where 'Y's are the sequential numbers for each type in order of
>> - detection, unless configured otherwise with tunables, see =
cam(4)).
>> + where 'Y's are the sequential numbers starting from zero for =
each type
>> + in order of detection, unless configured otherwise with =
tunables,
>> + see cam(4)).
>=20
> Is there any way to guess resulting 'Y' numbers _before_ booting new=20=
> kernel? I have remote machine with console access almost impossible =
(very=20
> hard for me).
>=20
> It seems something like
> vfs.root.mountfrom=3D"ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..."
> (up to max channels) helps to find root, but what about other mounted=20=
> disks?
The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are on =
a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't.
gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS =
ID.
The following shell snippet will generate the UFS ID for a given FS.
getfsid() {
line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location`
if [ $? -ne 0 ]; then
return 1
fi
# dumpfs doesn't print leading 0s
eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ =
]/printf %0x $((0x\1 << 32 | 0x\2))/p'`
}
--
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A>
