Re: FreeBSD 9.1 and SU+J

2012-11-04 Thread Bas Smeelen
On 11/03/2012 07:30 PM, Herbert J. Skuhra wrote:
 On 03.11.2012 13:48, Doug Hardie wrote:

 I didn't notice that journaling is on by default and now dump is
 failing.  The only way I can see to disable journaling requires that
 the file system be dismounted, or read-only.  This is a remote machine
 and journaling is on root.  Is there any other way that would not
 require me to make a long trip out to the site?

 This is a task for mfsBSD: http://mfsbsd.vx.sk

Hmm, I think you have to make a trip or get some kind of remote console 
over ip.
I tried it remote on a 9.1-RC2 system that has / /tmp /var and /usr as 
seperate partions
For / i can do a mount -o ro / and tunefs -j disable /dev/da0p2 then 
mount -o rw /
For the /tmp /var and /usr filesystems this does not work bcause hey 
cannot be remounted ro while they are busy.


This e-mail message, including any attachment(s), is intended solely for the 
addressee or addressees. Any views or opinions presented herein are solely 
those of the author and do not necessarily represent those of OSE.

If you are not the intended recipient of this communication please return this 
e-mail message and the attachment(s) to the sender and delete and destroy all 
copies.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9.1 and SU+J

2012-11-04 Thread RW
On Sun, 04 Nov 2012 11:44:28 +0100
Bas Smeelen wrote:

 On 11/03/2012 07:30 PM, Herbert J. Skuhra wrote:
  On 03.11.2012 13:48, Doug Hardie wrote:
 
  I didn't notice that journaling is on by default and now dump is
  failing.  The only way I can see to disable journaling requires
  that the file system be dismounted, or read-only.  This is a
  remote machine and journaling is on root.  Is there any other way
  that would not require me to make a long trip out to the site?
 
  This is a task for mfsBSD: http://mfsbsd.vx.sk
 
 Hmm, I think you have to make a trip or get some kind of remote
 console over ip.
 I tried it remote on a 9.1-RC2 system that has / /tmp /var and /usr
 as seperate partions
 For / i can do a mount -o ro / and tunefs -j disable /dev/da0p2 then 
 mount -o rw /
 For the /tmp /var and /usr filesystems this does not work bcause hey 
 cannot be remounted ro while they are busy.

A quick and dirty way to do it would be to edit /etc/rc.d/fsck and put
your tunefs commands at the bottom of fsck_start(), then do a reboot.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9.1 and SU+J

2012-11-04 Thread Bas Smeelen
On 11/04/2012 02:11 PM, RW wrote:
 On Sun, 04 Nov 2012 11:44:28 +0100
 Bas Smeelen wrote:

 On 11/03/2012 07:30 PM, Herbert J. Skuhra wrote:
 On 03.11.2012 13:48, Doug Hardie wrote:

 I didn't notice that journaling is on by default and now dump is
 failing.  The only way I can see to disable journaling requires
 that the file system be dismounted, or read-only.  This is a
 remote machine and journaling is on root.  Is there any other way
 that would not require me to make a long trip out to the site?
 This is a task for mfsBSD: http://mfsbsd.vx.sk

 Hmm, I think you have to make a trip or get some kind of remote
 console over ip.
 I tried it remote on a 9.1-RC2 system that has / /tmp /var and /usr
 as seperate partions
 For / i can do a mount -o ro / and tunefs -j disable /dev/da0p2 then
 mount -o rw /
 For the /tmp /var and /usr filesystems this does not work bcause hey
 cannot be remounted ro while they are busy.
 A quick and dirty way to do it would be to edit /etc/rc.d/fsck and put
 your tunefs commands at the bottom of fsck_start(), then do a reboot.

Very nice :) Thanks a lot!
I tried this and can confirm it works.
_But_ not all partitions are soft updates without journaling now.
It didn't work for the / partition, I guess because / is mounted rw 
before /etc/rc.d/fsck is executed.
For the / partition I guess I will really have to be at the console 
starting single user, because mount -o ro en then disable with tunefs -j 
disable did not work either. See at the end of this mail.
I wonder if it even can be accomplished when booting single user, which 
I cannto test right now.

Doug, if you have more partitions than just / you could go ahead with 
the above solution, it worked for me. You can then at least dump data 
from your other partitions.

See below:

root@osebart:/usr/home/Freebee # mount
/dev/da0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/da0p3 on /tmp (ufs, local, journaled soft-updates)
/dev/da0p4 on /var (ufs, local, journaled soft-updates)
/dev/da0p5 on /usr (ufs, local, journaled soft-updates)

edit /etc/rc.d/fsck and added:

/sbin/tunefs -j disable /dev/da0p2
/sbin/tunefs -j disable /dev/da0p3
/sbin/tunefs -j disable /dev/da0p4
/sbin/tunefs -j disable /dev/da0p5

