Re: [OpenIndiana-discuss] livecd zpool import -fR /a xpool but no files

2010-11-29 Thread Harry Putnam
Frank Middleton  writes:

> On 11/29/10 10:48, Calum Mackay wrote:
>> On 29/11/10 15:34, Frank Middleton wrote:
>>> Just a guess, but shouldn't the mountpoint first be set back to "/"
>>>
>>> zfs umount newrpool/ROOT/openindiana
>>> zfs set mountpoint=/ newrpool/ROOT/openindiana
>>> zpool export newrpool
>>
>> I did not find that to be necessary in my own tests...
>
> Yes, I guess the bootfs property overrides it, and it's incorrect, anyway:
> zfs set mountpoint=legacy
> but as you say it doesn't seem to make any difference. As a result I
> wonder why importing a bootable root pool doesn't mount its root
> automatically. Are there any use cases where the current behavior
> is useful? A recursive option like import -r might be handy...
>
>> Also, note the above would likely render the system unbootable, as it
>> would leave the pool named as newrpool (as per previous emails).
>
> Unless it started out life as newrpool :-).
>
> That is undoubtedly why the OP had the problem...

hehe... no, that wasn't it.  Being OP, I can say that when I first
booted from livecd... I ran zpool import but saw something called
xpool.

I think I may have meddled around a bit before running that.   Can't
recall for sure now, but it seems mighty suspicious that the
information I was working from on my first attempt mentions xpool in
it.

I'd say its a good bet I blundered around with zpool and managed to
rename rpool to xpool in a frenzy of ill-informed flailing.

Also the instructions I was working from was not about recuing rpool
but other zpools so I imagine the author use xpool as a generic name.

I did not exercise the normal cautions since the OS being rescued was
a newly installed vbox oi that I had not done much with yet so no
great loss was threatened.

If I emerge from this experiment with enough info to do a
rescue... I'm a happy camper, even if I did go ahead and just
reinstall from livecd rather than keep mucking around, I think I could
do a rescue now if need be.



___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] livecd zpool import -fR /a xpool but no files

2010-11-29 Thread Frank Middleton

On 11/29/10 10:48, Calum Mackay wrote:

On 29/11/10 15:34, Frank Middleton wrote:

Just a guess, but shouldn't the mountpoint first be set back to "/"

zfs umount newrpool/ROOT/openindiana
zfs set mountpoint=/ newrpool/ROOT/openindiana
zpool export newrpool


I did not find that to be necessary in my own tests...


Yes, I guess the bootfs property overrides it, and it's incorrect, anyway:
zfs set mountpoint=legacy
but as you say it doesn't seem to make any difference. As a result I
wonder why importing a bootable root pool doesn't mount its root
automatically. Are there any use cases where the current behavior
is useful? A recursive option like import -r might be handy...


Also, note the above would likely render the system unbootable, as it
would leave the pool named as newrpool (as per previous emails).


Unless it started out life as newrpool :-).

That is undoubtedly why the OP had the problem...

Cheers -- Frank

___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] livecd zpool import -fR /a xpool but no files

2010-11-29 Thread Harry Putnam
Calum Mackay  writes:

> On 29/11/10 15:34, Frank Middleton wrote:
>> Just a guess, but shouldn't the mountpoint first be set back to "/"
>>
>> zfs umount newrpool/ROOT/openindiana
>> zfs set mountpoint=/ newrpool/ROOT/openindiana
>> zpool export newrpool
>
> I did not find that to be necessary in my own tests...
>
> Also, note the above would likely render the system unbootable, as it
> would leave the pool named as newrpool (as per previous emails).

Excellent point.

I did reboot a new install with livecd and also found as you did no
evidence of an `xpool'.  Not sure how that might of crept in first
time around... but its a safe bet it was some untoward action on my
part.

>From livecd, `zpool import' sees rpool from existing install.  I can
confirm what you noticed.

I'd like to try a quick a summary of what the method consists of for
booting from livecd for rescue purposes just to see if I'm missing
an important step before I commit an outline to my own cvs repo of
notes and scripts etc I keep.

boot problem os with livecd (for now... openindiana b 147)

Once you gotten logged into live cd run:

   zpool import

Just to see what is available.

Hopefully you will see the existing rpool with a long ID number
associated with it.

run (These commands I glommed from Calum M s' posts):

   zpool import -f -R /a rpool

   zfs set mountpoint=/b rpool/ROOT/openindiana

   zfs mount rpool/ROOT/openindiana

This is safe because the livecd has no rpool.

Now access to the prior install is at 
   
 /a/b/*

Here you will find etc and all the other directories and files from a
previous install.

Once you've done whatever steps you thought necessary for rescuing the
problem OS.

Make your escape with:

zpool export rpool

shutdown, remove the livecd and boot from harddisk...Keeping your
fingers crossed that your rescue was effective... but the procedure
for getting into position to do rescue work laid out above should not 
bring grief by itself.


___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] livecd zpool import -fR /a xpool but no files

2010-11-29 Thread Calum Mackay

On 29/11/10 15:34, Frank Middleton wrote:

Just a guess, but shouldn't the mountpoint first be set back to "/"

zfs umount newrpool/ROOT/openindiana
zfs set mountpoint=/ newrpool/ROOT/openindiana
zpool export newrpool


I did not find that to be necessary in my own tests...

Also, note the above would likely render the system unbootable, as it 
would leave the pool named as newrpool (as per previous emails).


cheers,
calum.

Oracle Corporation.



___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] livecd zpool import -fR /a xpool but no files

2010-11-29 Thread Frank Middleton

On 11/27/10 17:14, Calum Mackay wrote:


zpool import -f -R /a rpool newrpool
zfs set mountpoint=/b newrpool/ROOT/openindiana
zfs mount newrpool/ROOT/openindiana

...

 On 11/29/10 02:57, Harry Putnam wrote:


but on reboot I just get a grub prompt.


Just a guess, but shouldn't the mountpoint first be set back to "/"

zfs umount newrpool/ROOT/openindiana
zfs set mountpoint=/ newrpool/ROOT/openindiana
zpool export newrpool

Cheers -- Frank


___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss