Archive for the ‘Live Upgrade’ Category
Live Upgrade for Idiots
Tuesday, October 18th, 2005Liveupgrade is one of the easiest procedures once you understand it. For it to work without much complication, you have to setup your slices to support liveupgrade from the beginning (the first time you install Solaris). They must be setup so that you have empty slice(s) for the boot environment (BE) to be installed. This is the slice that the new Solaris you are upgrading to will be installed on, so be sure to make enough room. Once it is installed on the new slice, you boot the new slice instead of your old one.
So the first part in accomplishing liveupgrade is getting your slices setup correctly. Here I used Solaris Express and I only have one disk (20gig) so I setup my slices this way:
c0d0s0, /, 9000MB
c0d0s1, swap, 2000MB
c0d0s2, backup, 20000MB (automatically created)
c0d0s3, /altroot, 9000MB (this is where BE will be)
If you have 2 separate disks, you could use one disk for your initial Solaris, and the other disk for your liveupgrade. But since I only have one disk here, I just use slice3 as my liveupgrade. If I were to separate my slices (/, /opt, /usr, /var) instead of just using one single root (/) slice, I would need just as many of those slices free for the liveupgrade.
After I setup my slices, installed, and booted, it mounts /altroot to slice3, so I edited it out of /etc/vfstab so its not mounted at boot anymore.
The next part in liveupgrade is creating the boot environment. This is done by one simple command:
# lucreate -c "solenv1" -m /:/dev/dsk/c0d0s3:ufs -n "solenv2"
The -c assigns the specified name to the current boot environment.
The -m specifys the location of root slice (/) going to be copied to /dev/dsk/c0d0s3 (/altroot).
The -n specifys the name of the liveupgrade boot environment.
* If something screws up you can use ludelete BE_name to delete the boot environment and try again.
* You can use lufslist -n solenv2 to view the boot environment just created.
Ok so now that we have our slices setup and boot environment created, all we need to do is the upgrade and then activate our new boot environment. The upgrade process can be done many ways (local,net,cdrom,flash). All four of these are done the same way except each one you specify a different path to the image through the -s flag. For example:
Local file:
# luupgrade -u -n solenv2 -s /Solaris_10/path/to/os_image
Net:
# luupgrade -u -n solenv2 -s /net/Solaris_10/path/to/os_image
Cdrom:
# luupgrade -u -n solenv2 -s /cdrom/Solaris_10/path/to/os_image
Flash:
# luupgrade -u -n solenv2 -s /path/to/flash.flar
The -u specifys to upgrade OS image on a boot environment.
The -n specifys what boot environment to upgrade.
The -s specifys the source to the OS image/flash image.
I did a local file install which kept me from having to burn any cds and was simple. I downloaded the latest Solaris Express (build 24) ISO’s and then unzip’d them, used lofiadm to put the ISO’s to a device, then mounted them:
# unzip *.iso
# lofiadm -a /sol-nv-b24-x86-v1.iso
/dev/lofi/1
# mkdir /cd1 /cd2 /cd3 /cd4
# mount -F hsfs /dev/lofi/1 /cd1
Repeat the necessary steps for each ISO file.
Now that we have chosen where we are upgrading from, we are ready to do the upgrade.
On the first cd you use the -u option and on the rest you use -i to tell it additional cds, like so:
# luupgrade -u -n solenv2 -s /cd1
# luupgrade -i -n solenv2 -s /cd2
# luupgrade -i -n solenv2 -s /cd3
# luupgrade -i -n solenv2 -s /cd4
(follow prompts, use defaults)
All we need to do now is activate the solenv2 boot environment:
# luactivate solenv2
Reboot
# init 6
The new boot environment should come up after reboot.
Sources and other good Live Upgrade information:
Sun BigAdmin Live Upgrade
docs.sun.com: Live Upgrade
The past few months I’ve been desperately looking for a job I would enjoy. Getting tired of the same ole lame Admin/Unix/Network typical corp whatever jobs, it got really irritating for a while trying to find something interesting. When I was looking I came across Joyent wanting admins and I didn’t submit thinking they wanted someone local. Then I finally got tired of not finding anything.. so I submitted, ready to move to CA. All I could think was if it takes to move across the US to do what I really want to do, I think it would be worth it.
Why couldn’t I find a job like that in Texas? Because Joyent is doing things no one else is doing. Things like Accelerators, which go along with running the largest OpenSolaris install in the world, and SlingShot which takes Rails application development to a whole new level.
I’m finally glad to say I’ve found the job that I’m going to enjoy. I’ll be working with awesome things like OpenSolaris, ZFS, DTrace, and also with some of the greatest administrators out there like Mark Mayo, Ben Rockwood, and Jason Hoffman, not to mention our CEO, David Young (a native Texan), who really understands the Dickey’s BBQ.
I feel very lucky to be a part of this team and I can’t wait to see what the future holds.
.
.
.
.
Internet is the best place for shopping as well. From computer software to hardware products such as wireless adapter every thing is available online. Along items of purchase, hosting as well as seo companies offer online services too. The hostgator is the leading hosting company which not only offers reliable hosting services but also possesses latest dedicated servers. Students can also shop online study guides as well as helping materials for online courses like CISSP or 642-503 and enjoy the benefits of technological advancements.
