Re: [OpenIndiana-discuss] installgrub still required when building mirrored rpool ?

2010-11-28 Thread Pasi Kärkkäinen
On Sat, Nov 27, 2010 at 10:15:22AM +0100, Roy Sigurd Karlsbakk wrote:
> - Original Message -
> > Hi,
> > 
> > Seems a bit trivial with all the talk of Solaris11 express, oracle
> > etc.
> > 
> > But, just did a first install of OI. Didn't get the "warning" message
> > to
> > to run installgrub after running the zpool attach command to create
> > a mirrored rpool.
> > Last opensol install was 134. Is installgrub legacy ?
> 
> It isn't. zpool attach won't touch the grub bits.
> 
> > Just destroyed the system by trying to install xvm-gui ! How come
> > solaris 11 express still has Xvm support and OI doesn't ?
> 
> IIRC xvm was reported to be removed from s11 some time back, due to Oracle 
> focusing on their own virtualisation platform. Why it's still there, I guess 
> only Oracle can tell you (and they probably don't)...
> 

IIRC Oracle didn't have time (yet) to completely remove it from the first 
release of Sol11 Express.

-- Pasi


___
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-28 Thread Harry Putnam
Calum Mackay  writes:

> On 27/11/10 22:14, Calum Mackay wrote:
>> If not, I got it to work here, something like this:
>
> Mind you, the above may not be wise: if you import your real rpool
> into the livecd, that may end up leaving the rpool in a state where it
> won't look right to the "real" environment... [i.e. previously used on
> a different system]
>
> So I'd test it on a disposable system before you do it for real...

Thanks.

This is a test system, and installed from the very livecd I'm hoping
to rescue it with.

Oh, your formula did work here too.  I was leaving out the final
`mount' and still expecting to see files gack.

>   zpool import -f -R /a rpool newrpool

>   zfs set mountpoint=/b newrpool/ROOT/openindiana

>   zfs mount newrpool/ROOT/openindiana

Yup, that formula works.

Although I will add that apparently A zpool seen by livecd is
apparently labeled xpool by default.

  Using live-cd build 147: `zpool import'

Will report seeing `xpool' with some long ID number.

If your warnings about changing files and later having the rpool give
problems when booted under the `real' environment are true then it
seems a bit weird that one can find so many references to rescuing a
system with the live-cd.

  `Can the live-cd actually be used in that way safely?'

That is something I'd really like to know... if you cannot change
anything for fear of later having troubles, how is a rescue to be done?

In this case, the system to be rescued was recently installed from
that very live-cd, so maybe that would lesson the likelyhood of
problems? 

Thanks for you input... I will know shortly, I hope, what the outcome is.

-  -  --=--  - --- -
What follows is a report of troubles apparently arising from importing
rpool, just as you warned.  A sorry tail of woe   .

No real harm has been done since it is a test system, only a fair bit
of time lost.
-  -  --=--  - --- -

Well it was not good.

(Preface with saying this is a virutal system running thru vbox, host
is windows 7)

I wanted to edit out something I had added to /etc/profile that I
suspect caused the OS not to work properly.

I suspected it was from my edit in /etc/profile which was the last
thing I remembered doing that changed any files.

After initial install from live-cd b 147 and after setting up the home
directories of user and root, I noticed that opening an xterm always
opened in / (root) instead of $HOME for $USER.

I checked that the $HOME envo variable was known... when a fresh xterm
was opened and it was,  echo $HOME showed the expected output.

I could not figure out why then, the xterms always were in `/' when
opened.  Perhaps `/home' was not mounted... but it was I could see:
and navigate to /export/home/myuser

I edited /etc/profile to tell any logging in user to cd to $HOME but also
added an echo, hoping it would show in the opened xterm so I'd know
that /etc/profile was getting read.

Something like:

  echo "/etc/profile was read"
  cd $HOME

in /etc/profile.

And it seemed to work so far as causing a fresh xterm to open on $HOME
rather than `/'.

All hunky dory until I rebooted.  I don't recall now what happened
exactly but it would not boot.

So naturally I figured my edit in /etc/profile was the problem.  I
suspected having output from /etc/profile was upsetting something.

-  -  --=--  - --- -

I rebooted with livecd , imported and mounted what had been rpool with
the forumula posted in this thread, edited etc/profile and rebooted.

Now I get only a grub prompt... no OS login.

OK, I thought OOOPS I probably should have exported the renamed rpool
back out as rpool.

