On 02 November, 2007 - Dave Pratt sent me these 2,0K bytes: > I've been wrestling with implementing some ZFS mounts for /var and > /usr into a jumpstart setup. I know that jumpstart does "know" anything > about zfs as in your can't define ZFS volumes or pools in the profile. > I've gone ahead and let the JS do a base install into a single ufs slice > and then attempted to create the zpool and zfs volumes in the finish > script and ufsdump|ufsrestore the data from the /usr and /var partitions > into the new zfs volumes. Problem is there doesn't seem to be a way to > ensure that the zpool is imported into the freshly built system on the > first reboot.
Ugly hack I've been doing to create ZFS thingies under jumpstart/sparc, but it works.. ---8<--- profile entry ---8<--- filesys c1t1d0s7 free /makezfs logging or filesys c1t1d0s7 free /makezfsmirror1 logging filesys c1t2d0s7 free /makezfsmirror2 logging ---8<--- run first in client_end_script ---8<--- #!/bin/sh echo ZFS-stuff dozfs=0 dozfsmirror=0 if [ -d /a/makezfs ]; then dozfs=1 fi if [ -d /a/makezfsmirror1 ]; then dozfs=1 dozfsmirror=1 fi test $dozfs = 1 || exit 0 if [ $dozfsmirror = 1 ]; then umount /a/makezfsmirror1 umount /a/makezfsmirror2 disk1=`grep /makezfsmirror1 /a/etc/vfstab|awk '{print $1}'` disk2=`grep /makezfsmirror2 /a/etc/vfstab|awk '{print $1}'` else umount /a/makezfs disk1=`grep /makezfs /a/etc/vfstab|awk '{print $1}'` fi perl -p -i.bak -e 's,.*/makezfs.*,#,' /a/etc/vfstab # do it twice due to bug, see # http://bugs.opensolaris.org/view_bug.do?bug_id=6566433 zpool create -f -R /a -m /data data $disk1 || zpool create -f -R /a -m /data data $disk1 if [ "x$disk2" != "x" ]; then zpool attach data $disk1 $disk2 fi zfs set compression=on data zfs set mountpoint=none data zfs create data/lap zfs create data/scratch zfs create data/postfixspool zfs set mountpoint=/lap data/lap zfs set mountpoint=/scratch data/scratch mkdir -p /a/var/spool/postfix zfs set mountpoint=/var/spool/postfix data/postfixspool zfs set reservation=256M data/postfixspool echo ZFS-stuff done ---8<--- run last in client_end_script ---8<--- #!/bin/sh zpool list | grep -w data > /dev/null || exit 0 echo /sbin/zpool export data /sbin/zpool export data echo /sbin/mount -F lofs /devices /a/devices /sbin/mount -F lofs /devices /a/devices echo chroot /a /sbin/zpool import data chroot /a /sbin/zpool import data The final step is the trick ;) /Tomas -- Tomas Ögren, [EMAIL PROTECTED], http://www.acc.umu.se/~stric/ |- Student at Computing Science, University of Umeå `- Sysadmin at {cs,acc}.umu.se _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss