Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-08-26 Thread Maurizio Vairani

On 24/07/2013 13.19, Ronald Klop wrote:
On Thu, 18 Jul 2013 09:52:13 +0200, Maurizio Vairani 
maurizio.vair...@cloverinformatica.it wrote:



On 17/07/2013 17:29, Julian H. Stacey wrote:

Maurizio Vairani wrote:

On 17/07/2013 11:50, Ronald Klop wrote:

On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani
maurizio.vair...@cloverinformatica.it  wrote:


Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue 
Jul 16
16:32:39 CEST 2013 
root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a
SanDisk memory stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this 
screen

shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html 





and I need to press the power button for more than 4 seconds to
switch off the laptop.

The problem is always reproducible.

Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
Probably it masks the symptom. Andriy Gapon hypothesizes a bug in the 
ZFS clean up code:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017857.html

Surely one can use a startup script with the command:
zpool add tank0 cache /dev/da0
and a shutdown script with:
zpool remove tank0 /dev/da0
but this mask the symptom too.

I prefer the Ronald solution because:
- is simpler: it adds only one line (hw.usb.no_shutdown_wait=1) to 
one file (/boot/loader.conf).
- is fastest: the zpool add/remove commands take time and 
“hw.usb.no_shutdown_wait=1” in /boot/loader.conf speeds up the 
shutdown process.
- is cleaner: the zpool add/remove commands pair will fill up the 
tank0 pool history.


Regards
Maurizio


Keep an eye on this commit when it is merged to 9-stable.
http://svnweb.freebsd.org/changeset/base/253606
It might be the fix of the problem.

Ronald.

It works !
Just upgraded the laptop to r254783. Shutdown and reboot works fine, 
regardless of the hw.usb.no_shutdown_wait value.


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

Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-24 Thread Ronald Klop
On Thu, 18 Jul 2013 09:52:13 +0200, Maurizio Vairani  
maurizio.vair...@cloverinformatica.it wrote:



On 17/07/2013 17:29, Julian H. Stacey wrote:

Maurizio Vairani wrote:

On 17/07/2013 11:50, Ronald Klop wrote:

On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani
maurizio.vair...@cloverinformatica.it  wrote:


Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC   
amd64



For speed up the compilation I have added to the pool, tank0,  a
SanDisk memory stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen
shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html



and I need to press the power button for more than 4 seconds to
switch off the laptop.

The problem is always reproducible.

Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
Probably it masks the symptom. Andriy Gapon hypothesizes a bug in the  
ZFS clean up code:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017857.html

Surely one can use a startup script with the command:
zpool add tank0 cache /dev/da0
and a shutdown script with:
zpool remove tank0 /dev/da0
but this mask the symptom too.

I prefer the Ronald solution because:
- is simpler: it adds only one line (hw.usb.no_shutdown_wait=1) to one  
file (/boot/loader.conf).
- is fastest: the zpool add/remove commands take time and  
“hw.usb.no_shutdown_wait=1” in /boot/loader.conf speeds up the shutdown  
process.
- is cleaner: the zpool add/remove commands pair will fill up the tank0  
pool history.


Regards
Maurizio


Keep an eye on this commit when it is merged to 9-stable.
http://svnweb.freebsd.org/changeset/base/253606
It might be the fix of the problem.

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

Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-18 Thread Maurizio Vairani

On 17/07/2013 17:29, Julian H. Stacey wrote:

Maurizio Vairani wrote:

On 17/07/2013 11:50, Ronald Klop wrote:

On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani
maurizio.vair...@cloverinformatica.it  wrote:


Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64


For speed up the compilation I have added to the pool, tank0,  a
SanDisk memory stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen
shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html



and I need to press the power button for more than 4 seconds to
switch off the laptop.

The problem is always reproducible.

Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
Probably it masks the symptom. Andriy Gapon hypothesizes a bug in the 
ZFS clean up code:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017857.html

Surely one can use a startup script with the command:
zpool add tank0 cache /dev/da0
and a shutdown script with:
zpool remove tank0 /dev/da0
but this mask the symptom too.

