Re: removing external usb hdd without unmounting causes reboot?

2007-07-22 Thread Nikolay Pavlov
On Saturday 21 July 2007 20:50:21 Zoran Kolic wrote:
 This topic is extremely interesting. For me, unmounting usb
 device is not so hard to do. I remember -r flag to mount
 with just read option. So, if hand follows the brain impuls,
 put another impuls to unmount it first.

Yup. But this is only valid for advenced users.

-- 

- Best regards, Nikolay Pavlov. -




signature.asc
Description: This is a digitally signed message part.


Re: removing external usb hdd without unmounting causes reboot?

2007-07-22 Thread Norberto Meijome
On Sat, 21 Jul 2007 17:19:51 +0200
Stefan Esser [EMAIL PROTECTED] wrote:

 Norberto Meijome schrieb:
  On Thu, 19 Jul 2007 17:38:14 +0200
  [LoN]Kamikaze [EMAIL PROTECTED] wrote:
  
  As I mentioned earlier I remember it working during the 5.3 era on Stable, 
  at
  some point it worked. I even remember removing my CD-Rom drive from my 
  Thinkpad
  without running atacontrol detach. The system just took it and the drive 
  just
  continued working after I put it back in.
  
  on 6.2-STABLE (of a few days ago), i have this happening a couple of times 
  with no adverse effect at all. 
  Burn DVD/Cd, when finished, hald detects the disk, mounts it, /dev/cd0 in 
  /media/whatever.
  
  i can eject the disk just fine (which in itself is weird, i think) the 
  device is still there...
  umount /dev/cd0 
  
  works fine and off it goes. other than that, no, i havent tried to access 
  the device in question
 
 In that case the device has been mounted R/O before, and if
 you don't remove it in the middle of a transaction, there
 is nothing the kernel might want to do with the physical
 device to unmount it (and even within a transfer, this ought
 to be caught by the driver). For that reason I had suggested
 to have a soft-R/O mode for removable devices, which together
 with a very short flush delay might allow such a device to
 be mounted R/O nearly all the time (tm) ;-) This is not
 a perfect solution, but it is similar to the way USB sticks
 are used with Windows/XP: Wait a second or two and remove it.
 While not perfect this covers the case of MP3 players or
 digicams that are mounted as USB storage devices, and many
 other cases. To make this a perfect solution is much harder,
 but even a simple implementation would be a big step forward.

Yes, I agree it would be a good interim solution.

thx!
_
{Beto|Norberto|Numard} Meijome

It is a lesson which all history teaches wise men, to put trust in ideas, and 
not in circumstances.
   Emerson

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: removing external usb hdd without unmounting causes reboot?

2007-07-22 Thread Norberto Meijome
On Sat, 21 Jul 2007 20:44:13 -0600 (MDT)
M. Warner Losh [EMAIL PROTECTED] wrote:

 In message: [EMAIL PROTECTED]
 Norberto Meijome [EMAIL PROTECTED] writes:
 : On Thu, 19 Jul 2007 09:02:50 -0600 (MDT)
 : M. Warner Losh [EMAIL PROTECTED] wrote:
 : 
 :  In message: [EMAIL PROTECTED]
 :  Momchil Ivanov [EMAIL PROTECTED] writes:
 :  : What is then the reason for the kernel not being able to unmount a
 :  : filesystem whose provider is no longer present?
 :  
 :  The problem is that the device driver has wound down, deallocated
 :  memory, etc.  Now the kernel comes along with stale references to the
 :  device and panic ensues.  It is really just that simple.  There's no
 :  replacement of the now-dead device with dead calls.
 :  
 :  And even if you fixed that, most of the file systems in the tree today
 :  do not tolerate errors on writes at all and that also leads to
 :  panics.  This is why firewire freezes the I/Os rather than failing
 :  them (and why umount -f on a firewire drive hangs).
 : 
 : Please point me to the correct RTFM, because I feel this worth it :)
 
 src/sys/fs/..., src/sys/kern/... and src/sys/vm/... are your best bets.
 
 : Is there a reason why the kernel cannot check 'upwards' if a device
 : is being used, ie mounted ? and prevent the unloading of the device
 : driver ?
 
 Check, sure, it can check.  But what does a simple check accomplish if
 the filesystem panics if the underlying media returns an error?  The
 problem isn't as simple as just looking in one place or another, but
 rather systemic in nature.
 

thanks Warner. What do you estimate is the cost (time, at least) to investigate
and fix this issue? SoC project? 4 mth project? 

cheers,
B

_
{Beto|Norberto|Numard} Meijome

Anyone who isn't confused here doesn't really understand what's going on.

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


HOW TO: Setting up rails for shared hosting on a dedicated box. . .?

2007-07-22 Thread Michael Williams

Hi All,

