From owner-svn-src-stable@FreeBSD.ORG Sat Dec 11 23:48:10 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5B911065672; Sat, 11 Dec 2010 23:48:10 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA2908FC13; Sat, 11 Dec 2010 23:48:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBBNmALp021554; Sat, 11 Dec 2010 23:48:10 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBBNmAeZ021552; Sat, 11 Dec 2010 23:48:10 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201012112348.oBBNmAeZ021552@svn.freebsd.org> From: Martin Matuska Date: Sat, 11 Dec 2010 23:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216386 - stable/8/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2010 23:48:11 -0000 Author: mm Date: Sat Dec 11 23:48:10 2010 New Revision: 216386 URL: http://svn.freebsd.org/changeset/base/216386 Log: MFC r216291, r216293: MFC r216291: Do not print OpenSolaris hint to use (non-existing) installgrub(1) command if creating a mirror by attaching a new vdev to a root pool. MFC r216293: Print message with information about updating the boot code if a new vdev is attached to a root pool (e.g. when creating a mirrored boot pool). Reported by: James R. Van Artsdalen (on freebsd-fs@freebsd.org) Reviewed by: pjd Approved by: re (kib), delphij (mentor) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat Dec 11 22:33:33 2010 (r216385) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat Dec 11 23:48:10 2010 (r216386) @@ -48,11 +48,13 @@ static int read_efi_label(nvlist_t *config, diskaddr_t *sb); +#ifdef sun #if defined(__i386) || defined(__amd64) #define BOOTCMD "installgrub(1M)" #else #define BOOTCMD "installboot(1M)" #endif +#endif /* sun */ /* * ==================================================================== @@ -1889,14 +1891,15 @@ zpool_vdev_attach(zpool_handle_t *zhp, if (ret == 0) { if (rootpool) { - /* - * XXX - This should be removed once we can - * automatically install the bootblocks on the - * newly attached disk. - */ - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, "Please " - "be sure to invoke %s to make '%s' bootable.\n"), - BOOTCMD, new_disk); + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, "If " + "you boot from pool '%s', you may need to update\n" + "boot code on newly attached disk '%s'.\n\n" + "Assuming you use GPT partitioning and 'da0' is " + "your new boot disk\n" + "you may use the following command:\n\n" + "\tgpart bootcode -b /boot/pmbr -p " + "/boot/gptzfsboot -i 1 da0\n\n"), + zhp->zpool_name, new_disk); } return (0); }