Date: Sun, 24 Apr 2011 22:55:41 -0600 From: Warner Losh <imp@bsdimp.com> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: svn-src-head@freebsd.org, Alexander Motin <mav@freebsd.org>, src-committers@freebsd.org, Andrey Chernov <ache@freebsd.org>, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head Message-ID: <E5C45DAC-6014-42E2-9E1C-BFB7D54EBCB4@bsdimp.com> In-Reply-To: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 24, 2011, at 11:34 AM, Daniel O'Connor wrote: >=20 > 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? >=20 > 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. I've been running with ufs labels for a couple of years now, since the = first rumblings of this hit the streets. They work great no matter what = the underlying partitioning scheme. The one drawback is that if you = have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... > gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS = ID. >=20 > The following shell snippet will generate the UFS ID for a given FS. >=20 > 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'` > } This is also good. Warner=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E5C45DAC-6014-42E2-9E1C-BFB7D54EBCB4>