just before
}

load_rc_config $name
run_rc_command $1

at the end.

shutdown -r now and I have

root@osebart:/usr/home/Freebee # mount
/dev/da0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/da0p3 on /tmp (ufs, local, soft-updates)
/dev/da0p4 on /var (ufs, local, soft-updates)
/dev/da0p5 on /usr (ufs, local, soft-updates)

See below for mount -o ro

root@osebart:/usr/home/Freebee # mount -o ro /
root@osebart:/usr/home/Freebee # mount
/dev/da0p2 on / (ufs, local, read-only)
devfs on /dev (devfs, local, multilabel)
/dev/da0p3 on /tmp (ufs, local, soft-updates)
/dev/da0p4 on /var (ufs, local, soft-updates)
/dev/da0p5 on /usr (ufs, local, soft-updates)
root@osebart:/usr/home/Freebee # tunefs -j disable /dev/da0p2
Clearing journal flags from inode 4
tunefs: soft updates journaling cleared but soft updates still set.
tunefs: remove .sujournal to reclaim space

shutdown -r now but still

root@osebart:/usr/home/Freebee # mount
/dev/da0p2 on / (ufs, local, soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/da0p3 on /tmp (ufs, local, soft-updates)
/dev/da0p4 on /var (ufs, local, soft-updates)
/dev/da0p5 on /usr (ufs, local, soft-updates)








This e-mail message, including any attachment(s), is intended solely for the 
addressee or addressees. Any views or opinions presented herein are solely 
those of the author and do not necessarily represent those of OSE.

If you are not the intended recipient of this communication please return this 
e-mail message and the attachment(s) to the sender and delete and destroy all 
copies.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9.1 and SU+J

2012-11-04 Thread Bas Smeelen
On 11/04/2012 03:00 PM, Bas Smeelen wrote:
 On 11/04/2012 02:11 PM, RW wrote:
 On Sun, 04 Nov 2012 11:44:28 +0100
 Bas Smeelen wrote:

 On 11/03/2012 07:30 PM, Herbert J. Skuhra wrote:
 On 03.11.2012 13:48, Doug Hardie wrote:

 I didn't notice that journaling is on by default and now dump is
 failing.  The only way I can see to disable journaling requires
 that the file system be dismounted, or read-only.  This is a
 remote machine and journaling is on root.  Is there any other way
 that would not require me to make a long trip out to the site?

I guess I was a little off here, it actually worked for / also
See further below for the whole story
This was all done remote with ssh

$ mount
/dev/da0p2 on / (ufs, local, soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/da0p3 on /tmp (ufs, local, soft-updates)
/dev/da0p4 on /var (ufs, local, soft-updates)
/dev/da0p5 on /usr (ufs, local, soft-updates)
$ su
Password:
root@osebart:/usr/home/Freebee # rm /.sujournal
root@osebart:/usr/home/Freebee # rm /var/.sujournal
root@osebart:/usr/home/Freebee # rm /tmp/.sujournal
root@osebart:/usr/home/Freebee # rm /usr/.sujournal
root@osebart:/usr/home/Freebee # uname -a
FreeBSD osebart.ose.nl 9.1-RC2 FreeBSD 9.1-RC2 #0 r241106: Mon Oct 1 
18:26:44 UTC 2012 
r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

 This is a task for mfsBSD: http://mfsbsd.vx.sk

 Hmm, I think you have to make a trip or get some kind of remote
 console over ip.
 I tried it remote on a 9.1-RC2 system that has / /tmp /var and /usr
 as seperate partions
 For / i can do a mount -o ro / and tunefs -j disable /dev/da0p2 then
 mount -o rw /
 For the /tmp /var and /usr filesystems this does not work bcause hey
 cannot be remounted ro while they are busy.
 A quick and dirty way to do it would be to edit /etc/rc.d/fsck and put
 your tunefs commands at the bottom of fsck_start(), then do a reboot.
 Very nice :) Thanks a lot!
 I tried this and can confirm it works.
 _But_ not all partitions are soft updates without journaling now.
 It didn't work for the / partition, I guess because / is mounted rw
 before /etc/rc.d/fsck is executed.
 For the / partition I guess I will really have to be at the console
 starting single user, because mount -o ro en then disable with tunefs -j
 disable did not work either. See at the end of this mail.
 I wonder if it even can be accomplished when booting single user, which
 I cannto test right now.

 Doug, if you have more partitions than just / you could go ahead with
 the above solution, it worked for me. You can then at least dump data
 from your other partitions.

 See below:

 root@osebart:/usr/home/Freebee # mount
 /dev/da0p2 on / (ufs, local, journaled soft-updates)
 devfs on /dev (devfs, local, multilabel)
 /dev/da0p3 on /tmp (ufs, local, journaled soft-updates)
 /dev/da0p4 on /var (ufs, local, journaled soft-updates)
 /dev/da0p5 on /usr (ufs, local, journaled soft-updates)

 edit /etc/rc.d/fsck and added:

 /sbin/tunefs -j disable /dev/da0p2
 /sbin/tunefs -j disable /dev/da0p3
 /sbin/tunefs -j disable /dev/da0p4
 /sbin/tunefs -j disable /dev/da0p5

 just before
 }

 load_rc_config $name
 run_rc_command $1

 at the end.

 shutdown -r now and I have

 root@osebart:/usr/home/Freebee # mount
 /dev/da0p2 on / (ufs, local, journaled soft-updates)
 devfs on /dev (devfs, local, multilabel)
 /dev/da0p3 on /tmp (ufs, local, soft-updates)
 /dev/da0p4 on /var (ufs, local, soft-updates)
 /dev/da0p5 on /usr (ufs, local, soft-updates)

 See below for mount -o ro

 root@osebart:/usr/home/Freebee # mount -o ro /
 root@osebart:/usr/home/Freebee # mount
 /dev/da0p2 on / (ufs, local, read-only)
 devfs on /dev (devfs, local, multilabel)
 /dev/da0p3 on /tmp (ufs, local, soft-updates)
 /dev/da0p4 on /var (ufs, local, soft-updates)
 /dev/da0p5 on /usr (ufs, local, soft-updates)
 root@osebart:/usr/home/Freebee # tunefs -j disable /dev/da0p2
 Clearing journal flags from inode 4
 tunefs: soft updates journaling cleared but soft updates still set.
 tunefs: remove .sujournal to reclaim space

 shutdown -r now but still

 root@osebart:/usr/home/Freebee # mount
 /dev/da0p2 on / (ufs, local, soft-updates)
 devfs on /dev (devfs, local, multilabel)
 /dev/da0p3 on /tmp (ufs, local, soft-updates)
 /dev/da0p4 on /var (ufs, local, soft-updates)
 /dev/da0p5 on /usr (ufs, local, soft-updates)





