updating my notes with Lori's rootpool notes found in
http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ using
the Solaris Express: Community Release DVD (no asserts like bfu code) from
http://www.opensolaris.org/os/downloads/on/ and installing the "Solaris
Express" (second option, as pkgs are customizable) making three partitions
(/, swap, /usr (no /export)) on a single disk, then replaced the dvd drive
with a second disk:  (I'll learn jumpstart someday)
format ; echo copy the partition table from the first disk to the second
zpool create -f z c0d1s6 ; echo /usr partition slice on the empty disk
zfs create z/usr
zfs create z/opt
zfs create z/var
zfs set compression=lzjb z/usr
zfs set compression=lzjb z/opt
zfs set compression=lzjb z/var
cd /z     ; ufsdump 0fs - 999999 /    | ufsrestore -xf - var opt
cd /z/usr ; ufsdump 0fs - 999999 /usr | ufsrestore -rf -
zfs set mountpoint=legacy z/usr
zfs set mountpoint=legacy z/opt
zfs set mountpoint=legacy z/var
cp /etc/vfstab /etc/vfstab.bak ; grep -v usr /etc/vfstab.bak > /etc/vfstab
echo "/dev/dsk/c0d1s1   -       -       swap    -    no      -" >> /etc/vfstab
echo "z/usr             -       /usr    zfs     -    yes     -" >> /etc/vfstab
echo "z/var             -       /var    zfs     -    yes     -" >> /etc/vfstab
echo "z/opt             -       /opt    zfs     -    yes     -" >> /etc/vfstab
cd / ; mkdir opt.old var.old
mv /opt/* /opt.old ; mv /var/* /var.old
reboot
rm -rf /opt.old /var.old
zpool add -f z c0d0s6 ; echo the old /usr partition
zpool create -f rootpool c0d1s0 ; echo / from the empty disk
zfs create rootpool/snv_62
zpool set bootfs=rootpool/snv_62 rootpool
zfs set mountpoint=legacy rootpool/snv_62
mkdir /a ; mount -F zfs rootpool/snv_62 /a
cd    /a ; ufsdump 0fs - 999999 / | ufsrestore -rf -
grep -v ufs /etc/vfstab > /a/etc/vfstab
echo "rootpool/snv_62 -          /      zfs     -    no      -" >> /a/etc/vfstab
echo "rootpool/snv_62 -          /a     zfs     -    yes     -" >>   /etc/vfstab
echo etc/zfs/zpool.cache >> /a/boot/solaris/filelist.ramdisk
/usr/sbin/bootadm update-archive -R /a
installgrub /a/boot/grub/stage1 /a/boot/grub/stage2 /dev/rdsk/c0d1s0
mkdir -p /rootpool/boot/grub
sed s/default\ 0/default\ 2/ /boot/grub/menu.lst > /rootpool/boot/grub/menu.lst
cat << EOF >> /rootpool/boot/grub/menu.lst

title Solaris ZFS
#root (hd1,0,a)
#bootfs root/snv_62
kernel$ /platform/i86pc/kernel/$ISADIR/unix -v -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

title Solaris ZFS failsafe
kernel /boot/platform/i86pc/kernel/unix -v -B
module /boot/x86.miniroot-safe

# (hdx,x,x) where the first entry in the tuple is the disk identifier,
# second entry is the partition number (0-3), and the third entry is the
# slice number (a-h), where a is slice 0 and h is slice 7.

EOF

reboot
zpool attach -f rootpool c0d1s0 c0d0s0

  failsafe boot recovery:
mount -o remount,rw /
zpool import -f rootpool
zpool import -f z
mount -F zfs rootpool/snv_62 /a
bootadm update-archive -R /a
reboot

  other notes:
tried and failed to rename rootpool to root
svccfg -s bind setprop config/local_only = false
svcadm enable rstat

thanks SUNW guys/gals, you rock!
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to