As you may already know, A partner and I recently purchased a  
dedicated FreeBSD box.  We're currently using Plesk (blech!) to  
manage client domains and such.  I'm curious though as to what the  
best (most manageable) setup/configuration is for supporting Rails  
for each of our clients.  Basically we want to be our own Shared  
Hosting Rails Provider (for lack of a more appropriate phrase) and  
need to figure out the best server configuration.  Just a bit of an  
FYI, everything is already running on Apache2 so I'd need to share  
Apache2 among all programs (e.g. svn, rails, etc);  as opposed to  
splitting tasks between Apache and Apache2.


If you could point me in the right direction it would be most  
appreciated.


Regards,
Michael
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Help! My laptop drive may be dying.

2007-07-22 Thread Bruce M Simpson

Hi,

My laptop drive might be dying. It is a Samsung MP0804H which I have 
used for around 28 months without issue.


Every now and then it will click and sound as though it is thermally 
recalibrating itself.


I ran SMART diagnostics from smartmontools, and Samsung's own diag tools 
which all report the drive is OK (a full captive surface test). I see 
nothing untoward in the SMART info pages.


Whilst Windows is able to tolerate the retrying of ATA commands which 
this click appears to be inducing, FreeBSD can easily get sick and just 
hang, which majorly gets in the way of real work.


I am always running X without exception when this happens, so I can't 
get meaningful ATA error messages. Of course these happen before the 
buffer cache is flushed, so they don't show up in /var/log/messages, if 
anything is showing up at all.


Many thanks for any help you can provide...

regards,
BMS
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help! My laptop drive may be dying.

2007-07-22 Thread Mike Tancsa

At 09:43 AM 7/22/2007, Bruce M Simpson wrote:
I ran SMART diagnostics from smartmontools, and Samsung's own diag 
tools which all report the drive is OK (a full captive surface 
test). I see nothing untoward in the SMART info pages.


Hi Bruce,
These symptoms (the OS reporting errors, the drive saying 
all A-OK) remind me of a bad cable/connector.  Have you tried a new cable ?


---Mike 


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


Re: Panic with umass (with USB tape and Amanda)

2007-07-22 Thread Juergen Lock
In article [EMAIL PROTECTED] you write:
Hello everybody,
Hi!

I have just had a panic on 6.2 amd64 box with ehci connected USB DDS4
tape drive while it was for the first time being accessed with Amanda. I
have previously successfully tested it with tar.

I have a kernel crash dump with the following information:

panic: trying to sleep while sleeping is prohibited
cpuid = 0
KDB: stack backtrace:
panic() at panic+0x250
sleepq_add() at sleepq_add+0x225
msleep() at msleep+0x132
bwait() at bwait+0x55
swap_pager_putpages() at swap_pager_putpages+0x45c
vm_pageout_flush() at vm_pageout_flush+0x13b
vm_contig_launder_page() at vm_contig_launder_page+0xdc
vm_page_alloc_contig() at vm_page_alloc_contig+0x321
contigmalloc() at contigmalloc+0x5f7
bus_dmamem_alloc() at bus_dmamem_alloc+0x80
usb_block_allocmem() at usb_block_allocmem+0x118
...

This looks like the known problem of bus_dmamem_alloc sleeping
when it shouldn't (its being called with BUS_DMA_NOWAIT), which has
hit me with usb before.

 Workarounds:

1. add more RAM (this seems to be triggered by page shortage/fragmentation)
2. reboot before you use the device
3. try the HPS usb stack, it may have worked around this issue:
http://www.turbocat.net/~hselasky/usb4bsd/
(I hope this is still the right url, I haven't used the stack in a while.)

 HTH,
Juergen
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help! My laptop drive may be dying.

2007-07-22 Thread Dmitry Morozovsky
On Sun, 22 Jul 2007, Mike Tancsa wrote:

MT At 09:43 AM 7/22/2007, Bruce M Simpson wrote:
MT  I ran SMART diagnostics from smartmontools, and Samsung's own diag tools
MT  which all report the drive is OK (a full captive surface test). I see
MT  nothing untoward in the SMART info pages.
MT 
MT Hi Bruce,
MT These symptoms (the OS reporting errors, the drive saying all A-OK)
MT remind me of a bad cable/connector.  Have you tried a new cable ?

Hmm, in a laptop? ;)

Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***

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


Re: Help! My laptop drive may be dying.

2007-07-22 Thread Paul Fraser

MT Hi Bruce,
MT These symptoms (the OS reporting errors, the drive saying all A-OK)
MT remind me of a bad cable/connector.  Have you tried a new cable ?

Hmm, in a laptop? ;)


