From e7cbe64f7a72dae5cb44f100db60ca88f3313c65 Mon Sep 17 00:00:00 2001 From: gw25295 Date: Fri, 11 Apr 2008 18:36:28 -0700 Subject: PSARC 2006/370 ZFS Boot Support 5008936 ZFS and/or zvol should support dumps 5070124 dumpadm -d /dev/... does not enforce block device requirement for savecore 6521468 ZFS Boot support Phase 2 6553503 bfu can't find 'rootdev' from /etc/vfstab on a zfs root filesystem 6574993 zfs_mountroot() may need to call clkset() to set the boot_time kstat 6633197 zvol should not permit newfs or createpool while it's in use by swap or dump 6661127 zfs_name_valid() does not support ZFS_TYPE_POOL 6684121 The changes to smf scripts for supporting canmount=noauto will cause a boot failure. --HG-- rename : usr/src/psm/stand/bootblks/zfs/common/debug-zfs.fth => deleted_files/usr/src/psm/stand/bootblks/zfs/common/debug-zfs.fth rename : usr/src/psm/stand/bootblks/zfs/common/big-zfs.fth => usr/src/psm/stand/bootblks/zfs/common/fs-zfs.fth --- usr/src/cmd/svc/milestone/fs-minimal | 2 +- usr/src/cmd/svc/milestone/fs-usr | 35 +++++++++++++++++++++++++++++++++-- usr/src/cmd/svc/shell/fs_include.sh | 13 +++++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) (limited to 'usr/src/cmd/svc') diff --git a/usr/src/cmd/svc/milestone/fs-minimal b/usr/src/cmd/svc/milestone/fs-minimal index 6a7141fa1a..ff7cea8a20 100644 --- a/usr/src/cmd/svc/milestone/fs-minimal +++ b/usr/src/cmd/svc/milestone/fs-minimal @@ -58,7 +58,7 @@ for fs in /var /var/adm /tmp; do mountpt=`zfs get -H -o value mountpoint $be$fs 2>/dev/null` if [ $? = 0 ] ; then if [ "x$mountpt" = "x$fs" ] ; then - /sbin/zfs mount $be$fs + /sbin/zfs mount -O $be$fs fi fi fi diff --git a/usr/src/cmd/svc/milestone/fs-usr b/usr/src/cmd/svc/milestone/fs-usr index f4a75e08f9..72f906e82e 100644 --- a/usr/src/cmd/svc/milestone/fs-usr +++ b/usr/src/cmd/svc/milestone/fs-usr @@ -33,17 +33,48 @@ . /lib/svc/share/fs_include.sh # -# Add physical swap. +# Once root is read/write we can enable the dedicated dumpdevice if it exists +# locally. This is an optimization as svc-dumpadm will attempt do this later. # -/sbin/swapadd -1 +dump_setup() +{ + [ -r /etc/dumpadm.conf ] && . /etc/dumpadm.conf + + readswapdev $DUMPADM_DEVICE < $vfstab + + # + # If we have a dedicated dump device, then go ahead and configure it. + # + if [ "x$special" != "x$DUMPADM_DEVICE" ]; then + if [ -x /usr/sbin/zfs ]; then + dataset=`echo $DUMPADM_DEVICE | cut -d'/' -f5-` + [ -n "$dataset" ] && \ + /usr/sbin/zfs list -t volume $dataset > \ + /dev/null 2>&1 + if [ $? -eq 0 ]; then + /usr/sbin/zfs volinit + fi + fi + + if [ -x /usr/sbin/dumpadm -a -b $DUMPADM_DEVICE ]; then + /usr/sbin/dumpadm -u || exit $SMF_EXIT_ERR_CONFIG + fi + fi +} rootiszfs=0 # get the fstype of root readmnttab / (special, mountp, fstype, mntopts, mnttime) -- cgit v1.2.3