> I took the working, bootable hard drive
> out of my laptop, put it into an external USB disk
> enclosure, and tried to boot from it, but got an
> error.  (The reason for this is because I am
> planning on installing a new hard drive soon)
> 
> Normally the computer resets too quickly to see
> the error, but booting with -k lets me see the error,
> being:
> spa_import_rootpool: Error 22
> panic - cannot mount root path /[EMAIL PROTECTED],0/[EMAIL 
> PROTECTED],2/[EMAIL PROTECTED]/[EMAIL PROTECTED],0.

Hmm, looks like ZFS root / boot ...
 
> NOTE:  This is EXACTLY the same device as
> shown by format for the disk when it installed
> internally in the laptop drive bay, which doesn't
> make sense as the disk is connected a different
> controller and uses a different driver path when
> connected via USB.

Yep.

> Why would Solaris look for the device in the old location? 
> Is this configured somewhere?

It is stored in the zpool's label (not in a file).

E.g. when you run the zdb command it'll dump
the zpool configuration information:


% zdb 
files
    version=3
    name='files'
    state=0
    txg=5191231
    pool_guid=2500842346686695002
    hostid=740952579
    hostname='tiger2'
    vdev_tree
        type='root'
        id=0
        guid=2500842346686695002
        children[0]
                type='mirror'
                id=0
                guid=2492621864330757623
                metaslab_array=14
                metaslab_shift=30
                ashift=9
                asize=107376279552
                is_log=0
                children[0]
                        type='disk'
                        id=0
                        guid=17892157850176992810
                        path='/dev/dsk/c8t0d0s6'
                        devid='id1,[EMAIL PROTECTED]/g'
                        phys_path='/[EMAIL PROTECTED],0/pci1043,[EMAIL 
PROTECTED]/[EMAIL PROTECTED],0:g'             <<<<<<<<<<<<<<<<
                        whole_disk=0
                        DTL=174
                children[1]
                        type='disk'
                        id=1
                        guid=13798593281011804059
                        path='/dev/dsk/c9t0d0s6'
                        devid='id1,[EMAIL PROTECTED]/g'
                        phys_path='/[EMAIL PROTECTED],0/pci1043,[EMAIL 
PROTECTED]/[EMAIL PROTECTED],0:g'            <<<<<<<<<<<<<<<<<
                        whole_disk=0
                        DTL=173



GRUB extracts the "phys_path" information from the zpool's label,
and passes it as arguments to the loaded Solaris kernel, which tries
to uses these bogus physical paths trying to mount the pool, and 
fails.


Solution is to boot the Solaris failsafe entry when the disk is connected
to the new computer, and let it mount / import the root pool.  That's all.
Reboot, and try to boot the standard Solaris kernel.

Importing the root pool when the disk is attached on the new computer
has the side effect that the pool configuration information is updated
on disk, so that with the next boot attempt from the pool, GRUB should
pass the correct new physical device paths to the loaded Solaris kernel.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-help mailing list
[email protected]

Reply via email to