From owner-freebsd-questions@FreeBSD.ORG Sun Nov 4 15:04:53 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FDF4726 for ; Sun, 4 Nov 2012 15:04:53 +0000 (UTC) (envelope-from b.smeelen@ose.nl) Received: from mail.ose.nl (mail.ose.nl [212.178.134.164]) by mx1.freebsd.org (Postfix) with ESMTP id AAF5E8FC0C for ; Sun, 4 Nov 2012 15:04:52 +0000 (UTC) X-Footer: b3NlLm5s Received: from localhost ([127.0.0.1]) by mail.ose.nl (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for freebsd-questions@freebsd.org; Sun, 4 Nov 2012 16:04:49 +0100 Message-ID: <50968410.60506@ose.nl> Date: Sun, 04 Nov 2012 16:04:48 +0100 From: Bas Smeelen User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: FreeBSD 9.1 and SU+J References: <6a6b6ddcdec1296708c054d73b7b5a34@eumx.net> <5096470C.20904@ose.nl> <20121104131104.71e81e3a@gumby.homeunix.com> <509674FB.9080208@ose.nl> In-Reply-To: <509674FB.9080208@ose.nl> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2012 15:04:53 -0000 On 11/04/2012 03=3A00 PM=2C Bas Smeelen wrote=3A =3E On 11/04/2012 02=3A11 PM=2C RW wrote=3A =3E=3E On Sun=2C 04 Nov 2012 11=3A44=3A28 +0100 =3E=3E Bas Smeelen wrote=3A =3E=3E =3E=3E=3E On 11/03/2012 07=3A30 PM=2C Herbert J=2E Skuhra wrote=3A =3E=3E=3E=3E On 03=2E11=2E2012 13=3A48=2C Doug Hardie wrote=3A =3E=3E=3E=3E =3E=3E=3E=3E=3E I didn=27t notice that journaling is on by default and now= dump is =3E=3E=3E=3E=3E failing=2E The only way I can see to disable journaling re= quires =3E=3E=3E=3E=3E that the file system be dismounted=2C or read-only=2E This= is a =3E=3E=3E=3E=3E remote machine and journaling is on root=2E Is there any o= ther way =3E=3E=3E=3E=3E that would not require me to make a long trip out to the si= te=3F I guess I was a little off here=2C it actually worked for / also See further below for the whole story This was all done remote with ssh =24 mount /dev/da0p2 on / =28ufs=2C local=2C soft-updates=29 devfs on /dev =28devfs=2C local=2C multilabel=29 /dev/da0p3 on /tmp =28ufs=2C local=2C soft-updates=29 /dev/da0p4 on /var =28ufs=2C local=2C soft-updates=29 /dev/da0p5 on /usr =28ufs=2C local=2C soft-updates=29 =24 su Password=3A root=40osebart=3A/usr/home/Freebee =23 rm /=2Esujournal root=40osebart=3A/usr/home/Freebee =23 rm /var/=2Esujournal root=40osebart=3A/usr/home/Freebee =23 rm /tmp/=2Esujournal root=40osebart=3A/usr/home/Freebee =23 rm /usr/=2Esujournal root=40osebart=3A/usr/home/Freebee =23 uname -a FreeBSD osebart=2Eose=2Enl 9=2E1-RC2 FreeBSD 9=2E1-RC2 =230 r241106=3A Mon= Oct 1=20 18=3A26=3A44 UTC 2012=20 root=40farrell=2Ecse=2Ebuffalo=2Eedu=3A/usr/obj/usr/src/sys/GENERIC amd64= =3E=3E=3E=3E This is a task for mfsBSD=3A http=3A//mfsbsd=2Evx=2Esk =3E=3E=3E=3E =3E=3E=3E Hmm=2C I think you have to make a trip or get some kind of remote= =3E=3E=3E console over ip=2E =3E=3E=3E I tried it remote on a 9=2E1-RC2 system that has / /tmp /var and= /usr =3E=3E=3E as seperate partions =3E=3E=3E For / i can do a mount -o ro / and tunefs -j disable /dev/da0p2 t= hen =3E=3E=3E mount -o rw / =3E=3E=3E For the /tmp /var and /usr filesystems this does not work bcause= hey =3E=3E=3E cannot be remounted ro while they are busy=2E =3E=3E A quick and dirty way to do it would be to edit /etc/rc=2Ed/fsck and= put =3E=3E your tunefs commands at the bottom of fsck=5Fstart=28=29=2C then do= a reboot=2E =3E Very nice =3A=29 Thanks a lot! =3E I tried this and can confirm it works=2E =3E =5FBut=5F not all partitions are soft updates without journaling now=2E= =3E It didn=27t work for the / partition=2C I guess because / is mounted rw= =3E before /etc/rc=2Ed/fsck is executed=2E =3E For the / partition I guess I will really have to be at the console =3E starting single user=2C because mount -o ro en then disable with tunefs= -j =3E disable did not work either=2E See at the end of this mail=2E =3E I wonder if it even can be accomplished when booting single user=2C whi= ch =3E I cannto test right now=2E =3E =3E Doug=2C if you have more partitions than just / you could go ahead with= =3E the above solution=2C it worked for me=2E You can then at least dump da= ta =3E from your other partitions=2E =3E =3E See below=3A =3E =3E root=40osebart=3A/usr/home/Freebee =23 mount =3E /dev/da0p2 on / =28ufs=2C local=2C journaled soft-updates=29 =3E devfs on /dev =28devfs=2C local=2C multilabel=29 =3E /dev/da0p3 on /tmp =28ufs=2C local=2C journaled soft-updates=29 =3E /dev/da0p4 on /var =28ufs=2C local=2C journaled soft-updates=29 =3E /dev/da0p5 on /usr =28ufs=2C local=2C journaled soft-updates=29 =3E =3E edit /etc/rc=2Ed/fsck and added=3A =3E =3E /sbin/tunefs -j disable /dev/da0p2 =3E /sbin/tunefs -j disable /dev/da0p3 =3E /sbin/tunefs -j disable /dev/da0p4 =3E /sbin/tunefs -j disable /dev/da0p5 =3E =3E just before =3E =7D =3E =3E load=5Frc=5Fconfig =24name =3E run=5Frc=5Fcommand =22=241=22 =3E =3E at the end=2E =3E =3E shutdown -r now and I have =3E =3E root=40osebart=3A/usr/home/Freebee =23 mount =3E /dev/da0p2 on / =28ufs=2C local=2C journaled soft-updates=29 =3E devfs on /dev =28devfs=2C local=2C multilabel=29 =3E /dev/da0p3 on /tmp =28ufs=2C local=2C soft-updates=29 =3E /dev/da0p4 on /var =28ufs=2C local=2C soft-updates=29 =3E /dev/da0p5 on /usr =28ufs=2C local=2C soft-updates=29 =3E =3E See below for mount -o ro =3E =3E root=40osebart=3A/usr/home/Freebee =23 mount -o ro / =3E root=40osebart=3A/usr/home/Freebee =23 mount =3E /dev/da0p2 on / =28ufs=2C local=2C read-only=29 =3E devfs on /dev =28devfs=2C local=2C multilabel=29 =3E /dev/da0p3 on /tmp =28ufs=2C local=2C soft-updates=29 =3E /dev/da0p4 on /var =28ufs=2C local=2C soft-updates=29 =3E /dev/da0p5 on /usr =28ufs=2C local=2C soft-updates=29 =3E root=40osebart=3A/usr/home/Freebee =23 tunefs -j disable /dev/da0p2 =3E Clearing journal flags from inode 4 =3E tunefs=3A soft updates journaling cleared but soft updates still set=2E= =3E tunefs=3A remove =2Esujournal to reclaim space =3E =3E shutdown -r now but still =3E =3E root=40osebart=3A/usr/home/Freebee =23 mount =3E /dev/da0p2 on / =28ufs=2C local=2C soft-updates=29 =3E devfs on /dev =28devfs=2C local=2C multilabel=29 =3E /dev/da0p3 on /tmp =28ufs=2C local=2C soft-updates=29 =3E /dev/da0p4 on /var =28ufs=2C local=2C soft-updates=29 =3E /dev/da0p5 on /usr =28ufs=2C local=2C soft-updates=29 =3E =3E =3E This e-mail message=2C including any attachment=28s=29=2C is intended solel= y for the addressee or addressees=2E Any views or opinions presented herein= are solely those of the author and do not necessarily represent those of O= SE=2E If you are not the intended recipient of this communication please return t= his e-mail message and the attachment=28s=29 to the sender and delete and d= estroy all copies=2E