This e-mail message, including any attachment(s), is intended solely for the 
addressee or addressees. Any views or opinions presented herein are solely 
those of the author and do not necessarily represent those of OSE.

If you are not the intended recipient of this communication please return this 
e-mail message and the attachment(s) to the sender and delete and destroy all 
copies.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9.1 and SU+J

2012-11-04 Thread Doug Hardie

On 4 November 2012, at 07:04, Bas Smeelen wrote:

 On 11/04/2012 03:00 PM, Bas Smeelen wrote:
 On 11/04/2012 02:11 PM, RW wrote:
 On Sun, 04 Nov 2012 11:44:28 +0100
 Bas Smeelen wrote:
 
 On 11/03/2012 07:30 PM, Herbert J. Skuhra wrote:
 On 03.11.2012 13:48, Doug Hardie wrote:
 
 I didn't notice that journaling is on by default and now dump is
 failing.  The only way I can see to disable journaling requires
 that the file system be dismounted, or read-only.  This is a
 remote machine and journaling is on root.  Is there any other way
 that would not require me to make a long trip out to the site?
 
 I guess I was a little off here, it actually worked for / also
 See further below for the whole story
 This was all done remote with ssh
 
 $ mount
 /dev/da0p2 on / (ufs, local, soft-updates)
 devfs on /dev (devfs, local, multilabel)
 /dev/da0p3 on /tmp (ufs, local, soft-updates)
 /dev/da0p4 on /var (ufs, local, soft-updates)
 /dev/da0p5 on /usr (ufs, local, soft-updates)
 $ su
 Password:
 root@osebart:/usr/home/Freebee # rm /.sujournal
 root@osebart:/usr/home/Freebee # rm /var/.sujournal
 root@osebart:/usr/home/Freebee # rm /tmp/.sujournal
 root@osebart:/usr/home/Freebee # rm /usr/.sujournal
 root@osebart:/usr/home/Freebee # uname -a
 FreeBSD osebart.ose.nl 9.1-RC2 FreeBSD 9.1-RC2 #0 r241106: Mon Oct 1 
 18:26:44 UTC 2012 
 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

I can't get that to work on i386.  Here is /etc/rc.d/fsck:

fi

echo Ready for tunefs
/sbin/tunefs -j disable /dev/da0p2
}

load_rc_config $name
run_rc_command $1




reboot computer and here is the output from messages:




Nov  4 14:07:19 Router kernel: Ready for tunefs
Nov  4 14:07:19 Router kernel: Clearing journal flags from inode 4
Nov  4 14:07:19 Router kernel: tunefs: soft updates journaling cleared but soft 
updates still set.
Nov  4 14:07:19 Router kernel: tunefs: remove .sujournal to reclaim space
Nov  4 14:07:19 Router kernel: Mounting local file systems:.



