From owner-cvs-src-old@FreeBSD.ORG Wed Jul 29 05:24:13 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBDBE106566B for ; Wed, 29 Jul 2009 05:24:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D88EE8FC1C for ; Wed, 29 Jul 2009 05:24:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6T5ODwV007237 for ; Wed, 29 Jul 2009 05:24:13 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6T5OD2U007236 for cvs-src-old@freebsd.org; Wed, 29 Jul 2009 05:24:13 GMT (envelope-from pjd@repoman.freebsd.org) Message-Id: <200907290524.n6T5OD2U007236@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to pjd@repoman.freebsd.org using -f From: Pawel Jakub Dawidek Date: Wed, 29 Jul 2009 05:23:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/etc/rc.d Makefile hostid hostid_save zfs zvol X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2009 05:24:14 -0000 pjd 2009-07-29 05:23:52 UTC FreeBSD src repository Modified files: etc/rc.d Makefile hostid zfs Added files: etc/rc.d hostid_save zvol Log: SVN rev 195938 on 2009-07-29 05:23:52Z by pjd Currently there is a problem with fscking UFS file systems created on top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The latter makes ZVOLs to appear in /dev/. In such case rc.d/fsck cannot find devfs entry and aborts. We cannot simply move rc.d/zfs before rc.d/fsck, because we first want kern.hostid to be configured (by rc.d/hostid). If we won't wait (hostid will be 0) we can reuse disks which are in use by different systems (eg. in SAN/NAS environment). We also cannot move rc.d/hostid before rc.d/fsck, because rc.d/hostid on first system start stores generated kern.hostuuid in /etc/hostid file, so it needs root file system to be mounted read-write. The fix is to split rc.d/hostid so that rc.d/hostid (which will now run before rc.d/fsck) only generates hostid and sets up sysctls, but doesn't touch root file system and rc.d/hostid_save (which is run after rc.d/root) and only creates /etc/hostid file. With that in place, we can move ZVOL initialization to dedicated rc.d/zvol script which runs before rc.d/fsck. PR: conf/120194 Reported by: James Snow Reviewed by: brooks Approved by: re (kib) MFC after: 2 weeks Revision Changes Path 1.99 +2 -2 src/etc/rc.d/Makefile 1.11 +9 -5 src/etc/rc.d/hostid 1.1 +29 -0 src/etc/rc.d/hostid_save (new) 1.8 +0 -20 src/etc/rc.d/zfs 1.1 +48 -0 src/etc/rc.d/zvol (new)