I prefer the Ronald solution because:
- is simpler: it adds only one line (hw.usb.no_shutdown_wait=1) to one 
file (/boot/loader.conf).
- is fastest: the zpool add/remove commands take time and 
“hw.usb.no_shutdown_wait=1” in /boot/loader.conf speeds up the shutdown 
process.
- is cleaner: the zpool add/remove commands pair will fill up the tank0 
pool history.


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


Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Maurizio Vairani

Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a SanDisk 
memory stick as cache device with the command:



# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html


and I need to press the power button for more than 4 seconds to switch 
off the laptop.


The problem is always reproducible.


Regards

Maurizio

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


RE: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Ivailo Tanusheff
I think this is expected as your screenshot shows the USB has being 
disconnected, so you actually lost the cache device on the shutdown.
Maybe you should implement a shutdown script that removes the USB cache from 
the pool before the shutdown command is issued :)

Best regards,
Ivailo Tanusheff

-Original Message-
From: owner-freebsd-sta...@freebsd.org 
[mailto:owner-freebsd-sta...@freebsd.org] On Behalf Of Maurizio Vairani
Sent: Wednesday, July 17, 2013 11:27 AM
To: freebsd-stable@FreeBSD.org; freebsd...@freebsd.org
Subject: Shutdown problem with an USB memory stick as ZFS cache device

Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64


For speed up the compilation I have added to the pool, tank0,  a SanDisk memory 
stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html


and I need to press the power button for more than 4 seconds to switch 
off the laptop.

The problem is always reproducible.


Regards

Maurizio

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


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


Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Ronald Klop
On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani  
maurizio.vair...@cloverinformatica.it wrote:



Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16  
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a SanDisk  
memory stick as cache device with the command:



# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen  
shot:



http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html


and I need to press the power button for more than 4 seconds to switch  
off the laptop.


The problem is always reproducible.


Does sysctl hw.usb.no_shutdown_wait=1 help?

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


Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Steven Hartland


- Original Message - 
From: Ronald Klop ronald-freeb...@klop.yi.org


Does sysctl hw.usb.no_shutdown_wait=1 help?


That will just prevent the wait it won't stop the
shutdown from happening.

   Regards
   Steve


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


[SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Maurizio Vairani

On 17/07/2013 11:50, Ronald Klop wrote:
On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani 
maurizio.vair...@cloverinformatica.it wrote:



Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a 
SanDisk memory stick as cache device with the command:



# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen 
shot:



http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html 




and I need to press the power button for more than 4 seconds to 
switch off the laptop.


The problem is always reproducible.


Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

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


Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Andriy Gapon
on 17/07/2013 12:50 Ronald Klop said the following:
 Does sysctl hw.usb.no_shutdown_wait=1 help?

I believe that the root cause of the issue is that ZFS does not perform full
clean up on shutdown and thus does not release its devices.  But perhaps I am
mistaken.
In any case, I think that doing the same kind of clean up as done on zfs module
unload would be advantageous.

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


Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Julian H. Stacey
Maurizio Vairani wrote:
 On 17/07/2013 11:50, Ronald Klop wrote:
  On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani 
  maurizio.vair...@cloverinformatica.it wrote:
 
  Hi all,
 
 
  on a Compaq Presario laptop I have just installed the latest stable
 
 
  #uname -a
 
  FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
  16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64
 
 
  For speed up the compilation I have added to the pool, tank0,  a 
  SanDisk memory stick as cache device with the command:
 
 
  # zpool add tank0 cache /dev/da0
 
 
  But when I shutdown the laptop the process will halt with this screen 
  shot:
 
 
  http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html
   
 
 
 
  and I need to press the power button for more than 4 seconds to 
  switch off the laptop.
 
  The problem is always reproducible.
 
  Does sysctl hw.usb.no_shutdown_wait=1 help?
 
  Ronald.
 Thank you Ronald it works !
 
 In /boot/loader.conf added the line
 hw.usb.no_shutdown_wait=1
 
 Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with  .
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org