Jim Klimov
2008-May-29 14:07 UTC
[zfs-discuss] Liveupgrade snv_77 with a ZFS root to snv_89
We have a test machine installed with a ZFS root (snv_77/x86 and "rootpol/rootfs" with grub support). Recently tried to update it to snv_89 which (in Flag Days list) claimed more support for ZFS boot roots, but the installer disk didn''t find any previously installed operating system to upgrade. Then we tried to install SUNWlu* packages from snv_89 disk onto snv_77 system. It worked in terms of package updates, but lucreate fails: # lucreate -n snv_89 ERROR: The system must be rebooted after applying required patches. Please reboot and try again. Apparently we rebooted a lot and it did not help... How can we upgrade the system? In particular, how does LU do it? :) Now working on an idea to update all existing packages in the cloned root, using pkgrm/pkgadd -R. Updating "only some" packages didn''t help much (kernel, zfs, libs). A backup plan is to move the ZFS root back to UFS, update and move it back. Probably would work, but not an elegant job ;) Suggestions welcome, maybe we''ll try out some of them and report ;) This message posted from opensolaris.org
Albert Lee
2008-May-29 19:19 UTC
[zfs-discuss] Liveupgrade snv_77 with a ZFS root to snv_89
On Thu, 2008-05-29 at 07:07 -0700, Jim Klimov wrote:> We have a test machine installed with a ZFS root (snv_77/x86 and "rootpol/rootfs" with grub support). > > Recently tried to update it to snv_89 which (in Flag Days list) claimed more support for ZFS boot roots, but the installer disk didn''t find any previously installed operating system to upgrade. > > Then we tried to install SUNWlu* packages from snv_89 disk onto snv_77 system. It worked in terms of package updates, but lucreate fails: > > # lucreate -n snv_89 > ERROR: The system must be rebooted after applying required patches. > Please reboot and try again. > > Apparently we rebooted a lot and it did not help... > > How can we upgrade the system? > > In particular, how does LU do it? :) > > Now working on an idea to update all existing packages in the cloned root, using pkgrm/pkgadd -R. Updating "only some" packages didn''t help much (kernel, zfs, libs). > > A backup plan is to move the ZFS root back to UFS, update and move it back. Probably would work, but not an elegant job ;) > > Suggestions welcome, maybe we''ll try out some of them and report ;)The LU support for ZFS root is part of a set of updates to the installer that are not available until snv_90. There is a hack to do an offline upgrade from DVD/CD (zfs_ttinstall), if you can''t wait. -Albert
Jim Klimov
2008-May-30 14:24 UTC
[zfs-discuss] Liveupgrade snv_77 with a ZFS root to snv_89
You mean this: https://www.opensolaris.org/jive/thread.jspa?threadID=46626&tstart=120 Elegant script, I like it, thanks :) Trying now... Some patching follows: -for fs in `zfs list -H | grep "^$ROOTPOOL/$ROOTFS" | awk ''{ print $1 };''` +for fs in `zfs list -H | grep "^$ROOTPOOL/$ROOTFS" | grep -w "$ROOTFS" | grep -v ''@'' | awk ''{ print $1 };''` In essence, skip snapshots (@) and non-"rootpool/rootfs/subfs" paths. On my system I happen to have both problems (a clone "rootpool/rootfs_snv77" and some snapshots of both the clone and rootfs). Alas, so far the upgrade didn''t get going (ttinstall doesn''t see the old system, neither ZFS root nor the older UFS SVM-mirror root), although rootpool/rootfs got mounted to /a. I''m now reboot-and-retrying - perhaps early tests and script rewrites/reruns messed something up. This message posted from opensolaris.org
Jim Klimov
2008-May-30 15:22 UTC
[zfs-discuss] Liveupgrade snv_77 with a ZFS root to snv_89
Alas, didn''t work so far. Can the problem be that the zfs-root disk is not the first on the controller (system boots from the grub on the older ufs-root slice), and/or that zfs is mirrored? And that I have snapshots and a data pool too? These are the boot disks (SVM mirror with ufs and grub): [root at thunder /]# metastat -c d1 m 4.0GB d12 d10 d12 s 4.0GB c3t2d0s0 d10 s 4.0GB c3t0d0s0 This is the actual system: [root at thunder /]# zpool status pool: pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 raidz1 ONLINE 0 0 0 c3t0d0s3 ONLINE 0 0 0 c3t1d0s3 ONLINE 0 0 0 c3t2d0s3 ONLINE 0 0 0 c3t3d0s3 ONLINE 0 0 0 errors: No known data errors pool: rootpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rootpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c3t1d0s0 ONLINE 0 0 0 c3t3d0s0 ONLINE 0 0 0 errors: No known data errors This message posted from opensolaris.org
Volker A. Brandt
2008-Jun-05 11:23 UTC
[zfs-discuss] Liveupgrade snv_77 with a ZFS root to snv_89
[Just stumbled over this while catching up on email...]> +for fs in `zfs list -H | grep "^$ROOTPOOL/$ROOTFS" | grep -w "$ROOTFS" | grep -v ''@'' | awk ''{ print $1 };''` > > In essence, skip snapshots (@) and non-"rootpool/rootfs/subfs" paths.Note that "zfs list -Hrt filesystem -o name <pool>" will give you a one-column list of all existing file systems below <pool>. So your zfs invocation is optimized to: +for fs in `zfs list -Hrtfilesystem -oname "$ROOTPOOL"|tail +2` I''m sure this will save several microseconds. :-) Regards -- Volker -- ------------------------------------------------------------------------ Volker A. Brandt Consulting and Support for Sun Solaris Brandt & Brandt Computer GmbH WWW: http://www.bb-c.de/ Am Wiesenpfad 6, 53340 Meckenheim Email: vab at bb-c.de Handelsregister: Amtsgericht Bonn, HRB 10513 Schuhgr??e: 45 Gesch?ftsf?hrer: Rainer J. H. Brandt und Volker A. Brandt