and the output from mount:

Router# mount
/dev/da0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)



Journaled is still on after 2 reboots.

Router# uname -a
FreeBSD Router 9.1-RC2 FreeBSD 9.1-RC2 #0 r241133: Tue Oct  2 17:11:45 UTC 2012 
r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

-- Doug

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9.1 and SU+J

2012-11-04 Thread Bas Smeelen
On 11/04/2012 11:18 PM, Doug Hardie wrote:
 On 4 November 2012, at 07:04, Bas Smeelen wrote:

 On 11/04/2012 03:00 PM, Bas Smeelen wrote:
 On 11/04/2012 02:11 PM, RW wrote:
 On Sun, 04 Nov 2012 11:44:28 +0100
 Bas Smeelen wrote:

 On 11/03/2012 07:30 PM, Herbert J. Skuhra wrote:
 On 03.11.2012 13:48, Doug Hardie wrote:

 I didn't notice that journaling is on by default and now dump is
 failing.  The only way I can see to disable journaling requires
 that the file system be dismounted, or read-only.  This is a
 remote machine and journaling is on root.  Is there any other way
 that would not require me to make a long trip out to the site?
 I guess I was a little off here, it actually worked for / also
 See further below for the whole story
 This was all done remote with ssh

 $ mount
 /dev/da0p2 on / (ufs, local, soft-updates)
 devfs on /dev (devfs, local, multilabel)
 /dev/da0p3 on /tmp (ufs, local, soft-updates)
 /dev/da0p4 on /var (ufs, local, soft-updates)
 /dev/da0p5 on /usr (ufs, local, soft-updates)
 $ su
 Password:
 root@osebart:/usr/home/Freebee # rm /.sujournal
 root@osebart:/usr/home/Freebee # rm /var/.sujournal
 root@osebart:/usr/home/Freebee # rm /tmp/.sujournal
 root@osebart:/usr/home/Freebee # rm /usr/.sujournal
 root@osebart:/usr/home/Freebee # uname -a
 FreeBSD osebart.ose.nl 9.1-RC2 FreeBSD 9.1-RC2 #0 r241106: Mon Oct 1
 18:26:44 UTC 2012
 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
 I can't get that to work on i386.  Here is /etc/rc.d/fsck:
 
  fi

  echo Ready for tunefs
  /sbin/tunefs -j disable /dev/da0p2
 }

 load_rc_config $name
 run_rc_command $1

 


 reboot computer and here is the output from messages:

 


 Nov  4 14:07:19 Router kernel: Ready for tunefs
 Nov  4 14:07:19 Router kernel: Clearing journal flags from inode 4
 Nov  4 14:07:19 Router kernel: tunefs: soft updates journaling cleared but 
 soft updates still set.
 Nov  4 14:07:19 Router kernel: tunefs: remove .sujournal to reclaim space
 Nov  4 14:07:19 Router kernel: Mounting local file systems:.

 

 and the output from mount:

 Router# mount
 /dev/da0p2 on / (ufs, local, journaled soft-updates)
 devfs on /dev (devfs, local, multilabel)

 

 Journaled is still on after 2 reboots.

 Router# uname -a
 FreeBSD Router 9.1-RC2 FreeBSD 9.1-RC2 #0 r241133: Tue Oct  2 17:11:45 UTC 
 2012 r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

 -- Doug

Hi Doug

This is bad. It did not work for me that way either on the / partition, but 
it worked on the other partitions.
Because I have seperate /tmp /var and /usr partition I was able to mount the 
/ partition readonly in multiuser mode with mount -o ro / and then tunefs -j 
disable and right after that reboot.
It seems that somehow when the / partition gets mounted after disabling the 
journal, journaled soft updates is still set and thus still enabled, but 
with a reboot it gets cleared?
I don't really understand this.



This e-mail message, including any attachment(s), is intended solely for the 
addressee or addressees. Any views or opinions presented herein are solely 
those of the author and do not necessarily represent those of OSE.

If you are not the intended recipient of this communication please return this 
e-mail message and the attachment(s) to the sender and delete and destroy all 
copies.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 9.1 and SU+J

2012-11-03 Thread Herbert J. Skuhra

On 03.11.2012 13:48, Doug Hardie wrote:


I didn't notice that journaling is on by default and now dump is
failing.  The only way I can see to disable journaling requires that
the file system be dismounted, or read-only.  This is a remote 
machine

and journaling is on root.  Is there any other way that would not
require me to make a long trip out to the site?


This is a task for mfsBSD: http://mfsbsd.vx.sk

--
Herbert

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org