On Sat, Aug 15, 2009 at 7:41 AM, Gary Gendel<[email protected]> wrote: > Since the EOL announcement, I've been thinking of how I should do > the migration for my SOHO server. This V20z box provides all > services for the external and internal networks (file server, mail > server, backup server, etc.). It has been running OpenSolaris since > snv_49 and I've been happily using Live Upgrade flawlessly over the > years. I'm currently up to snv_110. > > I have the setup this way... > > Two main drives,each having two identical partitions: a small ufs > one for root and the rest in a zfs mirror pool holding the user home > directories and /usr/local where all of the home-built programs > reside (xjed, dirvish, most, qmail, mailfront, spanmdyke, web pages, > etc.). > > The second zfs pool consists of 5 external drives in raid-z. This > holds the backups for all networked machines. > > My thought is that I want to migrate to OpenSolaris using a zfs root > on the entire disk and minimize downtime. My first thought is to do > it this way: > > * stop the mail and web services > * do a "final" disaster backup to the raid-z pool > * export the raid-z pool. > * break the mirror (how?) and then export this pool. > * install OpenSolaris on one full drive (At this point there is no > turning back) > * attach the old mirrored drive back as a mirror (using the full disk) > * import the other pool > * copy all the appropriate files from the backup > * configure and start the services. > > Anyone see any flaws or can suggest improvements to my approach?
There is perhaps an improvement that allows you to not have to immediately destroy the ufs installation or make too hasty of a decision about overwriting your broken mirror. I suspect that this can be done in a live-upgrade-ish way. The trick is getting the intial boot environment populated - which I have kinda done. In my case, I needed to install a zone with the ipkg brand. However, a couple modifications to the procedure should allow this transition in the global zone. I quote from: http://opensolaris.org/jive/thread.jspa?messageID=370967#370884 } Anyway, here was my first run through this effort. Starting point is } a SXCE 108 T5120 with SUWNCXall, zfs root Whether you have zfs root right now or not doesn't matter a whole lot. } } 1. Get pkg-gate from mercurial } } $ hg clone ssh://[email protected]/hg/pkg/gate } destination directory: gate } requesting all changes } adding changesets } adding manifests } adding file changes } added 1040 changesets with 13427 changes to 7444 files } 4779 files updated, 0 files merged, 0 files removed, 0 files unresolved } } 2. Build pkg } } $ export PATH=$PATH:/apps/studio12/SUNWspro/bin } $ cd gate/src } $ make } $ make packages } } 3. Install packages } } # cd gate/packages } # pkgadd -d . all } } 4. Fake global zone's notion of entire [snip] Now is where the paths likely diverge. My thought is that you can now create a boot environment in the pool that is mirrored across the same drives as your UFS root. Let's pretend that pool is called "local". If you want the pool to be named rpool when all is done, just fix that now. I don't think that this matters a whole lot. For sake of consistency with anyone else that may be trying this starting with ZFS root with a standard root pool name, the commands will assume this is done. (stop things that need to be stopped) # zpool export local # zpool import local rpool Let's preserve your SXCE environment, by live upgrading from UFS to ZFS root. Details at on this type of move are at: http://docs.sun.com/app/docs/doc/820-7013/migratingufsoverview?a=view # lucreate -c sxce_ufs -n sxce_zfs -p rpool Now activate that live upgrade boot environment and reboot. # luactivate sxce_zfs # init 6 In a couple minutes you should have SXCE running from ZFS root. Now comes the time to transition to OpenSolaris. In an earlier step, you installed the current version of the ips utilities into your SXCE installation. Now we will use it to create and populate a new boot environment. # zfs create -o canmount=noauto rpool/ROOT/opensolaris # zfs mount rpool/ROOT/opensolaris /mnt # pkg image-create -f -F \ -p opensolaris.org=http://pkg.opensolaris.org/dev /mnt # pkg -R /a install SUNWcsd # pkg -R /a install SUNWcs # pkg -R /a install slim_install # pkg -R /a install entire # pkg -R /a set-authority --reset-uuid --no-refresh opensolaris.org # zfs umount rpool/ROOT/opensolaris The bulk of the commands from above were gleened from "pkg history -l | grep Command:" on an OpenSolaris installation performed with AI. Next, you will need to make this thing bootable. I don't have an x86 box running OpenSolaris handy at the moment, but the following should do the trick: # boootadm update-archive -R /a # bootadm list-menu Use the output of bootadm list-menu to help you find menu.lst. Make the appropriate updates to point to the new boot environment. I think this should be a matter of copy the entries for the sxce_zfs and changing all occurrences of sxce_zfs to opensolaris. Now you should be able to reboot, select the opensolaris menu item and be good to go. Presumably you may need to copy a few items from the old boot environment - /etc/lu/synclist in the old boot environment will be a good place to start. At such a time as you are ready to whack the old UFS (and potentially swap), you can: - disable any swap that is not part of the zpool - add swap to the zpool if needed - detach one half of the mirrror, - repartition that half so that s0 has the whole disk, - reattach that disk, using s0 this time - run installboot? - detach the other half of the mirror - repartition - reattach - run installboot? - reboot - I think this is required to see the added space If you decide to go this route, please share your experience. I'm sure there will be some corrections to the procedure. -- Mike Gerdts http://mgerdts.blogspot.com/ _______________________________________________ opensolaris-discuss mailing list [email protected]
