I'd like to upgrade a Sun Fire 280R system running Solaris 8 to
Solaris 10 U4. I'd like to use Live Upgrade to do this. As that's going
to be my first LU of a system, I've got some questions. Before I start,
I'd like to mention that I have read the „Solaris 10 8/07 Installation
Guide: Solaris Live Upgrade and Upgrade Planning“ (820-0178) document.
Nonetheless, I'd also appreciate pointers to a more „hands-on“
documentation/howto reg. live upgrade.
The system that I'd like to upgrade has these filesystems:
(winds02)askwar$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md/dsk/d30 4129290 684412 3403586 17% /
/dev/md/dsk/d32 3096423 1467161 1567334 49% /usr
/dev/md/dsk/d33 2053605 432258 1559739 22% /var
swap 7205072 16 7205056 1% /var/run
/dev/dsk/c3t1d0s6 132188872 61847107 69019877 48% /u04
/dev/md/dsk/d34 18145961 5429315 12535187 31% /opt
/dev/md/dsk/d35 4129290 77214 4010784 2% /export/home
It has 2 built in harddisks, which form those metadevices. You can find
the „metastat“ at http://askwar.pastebin.ca/697380. I'm now planning to
break the mirrors for /, /usr, /var and /opt. To do so, I'd run
metadetach d33 d23
metaclear d23
d23 is/used to be c1t1d0s4. I'd do this for d30, d32 and d34 as well.
Plan is, that I'd be able to use these newly freed slices on c1t1d0 for
LU. I know that I'm in trouble when c1t0d0 now dies. But that's okay, as
that system isn't being used anyway right now...
Or wait, I can use lucreate to do that as well, can't I? So, instead of
manually detaching the mirror, I could do:
lucreate -n s8_2_s10 -m /:/dev/md/dsk/d30:preserve,ufs \
-m /usr:/dev/md/dsk/d32:preserve,ufs \
-m /var:/dev/md/dsk/d33:preserve,ufs \
-m /opt:/dev/md/dsk/d34:preserve,ufs
Does that sound right? I'd assume, that I'd then have a new boot
environment called „s8_2_s10“, which uses the contents of the old
metadevices. Or would the correct command rather be:
lucreate -n s8_2_s10_v2 \
-m /:/dev/md/dsk/d0:mirror,ufs \
-m /:/dev/md/dsk/d20:detach,attach,preserve \
-m /usr:/dev/md/dsk/d2:mirror,ufs \
-m /usr:/dev/md/dsk/d22:detach,attach,preserve \
-m /var:/dev/md/dsk/d3:mirror,ufs \
-m /var:/dev/md/dsk/d23:detach,attach,preserve \
-m /opt:/dev/md/dsk/d4:mirror,ufs \
-m /opt:/dev/md/dsk/d24:detach,attach,preserve
What would be the correct way to create the new boot environment? As I
said, I haven't done this before, so I'd really appreciate some help.
Thanks a lot,
Alexander Skwar
I have done a couple of live upgrades. Created the boot environments
via the lu menu.
I used this blog quite alot and found it extremely useful for LDOM
installation.
http://unixconsole.blogspot.com/2007/03/ldom-installation.html
> On Sep 14, 1:30 pm, Alexander Skwar <alexan...@skwar.name> wrote:
[...]
>> Or wait, I can use lucreate to do that as well, can't I? So, instead of
>> manually detaching the mirror, I could do:
>>
>> lucreate -n s8_2_s10 -m /:/dev/md/dsk/d30:preserve,ufs \
>> -m /usr:/dev/md/dsk/d32:preserve,ufs \
>> -m /var:/dev/md/dsk/d33:preserve,ufs \
>> -m /opt:/dev/md/dsk/d34:preserve,ufs
>>
>> Does that sound right? I'd assume, that I'd then have a new boot
>> environment called ,,s8_2_s10", which uses the contents of the old
>> metadevices. Or would the correct command rather be:
>>
>> lucreate -n s8_2_s10_v2 \
>> -m /:/dev/md/dsk/d0:mirror,ufs \
>> -m /:/dev/md/dsk/d20:detach,attach,preserve \
>> -m /usr:/dev/md/dsk/d2:mirror,ufs \
>> -m /usr:/dev/md/dsk/d22:detach,attach,preserve \
>> -m /var:/dev/md/dsk/d3:mirror,ufs \
>> -m /var:/dev/md/dsk/d23:detach,attach,preserve \
>> -m /opt:/dev/md/dsk/d4:mirror,ufs \
>> -m /opt:/dev/md/dsk/d24:detach,attach,preserve
>>
>> What would be the correct way to create the new boot environment? As I
>> said, I haven't done this before, so I'd really appreciate some help.
[...]
> I have done a couple of live upgrades. Created the boot environments
> via the lu menu.
Hm, okay. I just ran /usr/sbin/lu and chose the create BE option.
It's asking me:
WARNING: The device </dev/md/dsk/d30> for the root file system mount point
</> is not a physical device.
WARNING: The system boot prom identifies the physical device
</dev/dsk/c1t0d0s0> as the system boot device.
Is the physical device </dev/dsk/c1t0d0s0> the boot device for the logical
device </dev/md/dsk/d30>? (yes or no)
Uhm. What's meant with "boot device for the logical device"?
> I used this blog quite alot and found it extremely useful for LDOM
> installation.
>
> http://unixconsole.blogspot.com/2007/03/ldom-installation.html
I've only got a SunFire 280R :) Can't do LDOMs with that, can I?
Alexander Skwar
--
Absolutely nothing should be concluded from these figures except that
no conclusion can be drawn from them.
-- Joseph L. Brothers, Linux/PowerPC Project)
--
Ian Collins.
> Alexander Skwar wrote:
>> WARNING: The device </dev/md/dsk/d30> for the root file system mount point
>> </> is not a physical device.
>> WARNING: The system boot prom identifies the physical device
>> </dev/dsk/c1t0d0s0> as the system boot device.
>> Is the physical device </dev/dsk/c1t0d0s0> the boot device for the logical
>> device </dev/md/dsk/d30>? (yes or no)
>>
>> Uhm. What's meant with "boot device for the logical device"?
>>
> Assuming d30 is a mirror, it's asking whether c1t0d0s0 is the primary
> boot device.
Please see my metastat output at <http://askwar.pastebin.ca/697380>.
There you can see, that d30 consists of d10 and d20. d10 is submirror
0. d10 consists only of c1t0d0s0.
So the answer would be a "yes", I suppose?
I've also got d31 which consists of d11 and d21. d11 = c1t0d0s1,
d21 = c1t1d0s1. Would c1t0d0s1 be the boot device for d31, as
d11 is Submirror 0 for this mirror?
But what's a "boot device for a logical device"? How does it differ
from non-boot devices? Is Solaris using these "boot devices"
somehow differently than non-boot devices?
Thanks again,
Alexander Skwar
--
Clothes make the man. Naked people have little or no influence on society.
-- Mark Twain
> I have done a couple of live upgrades. Created the boot environments
> via the lu menu.
Hello!
In /usr/sbin/lu -> Create, how do I specify, that I want to break
up a mirror and make lu use the then unused slice/submirror? Is
there also a way to make lu then NOT copy the contents, but preserve
the contents?
Thanks,
Alexander Skwar
> lucreate -n s8_2_s10_v2 \
> -m /:/dev/md/dsk/d0:mirror,ufs \
> -m /:/dev/md/dsk/d20:detach,attach,preserve \
> -m /usr:/dev/md/dsk/d2:mirror,ufs \
> -m /usr:/dev/md/dsk/d22:detach,attach,preserve \
> -m /var:/dev/md/dsk/d3:mirror,ufs \
> -m /var:/dev/md/dsk/d23:detach,attach,preserve \
> -m /opt:/dev/md/dsk/d4:mirror,ufs \
> -m /opt:/dev/md/dsk/d24:detach,attach,preserve
I now went ahead with this command. lucreate then did some things. What's
disturbing me, is that there are (seem to be?) so many errors:
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
Comparing source boot environment <s8> file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices
/usr/lib/lu/lucreate: /dev/md/dsk/d0: cannot execute
Updating system configuration files.
The device </dev/dsk/c1t1d0s0> is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment <s8_2_s10_v2>.
Source boot environment is <s8>.
Creating boot environment <s8_2_s10_v2>.
Creating file systems on boot environment <s8_2_s10_v2>.
Preserving <ufs> file system for </> on </dev/md/dsk/d0>.
Preserving <ufs> file system for </opt> on </dev/md/dsk/d4>.
Preserving <ufs> file system for </usr> on </dev/md/dsk/d2>.
Preserving <ufs> file system for </var> on </dev/md/dsk/d3>.
Mounting file systems for boot environment <s8_2_s10_v2>.
ERROR: mount: the state of /dev/md/dsk/d0 is not okay
and it was attempted to be mounted read/write
mount: Please run fsck and try again
ERROR: cannot mount mount point </.alt.tmp.b-RRb.mnt/> device </dev/md/dsk/d0>
ERROR: failed to mount file system </dev/md/dsk/d0> on </.alt.tmp.b-RRb.mnt/>
ERROR: cannot mount boot environment by icf file </etc/lu/ICF.2>
WARNING: Attempting to correct problems detected with file systems for boot environment <s8_2_s10_v2>.
Performing file system check of device </dev/md/rdsk/d0>.
** /dev/md/rdsk/d0
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
UNREF DIR I=304133 OWNER=sys MODE=41777
SIZE=512 MTIME=Sep 17 11:22 2007
RECONNECT? yes
DIR I=304133 CONNECTED. PARENT WAS I=2
** Phase 4 - Check Reference Counts
UNREF FILE I=298500 OWNER=root MODE=100600
SIZE=0 MTIME=Sep 17 11:23 2007
CLEAR? yes
[...]
LINK COUNT DIR I=304133 OWNER=sys MODE=41777
SIZE=512 MTIME=Sep 17 11:22 2007 COUNT 0 SHOULD BE 2
ADJUST? yes
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? yes
23806 files, 685062 used, 3444228 free (852 frags, 430422 blocks, 0.0% fragmentation)
***** FILE SYSTEM WAS MODIFIED *****
Performing file system check of device </dev/md/rdsk/d4>.
** /dev/md/rdsk/d4
** Last Mounted on /opt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? yes
134238 files, 5505623 used, 12640338 free (147354 frags, 1561623 blocks, 0.8% fragmentation)
Performing file system check of device </dev/md/rdsk/d2>.
** /dev/md/rdsk/d2
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
45384 files, 1467524 used, 1628899 free (4363 frags, 203067 blocks, 0.1% fragmentation)
Performing file system check of device </dev/md/rdsk/d3>.
** /dev/md/rdsk/d3
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
6502 files, 446648 used, 1606957 free (1021 frags, 200742 blocks, 0.0% fragmentation)
Calculating required sizes of file systems for boot environment <s8_2_s10_v2>.
Populating file systems on boot environment <s8_2_s10_v2>.
Checking selection integrity.
Integrity check OK.
Preserving contents of mount point </>.
Preserving contents of mount point </opt>.
Preserving contents of mount point </usr>.
Preserving contents of mount point </var>.
Copying file systems that have not been preserved.
Creating shared file system mount points.
Creating compare databases for boot environment <s8_2_s10_v2>.
Creating compare database for file system </var>.
Creating compare database for file system </usr>.
Creating compare database for file system </opt>.
Creating compare database for file system </>.
Updating compare databases on boot environment <s8_2_s10_v2>.
Making boot environment <s8_2_s10_v2> bootable.
Setting root slice to Solstice DiskSuite metadevice </dev/md/dsk/d0>.
Population of boot environment <s8_2_s10_v2> successful.
Creation of boot environment <s8_2_s10_v2> successful.
Is that normal?
Alexander Skwar
As suggested by Caspar, I tried to merge / and /usr. First, I tried to
run:
lucreate -n solaris10u4 \
-m /:/dev/md/dsk/d0:mirror,ufs \
-m /:/dev/dsk/c1t1d0s0,/dev/md/dsk/d20:attach \
\
-m /var:/dev/md/dsk/d3:mirror,ufs \
-m /var:/dev/md/dsk/d23:detach,attach,preserve \
\
-m /opt:/dev/md/dsk/d4:mirror,ufs \
-m /opt:/dev/md/dsk/d24:detach,attach,preserve \
\
-m -:/dev/dsk/c3t1d0s1:swap -m -:/dev/dsk/c1t0d0s1:swap -m -:/dev/dsk/c1t1d0s1:swap
But as you can see in <news:2933752.8...@kn.gn.rtr.message-center.info>,
this failed.
So I tried to create d0 manually and then I ran:
lucreate -n solaris10u4 \
-m /:/dev/md/dsk/d0:ufs \
-m /var:/dev/md/dsk/d3:mirror,ufs \
-m /var:/dev/md/dsk/d23:detach,attach,preserve \
-m /opt:/dev/md/dsk/d4:mirror,ufs \
-m /opt:/dev/md/dsk/d24:detach,attach,preserve \
-m -:/dev/dsk/c3t1d0s1:swap -m -:/dev/dsk/c1t0d0s1:swap -m -:/dev/dsk/c1t1d0s1:swap
This finished successfully, I think. While lucreate was running, I got
these messages though:
INFORMATION: Unable to determine size or capacity of slice </dev/md/dsk/d31>.
INFORMATION: Unable to determine size or capacity of slice </dev/md/dsk/d31>.
What's d31? There's no such metadevice setup anymore. I used to have a
d31, but no more.
Is it just me, or is this lucreate thingy extremely difficult to use?
Alexander Skwar
INFORMATION message? Just ignore them. I had to ignore much more WARNING
messages during my LU sessions.
> Is it just me, or is this lucreate thingy extremely difficult to use?
Lucky you are using a SPARC machine. My personal experience on x86 systems
live upgrade is nearly useless:
- LU gets confused where GrUB is located
- mirrored root? eeh
- /sbin/biosdev fails most of the time if you have two identical disks
- once you have finally upgraded your system ludelete won't let you delete
the old BE
As a side note: I still missing the ability to do a "fresh" installation
with LU.
--
Daniel
>Lucky you are using a SPARC machine. My personal experience on x86 systems
>live upgrade is nearly useless:
>- LU gets confused where GrUB is located
Make sure you install liveupgrade from the release you upgrade *to* prior to
using it.
It does work for me on x86 with grub (but on the same disk)
>- mirrored root? eeh
>- /sbin/biosdev fails most of the time if you have two identical disks
>- once you have finally upgraded your system ludelete won't let you delete
> the old BE
That may still be an issue with grub and the initial boot environment.
>As a side note: I still missing the ability to do a "fresh" installation
>with LU.
Yes, that would be really nice.
(I would like to have it as a way to determine which bits I myself
changed)
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Been there, done that.
> It does work for me on x86 with grub (but on the same disk)
So you avoid the really hard part. I (try to) use LU on my mirrored root
disk: breaking up the mirror and creating new devices for the new BE.
Several issues here:
. convince biosdev that there are really two disks in the system
. LU never found the "right" GrUB menu for the new BE (even with help). I
had to manually choose the right boot disk when booting the new BE.
. Then there were no (or wrong) menu entries for the new BE. I had to
manually set the GrUB parameters (root, kernel, module)
. After checking the new BE, LU won't let me delete the old BE - it thinks
the GrUB menu is still active there
>>- /sbin/biosdev fails most of the time if you have two identical disks
>>- once you have finally upgraded your system ludelete won't let you delete
>> the old BE
>
> That may still be an issue with grub and the initial boot environment.
/sbin/biosdev is currently the biggest showstopper for LU. It tries some
black magic to get the BIOS device number and uses the fdisk table as
reference. This will fail horribly most of the time for a two disk system.
Mirrored disks usually have the same fdisk table and the same VTOC.
Before trying to LU a system I routinely replace /sbin/biosdev with a
simple shell script which fakes the right output:
#!/bin/sh
cat <<EOF
0x80 /pci@0,0/pci-ide@e/ide@0/cmdk@0,0
0x81 /pci@0,0/pci-ide@6/ide@1/cmdk@0,0
EOF
Original /sbin/biosdev -d
adding /pci@0,0/pci1166,36@1/pci-ide@e/ide@0/cmdk@0,0
adding /pci@0,0/pci1166,36@1/pci-ide@e/ide@1/cmdk@0,0
matching biosdev-0x80
match_edd bdf 1 14 0
interface type SCSI pci channel 0 target 0
matched first block
0x80 /pci@0,0/pci1166,36@1/pci-ide@e/ide@0/cmdk@0,0
matching biosdev-0x81
match_edd bdf 1 14 0
interface type SCSI pci channel 0 target 1
matched first block
0x81 /pci@0,0/pci1166,36@1/pci-ide@e/ide@0/cmdk@0,0
0x80 /pci@0,0/pci1166,36@1/pci-ide@e/ide@0/cmdk@0,0 matchcount 2
0x81 /pci@0,0/pci1166,36@1/pci-ide@e/ide@0/cmdk@0,0 matchcount 2
biosdev: Could not match any!!
--
Daniel
> Alexander Skwar <alex...@skwar.name> wrote:
>> INFORMATION: Unable to determine size or capacity of slice
>> </dev/md/dsk/d31>. INFORMATION: Unable to determine size or capacity of
>> slice </dev/md/dsk/d31>.
>
> INFORMATION message? Just ignore them.
But where is it getting d31 from? Why is it informing me about
d31 and not, let's say, d77, which also don't exists.
Strange.
Alexander Skwar
Wasn't (isn't) d31 swap? If you really removed d31 as swap, maybe the
dump device is still configured on d31 (to check: call dumpadm, to correct:
dumpadm -s swap)
--
Daniel
Agreed. I have trouble with that as well. I've found, though, that
many of those problems are really related to BIOS bugs on a lot of
different platforms. Upgrading the BIOS changes the nature of biosdev
output and tweaking the unusually baroque BIOS options also causes
changes. PCs are just weak.
As for the "initial install" bit, that's CR 4604046.
--
James Carlson, Solaris Networking <james.d...@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677