OK, rebooted with livecd, imported what was now seen as `newpool' and
exported it as rpool rebooted.

Still I only get to a grub prompt.  No OS login.

I've forgotten the incantations for grub to get booted but anyway what
has happened?  How to understand what is going on?

In fact is there a path to resuce by using the livecd at all, or have
I just left out important steps?




___
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-28 Thread Calum Mackay

On 28/11/10 15:20, Harry Putnam wrote:

zpool import -f -R /a rpool newrpool


The above is what led to eventual problems here: although I could access 
the files, when I subsequently tried to boot the original system (not 
the livecd) it couldn't find rpool.


That's because my use of newrpool above actually renamed the pool on 
disk. I had to boot the livecd again and then:


zpool import -f -R /a newrpool rpool

zpool export rpool

to get it renamed back, and then it booted fine.

On reflection, I was being too cautious, and that led to trouble. I 
didn't really need to rename the pool on import, because the livecd 
doesn't have an rpool setup itself.


At least, that's true in my environment, which was using b151a Solaris 
Express; I didn't have an OI livecd image handy, sorry.



   Using live-cd build 147: `zpool import'

Will report seeing `xpool' with some long ID number.


I didn't see that, so presumably that's a recent change between OI and 
Solaris Express.




In this case, the system to be rescued was recently installed from
that very live-cd, so maybe that would lesson the likelyhood of
problems?


Yes, I think I just made problems for myself with the rename on import. 
Do it without that, i.e. do it as you had been doing it, but with the 
added mount, and all should be fine.


My test system recovered perfectly fine once I correctly the renamed pool.

let us know how you get on.

cheers,
calum.

(Oracle employee)

___
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-28 Thread Calum Mackay

On 28/11/10 15:20, Harry Putnam wrote:

OK, rebooted with livecd, imported what was now seen as `newpool' and
exported it as rpool rebooted.

Still I only get to a grub prompt.  No OS login.


What does GRUB say if you try to boot?

Can you try the findroot function to see if it will find the pool under 
the various names (rpool, xpool, newrpool)?




In fact is there a path to resuce by using the livecd at all, or have
I just left out important steps?


Well, mine booted fine after I renamed it back (with import) to rpool, 
but I was using Express b151a, not OI b147.


Perhaps that is an important difference...

If I get a moment tonight, I'll try it again with OI b147.

cheers,
calum.

(Oracle employee)

___
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-28 Thread Calum Mackay

Harry,

I'm not sure what happened in your case, but I've just tried it with a 
fresh OI b147 install, and it worked perfectly. At no point did I see 
"xpool".


I installed OIb147 in a Vbox VM, using the DVD ISO.

Then booted the DVD ISO again, and "zpool import" showed me rpool, as 
expected.


Then:

zpool import -f -R /a rpool

zfs set mountpoint=/b rpool/ROOT/openindiana

zfs mount rpool/ROOT/openindiana

cat /a/b/etc/passwd

and I could see my personal username in the passwd file, ensuring I was 
looking at my installed /etc.


Then:

zpool export rpool

and reboot, and it came up perfectly into my install, no issues at all.

So this is clearly a usable recovery method, once the mountpoint and 
mount are done. And perhaps there is a better way to handle that, but it 
worked for me.



To address your current situation, I would try booting the ISO/Live 
again, and seeing what "zpool import" says. If it's xpool, or anything 
other than rpool, then:


zpool import -f -R /a badpool rpool

[where "badpool" is whatever was reported by "zpool import"]

to rename it to rpool, then try the above steps, or just export and reboot.

Hopefully that will get you back going again...

cheers,
calum.

--
Calum Mackay
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-28 Thread Harry Putnam
Calum Mackay  writes:

> To address your current situation, I would try booting the ISO/Live
> again, and seeing what "zpool import" says. If it's xpool, or anything
> other than rpool, then:
>
>   zpool import -f -R /a badpool rpool
>
> [where "badpool" is whatever was reported by "zpool import"]
>
> to rename it to rpool, then try the above steps, or just export and reboot.
>
> Hopefully that will get you back going again...

I did that as posted previously... that is boot livecd, import
badpool, export goodpool

but on reboot I just get a grub prompt.

But I jumped the gun and just started over with a new install.  Didn't
seem to be going anywhere with my experiment...

I believe as you found that it is a working method and that I did
something or several somethings, blundering around to cause my own
problems.

Once I get the new install going... I may try it again just to make
sure I can do it.

Thanks for your patience and the time you put into answers.


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