From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SPPfg-0005Bc-I3 for garchives@archives.gentoo.org; Wed, 02 May 2012 02:52:04 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7284E0769; Wed, 2 May 2012 02:51:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 92A97E0769 for ; Wed, 2 May 2012 02:51:55 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 004AC1B4034 for ; Wed, 2 May 2012 02:51:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A6D25E5403 for ; Wed, 2 May 2012 02:51:53 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1335925780.b5b535f5aa6fa776dadc2e324b94211224cdb7f9.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts X-VCS-Directories: defaults/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: b5b535f5aa6fa776dadc2e324b94211224cdb7f9 X-VCS-Branch: master Date: Wed, 2 May 2012 02:51:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 66e9ac0b-55f0-44e1-bfce-cd450e9674b9 X-Archives-Hash: 41fca3d160a68aa234757736924ea9b6 commit: b5b535f5aa6fa776dadc2e324b94211224cdb7f9 Author: Richard Yao cs stonybrook edu> AuthorDate: Wed May 2 02:28:10 2012 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Wed May 2 02:29:40 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/genkernel.git= ;a=3Dcommit;h=3Db5b535f5 Do not import a pool that the kernel automatically imported This works around the following upstream issue: https://github.com/zfsonlinux/zfs/issues/714 Signed-off-by: Richard Yao cs.stonybrook.edu> --- defaults/initrd.scripts | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index a7d88e4..c468ad4 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -654,7 +654,7 @@ startVolumes() { =09 if [ "${USE_ZFS}" =3D '1' ] then - if [ -z "${ZFS_POOL}" ]; + if [ -z "${ZFS_POOL}" ] then good_msg "Importing ZFS pools" =20 @@ -667,15 +667,21 @@ startVolumes() { bad_msg "Imported ZFS pools failed" fi else - good_msg "Importing ZFS pool ${ZFS_POOL}" =20 - /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}" - - if [ "$?" =3D '0' ] + if [ "$(zpool list -H -o name ${ZFS_POOL} 2>&1)" =3D "$ZFS_POOL" ] then - good_msg "Importing ${ZFS_POOL} succeeded" + good_msg "ZFS pool ${ZFS_POOL} already imported" else - bad_msg "Importing ${ZFS_POOL} failed" + good_msg "Importing ZFS pool ${ZFS_POOL}" + + /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}" + + if [ "$?" =3D '0' ] + then + good_msg "Importing ${ZFS_POOL} succeeded" + else + bad_msg "Importing ${ZFS_POOL} failed" + fi fi fi fi