Date: Mon, 16 Dec 2013 19:51:11 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259480 - head/usr.sbin/bsdinstall/scripts Message-ID: <201312161951.rBGJpBtQ090589@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Mon Dec 16 19:51:11 2013 New Revision: 259480 URL: http://svnweb.freebsd.org/changeset/base/259480 Log: Fix a long-standing edge-case that would result in a ghosted `zroot' pool and subsequent headaches caused by multiple pools with the same name. Specifically, blast away any labels on the designated swap partition. Problem was when you install to a given layout *with* swap and then turn around and re-install the same layout *without* swap (we weren't doing a labelclear for the swap device, so would end up with an "UNAVAIL" status zroot pool that may only exist in the pool cache). MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 16 19:47:04 2013 (r259479) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 16 19:51:11 2013 (r259480) @@ -745,6 +745,9 @@ zfs_create_diskpart() "$GPART_ADD_LABEL_WITH_SIZE" swap$index \ freebsd-swap ${swapsize}b $disk || return $FAILURE + # Pedantically nuke any old labels on the swap + f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ + /dev/gpt/swap$index # Update fstab(5) f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/gpt/swap$index none swap sw 0 0 \ @@ -818,6 +821,9 @@ zfs_create_diskpart() "$GPART_ADD_INDEX_WITH_SIZE" 2 \ freebsd-swap ${swapsize}b ${disk}s1 || return $FAILURE + # Pedantically nuke any old labels on the swap + f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ + /dev/${disk}s1b # Update fstab(5) f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/${disk}s1b none swap sw 0 0 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312161951.rBGJpBtQ090589>