From owner-freebsd-geom@FreeBSD.ORG Sat Jan 30 11:08:03 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E20AB106566C for ; Sat, 30 Jan 2010 11:08:03 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 4D3E38FC1E for ; Sat, 30 Jan 2010 11:08:03 +0000 (UTC) Received: (qmail invoked by alias); 30 Jan 2010 11:08:01 -0000 Received: from unknown (EHLO [192.168.73.195]) [79.107.188.140] by mail.gmx.com (mp-eu002) with SMTP; 30 Jan 2010 12:08:01 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18Tihh55B4TQpJh1LjbvTKeN5cyvSmCRpPnVuBLpq ItlU6ITFD6O1+l Message-ID: <4B641302.7040301@gmx.com> Date: Sat, 30 Jan 2010 13:07:46 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz> References: <4B5CD0AC.7090302@quip.cz> In-Reply-To: <4B5CD0AC.7090302@quip.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53000000000000003 Cc: freebsd-rc@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: ordering problem with gjournal and iSCSI initiator X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 11:08:04 -0000 On 1/25/2010 12:58 AM, Miroslav Lachman wrote: > Hi, > > I don't know what mailing list is better for this problem, so I post to > both. > > I have server with local partition using gjournal (mfid0s2f.journal). > It is mounted from fstab by this line: > > /dev/mfid0s2f.journal /vol0 ufs rw,async,nosuid,noexec,noatime 2 2 > > Then I have storage connected by iSCSI initiator by attached rc script. > It should be mounted by this script according to fstab.iscsi line: > > /dev/da0p1.journal /vol1 ufs rw,async,nosuid,noexec,noatime 2 2 > > But there is a problem, both partitions are journaled and journal is on > local disk. > > It means that only the first partition is checked and mounted at boot time. > > GEOM_JOURNAL: Journal 2395012627: mfid0s2d contains journal. > GEOM_JOURNAL: Journal 1544711416: mfid0s2e contains journal. > GEOM_JOURNAL: Journal 2395012627: mfid0s2f contains data. > GEOM_JOURNAL: Journal mfid0s2f clean. > GEOM_JOURNAL: BIO_FLUSH not supported by mfid0s2d. > GEOM_JOURNAL: BIO_FLUSH not supported by mfid0s2f. > Root mount waiting for: GJOURNAL > Root mount waiting for: GJOURNAL > Root mount waiting for: GJOURNAL > Root mount waiting for: GJOURNAL > Root mount waiting for: GJOURNAL > GEOM_JOURNAL: Timeout. Journal gjournal 1544711416 cannot be completed. > > This is because second data provider is not available at this time. > rc.d/iscsi is executed later. (after NETWORKING, SERVERS, before DAEMON) > > But da0p1.journal is not created later (after iscsi created /dev/da0) > with this message: > GEOM_JOURNAL: Journal 1544711416: da0p1 contains data. > GEOM_JOURNAL: Timeout. Journal gjournal 1544711416 cannot be completed. > > And that's why /vol1 can't be mounted by rc.d/iscsi. > > My question is: Is there any "Right Way" to handle this case? > > How can I "create" da0p1.journal later and complete the gjournal + mount? gjournal should have both data and journal providers available to create the .journal consumer. You can force a geom taste, so gjournal will check again the devices, if you open the device for writing. A trick suggested by pjd@ is doing a simple: true > /dev/$data_device true > /dev/$journal_device This will create the .journal and you'll be able to mount the filesystem living on it. So, modify the rc script accordingly to do the operation automatically. HTH, Nikos