I've had a similar problem with a Dell notebook. There is absolutely
nothing wrong with the hard drive (in fact, nothing wrong with either
of the two drives I've put in there) but it does appear the controller
is rather broken. Since this started happening just out of warranty,
it didn't seem worth the cost to repair it. Besides, since the
notebook is typically sitting on a docking station, my better half
doesn't mind booting FreeBSD by NFS. Perhaps not practical in your
situation however.

Of course, I did have the problem of having to pry the Vista license
from her terrified hands at first...

One other thing I will mention however, is the problems with this
notebook got so severe that although symptoms were almost identical to
yours at first, eventually even Windows refused to tolerate it any
longer and packed it in.



--
Regards,

Paul Fraser // Independent Technical Consultant // Ph: +61 405 341 905
// furyc0de.net

This correspondence and any related attachments are confidential.
Distribution, reproduction, or release (public domain or otherwise)
without the author's prior written consent is STRICTLY FORBIDDEN.
Failure to distribute any of the aforementioned without this footer
(intact and unmodified) is also STRICTLY FORBIDDEN. Failure to abide
by these terms and conditions can result in legal action.

If you have received this correspondance in error, or believe any of
these terms have been breached, you are requested to contact the
author immediately and take steps to destroy all copies in your
possession.

PGP KeyID: 0x64E635B1
Keyserver: pgp.mit.edu:11371
Key fingerprint: CDA3 0797 68B9 0EC1 D4D3 A7B9 D7D7 4924 64E6 35B1
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help! My laptop drive may be dying.

2007-07-22 Thread Søren Schmidt

Bruce M Simpson wrote:

Hi,

My laptop drive might be dying. It is a Samsung MP0804H which I have 
used for around 28 months without issue.


Every now and then it will click and sound as though it is thermally 
recalibrating itself.


I ran SMART diagnostics from smartmontools, and Samsung's own diag 
tools which all report the drive is OK (a full captive surface test). 
I see nothing untoward in the SMART info pages.
Well, sounds like the drive is indeed dying, recalibrating noises like 
that is a bad sign, its most likely having real trouble reading certain 
areas of the medium.


If your SMART output tells anything about read retries or number of 
remaps that could be an indicator of upcoming problems, however not all 
drives has that info in the SMART pages.


In the real world scenario SMART can only tell you about the problem 
when the drive has given up on the data, there is almost newer any real 
prewarns to failure.


Whilst Windows is able to tolerate the retrying of ATA commands which 
this click appears to be inducing, FreeBSD can easily get sick and 
just hang, which majorly gets in the way of real work.
Depends on whats happening, you could try to up the timeout in 
ata-disk.c and see if it survives the errors that way, to at least try 
to save the data before its too late.


-Søren

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


Re: Help! My laptop drive may be dying.

2007-07-22 Thread Mike Tancsa

At 04:59 PM 7/22/2007, Dmitry Morozovsky wrote:

On Sun, 22 Jul 2007, Mike Tancsa wrote:
OK)
MT remind me of a bad cable/connector.  Have you tried a new cable ?

Hmm, in a laptop? ;)


Details :)   Dirty or weak connection point ?  If the controller was 
working well up until this point, it doesnt sound like a driver bug.


---Mike 


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


Re: ntpd just sits there and does nothing

2007-07-22 Thread doug

On Sat, 21 Jul 2007, Kevin Oberman wrote:


Hi,

[LoN]Kamikaze wrote:

Doug Hardie wrote:


On Jul 19, 2007, at 10:08, [LoN]Kamikaze wrote:



As the subject says, on my 6-stable systems ntpd just sits there and does
nothing. The logs only mention when the daemon gets started or shut
down. It
complains when servers are not reachable, but does nothing when they
are available.

The drift file always contains 0.00.


Mostly likely this means you are not communicating with the ntp servers. You 
never gave us your ntpd.conf file (that I saw anyway) and what do you get with 
'ntpdc -p', or the more complex command suggested earlier?



ntpd will not change time if the difference is too big - I think it
should be less then 1000s.
ntpdate will :)


If ntpd is working your clock will not vary from the server by more than a 
second, much less 1000 secs. If ntpdate does reset the clock, it suggests that 
your firewalls are not the problem and at least one of the servers will answer 
your queries. You can see if ntp packets are being passed by using tcpdump.


I suppose you have made sure its running by something like 'ps -aux | grep ntp'.


ntpdate is deprecated and is not recommended these days. The proper answer is
to start ntpd with the -g option and to add the 'iburst' option to one or more
of the servers in /etc/ntp.conf. The 'iburst' will speed up th initial sync to
close to that of ntpdate, but have much greater accuracy.

You can get the '-g' by adding 'ntpd_sync_on_start=YES' to rc.conf.
--

yea but so does 'ntpdate_enable=YES', but I still like nslookup too :)

The problem clearly seems to be you are not communicating with the ntp 
servers. The possibilities have all been stated: bad ntp.conf, firewall (you 
said there were two levels), or the servers you chose are not accepting your 
queries. Without seeing the data requested we are all guessing.


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