Fwd: associated to AP (WEP mode) && no IP addr via DHCP

2009-03-06 Thread Matthias Apitz

Hello,

I've posted the problem below to freebsd-mobile with zero (visible)
effect; maybe someone from freebsd-hackers has at least an idea for me
where to look into for further debugging; it should to stay that a
simple stupid Nokia works in a Wifi zone, while FreeBSD does not :-)
Thx for your time reading my problem

matthias

- Forwarded message from Matthias Apitz  -

From: Matthias Apitz 
Date: Thu, 5 Mar 2009 13:00:22 +0100
To: freebsd-mob...@freebsd.org
Subject: associated to AP (WEP mode) && no IP addr via DHCP



Hello,

I'm going frequently to a Greek restaurant in my town to have dinner
there or some red wine, and reading stuff;

the owner of the restaurant has a Wifi zone and gave me, as its best
client, the WEP-key to connect to Internet; the problem is that he does
not have the admin password of the AP (some else configured it) and so I
can't have a look into the config of the AP;

my /etc/wpa_supplicant.conf for the AP is:

# Restaurante Odyssey (2007-11-18)
#
network={
ssid="ConnectionPoint"
scan_ssid=0
key_mgmt=NONE
wep_tx_keyidx=0
wep_key0=xx
}

and the interface associates fine:

# ifconfig ath0
ath0: flags=8843 metric 0 mtu 1500
ether 00:15:af:b2:ae:e6
inet 0.0.0.0 netmask 0xff00 broadcast 255.255.255.255
media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps)
status: associated
ssid ConnectionPoint channel 11 (2462 Mhz 11g) bssid 00:01:e3:0e:97:99
authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit txpower 31.5
bmiss 7 scanvalid 60 protmode CTS burst roaming MANUAL

but a DHCP request does not give me any IP addr; with 

# tcpdump -n -i ath0 

it says:

19:01:01.603869 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
00:15:af:b2:ae:e6, length 300
19:01:02.036549 00:01:e3:0e:97:98 Unknown SSAP 0x2c > ff:ff:ff:ff:ff:ff Unknown 
DSAP 0xa2 Information, send seq 98, rcv seq 39, Flags [Command], length 36
19:01:02.958057 00:01:e3:0e:97:98 ProWay NM > ff:ff:ff:ff:ff:ff Unknown DSAP 
0x5c Supervisory, Reject, rcv seq 8, Flags [Response], length 36
19:01:04.186892 00:01:e3:0e:97:98 Unknown SSAP 0xbe > ff:ff:ff:ff:ff:ff Unknown 
DSAP 0x44 Supervisory, Reject, rcv seq 39, Flags [Final], length 36
19:01:09.606218 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
00:15:af:b2:ae:e6, length 300

this situation is already for monthes and I gave up and always use UMTS
if I want connect to Internet; until yesterday I was thinking in some
kind of MAC addr filter in the AP, but 

yesterday I was there with a friend who has a Nokia mobile E51 device; I
gave him the key, he associated like me and got in the next second IP,
DNS and all was fine;

what is that for a problem? it is not ath0 related because my other
laptop with iwi0 does not get IP either;

what can I provide as information to nail this down?

Thx

matthias 

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.oclc.org/ http://www.UnixArea.de/
___
freebsd-mob...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "freebsd-mobile-unsubscr...@freebsd.org"

- End forwarded message -

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.oclc.org/ http://www.UnixArea.de/
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Spin down HDD after disk sync or before power off

2009-03-06 Thread Bernd Walter
On Thu, Mar 05, 2009 at 09:37:10PM +0100, Daniel Thiele wrote:
> 
> "Travelstar 5K320 Specification - HTSxxx models v1.0" avilable at
> http://www.hitachigst.com/tech/techlib.nsf/products/Travelstar_5K320
> 
> says in the paragraph "Required power-off sequence": "The required host
> system sequence for removing power from the drive is as follows [...]"
> whereas the TravelStar 5K100 specifications lists exactly the same steps
> but states that it is the BIOS' job to take care of executing them.
> 
> | Perhaps the OP's BIOS for some reason doesn't do this correctly.

The BIOS can only do this for known drives.
There is always the chance that the kernel knows more drives than
the BIOS, since usually people (including me) don't bother to tell the
BIOS about more than the boot drive.
Also FreeBSD had most recently used the ata controllers and it might be
left in a mode, which can't be taken over by the BIOS.

-- 
B.Walter  http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Spin down HDD after disk sync or before power off

2009-03-06 Thread Octavian Covalschi
I played more with this, and got here so far:

 if (atadev->param.support.command1 & ATA_SUPPORT_STANDBY) {
device_printf(dev, "Trying to spindown before poweroff.\n");
atadev->spindown = 1;
ad_spindown((void *)dev);
} else {
device_printf(dev, "Cannot spindown before poweroff.\n");
 }

for some reason  this check works on my laptop:
if (atadev->param.support.command1 & ATA_SUPPORT_STANDBY)

instead of
if (atadev->param.support.command2 & ATA_SUPPORT_STANDBY)

command1 vs command2

I'm using 7.1-STABLE...

By the way, does anyone know why ad_shutdown is _not_ called at poweroff?
Apparently it's called only at halt & reboot...

Still looking...

PS: I think last post didn't get to entire mail list, so trying to send it
again.

On Thu, Mar 5, 2009 at 3:58 PM, Daniel Thiele  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Octavian Covalschi wrote:
> | I tried your patch 1st, but it didn't work for me for shutdown, although
> I
> | didn't try it with halt (I assumed they work the same).
> |
> | While I was looking into that, I've discovered "ad_spindown" function,
> and
> | tried to use it, and as I said, it works (for me at least), but only with
> | halt.
> |
>
> Hmm, here is what David Tolpin mentioned back in 2006 when he replied
> (privately) to the fist fix I came up with:
>
> "Besides, I had to increase timeout in ata-queue for controlcmd "
>
> I am no kernel expert, so I am not quite sure how to incorporate his
> suggestion, but may be this helps with your problem.
>
> I would be interested in your progress on this topic, for maybe some day
> one of my machines will refuse to spin down the disk with the "simple"
> patch, too.
>
> |
> | On Thu, Mar 5, 2009 at 3:34 PM, Daniel Thiele  wrote:
> |
> | Octavian Covalschi wrote:
> | | OK.
> | |
> | | After several _kernel_ recompilations (by the end I found out that I
> | can use
> | | -DNO_KERNELCLEAN ) I've got some results.
> | |
> | | As i found out that ata-disk.c already has ad_spindown function, witch
> I
> | | tried to use, so after small changes I have:
> | |
> | | static void
> | | ad_shutdown(device_t dev)
> | | {
> | | struct ata_device *atadev = device_get_softc(dev);
> | |
> | | if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE)
> | | ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0);
> | |
> | |/* start */
> | |device_printf(dev, "Forced spindown\n");
> | |atadev->spindown = 1;
> | |ad_spindown((void *)dev);
> | |   /* end */
> | | }
> | |
> | | But for some reason this works only with Halt or shutdown -h now, on
> | | shutdown -p it even doesn't get inside ad_shutdown.
> | | Well at least I have this :)
> | |
> |
> | Does putting
> |
> | if (atadev->param.support.command2 &
> (ATA_SUPPORT_APM|ATA_SUPPORT_STANDBY))
> | ~ata_controlcmd(dev, ATA_STANDBY_IMMEDIATE, 0, 0, 0);
> |
> | directly into ad_shutdown() work?
> |
> | About your gmirror question: Unfortunately I never used gmirror together
> | with the spindown-hack, but I (as a just layperson on this topic(!)) do
> | not see any reason why this could cause a problem, since ad_shutdown()
> | is most likely called after the disks got unmounted and after GEOM is
> | done with them.
> |
> | Best regards,
> |
> | Daniel
> |>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.11 (FreeBSD)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkmwSxUACgkQCOZKcWNoXg5QBQCcDADmK8RrIduZCAY6IksuHSNm
> disAnRUjx6SgGUPghw+/X9uf5oFFdEs/
> =xmQO
> -END PGP SIGNATURE-
>
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: How to tear down a geom mirror?

2009-03-06 Thread Jilles Tjoelker
On Thu, Mar 05, 2009 at 10:27:50PM -0800, Peter Steele wrote:
> I've created a USB boot disk that is used to clone itself onto the
> systems hard drives, setting up mirrored file systems in the process.
> The main difficulty I'm having is reimaging a system with an existing
> OS whose drives are already configured in a mirror. I want of course
> to destroy the mirror and create a complete new one, but I can't find
> the right process to accomplish this reliably. I don't want to make
> any assumptions about what mirrors might exist already and I
> definitely don't want to do "gmirror load" before I get a chance to
> destroy any existing mirrors. 

> What I am doing is to clean the drive using dd. For example, assume my
> target system has two drives ad1 and ad2. I issue the following
> commands: 

> dd if=/dev/zero of=/dev/ad1 bs=512 count=79 
> dd if=/dev/zero of=/dev/ad2 bs=512 count=79 

gmirror and various other geom modules store their metadata on the last
sector(s) of the drive, so you need to wipe that too.

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


Re: How to tear down a geom mirror?

2009-03-06 Thread Ivan Voras
Jilles Tjoelker wrote:
> On Thu, Mar 05, 2009 at 10:27:50PM -0800, Peter Steele wrote:
>> I've created a USB boot disk that is used to clone itself onto the
>> systems hard drives, setting up mirrored file systems in the process.
>> The main difficulty I'm having is reimaging a system with an existing
>> OS whose drives are already configured in a mirror. I want of course
>> to destroy the mirror and create a complete new one, but I can't find
>> the right process to accomplish this reliably. I don't want to make
>> any assumptions about what mirrors might exist already and I
>> definitely don't want to do "gmirror load" before I get a chance to
>> destroy any existing mirrors. 
> 
>> What I am doing is to clean the drive using dd. For example, assume my
>> target system has two drives ad1 and ad2. I issue the following
>> commands: 
> 
>> dd if=/dev/zero of=/dev/ad1 bs=512 count=79 
>> dd if=/dev/zero of=/dev/ad2 bs=512 count=79 
> 
> gmirror and various other geom modules store their metadata on the last
> sector(s) of the drive, so you need to wipe that too.

Or simply use the "clean" command, for example "gmirror clean" (also
supported in other GEOM classes).



signature.asc
Description: OpenPGP digital signature


Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
> Or simply use the "clean" command, for example "gmirror clean" (also 
>supported in other GEOM classes). 

Can I do a gmirror clean without first doing a gmirror load? That's what I want 
to avoid since it can hang if the mirror is is a bad state. 

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


Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
>gmirror and various other geom modules store their metadata on the last 
>sector(s) of the drive, so you need to wipe that too. 

In our case the systems we are using aren't mirroring the whole drive, just 
certain slices. Some systems have a single slice mirrored (plus an unmirrored 
slice), and others have two slices mirrored (plus a third unmirrored slice). I 
need a way to destroy the existing mirrors, without doing a gmirror load, and 
ultimately without making any assumptions about the number or condition of 
mirrored slices on the drives I am about to install a new OS onto. 


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


Re: How to tear down a geom mirror?

2009-03-06 Thread Ivan Voras
Peter Steele wrote:
>> Or simply use the "clean" command, for example "gmirror clean" (also 
>> supported in other GEOM classes). 
> 
> Can I do a gmirror clean without first doing a gmirror load? That's what I 
> want to avoid since it can hang if the mirror is is a bad state. 

Sorry, the actual command is "clear", not "clean".

Yes. The "clear" commands usually just zero-out the last sector of the
underlying provider (doesn't matter if it's a drive, slice or something
altogether different) so you don't have to do it manually.



signature.asc
Description: OpenPGP digital signature


Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
>Yes. The "clear" commands usually just zero-out the last sector of the 
>underlying provider (doesn't matter if it's a drive, slice or something 
>altogether different) so you don't have to do it manually. 

So, as a generic solution then I could just iterate through all slices of all 
drives and run "gmirror clear" on each, and run dd to clear the first sectors. 
What btw is in these first sectors? I use this command because I saw it being 
done in one of the gmirror tutorials. I understand what the gmirror clear 
command does, but what is the dd command clearing? 

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


wrong data in remapped buffer

2009-03-06 Thread Alexej Sokolov
Hello,
I try to MALLOC a buffer in kern, then remap it with vm_map_find(), to space
of user process.
Some times the remapped buffer in user space contain incorrect data.

What could be a reason of this problem and how to solve it ?
Thanx,
Alexej


P.S. Whole code of remapping function:  http://pastebin.com/m78da0b37
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: How to tear down a geom mirror?

2009-03-06 Thread Oliver Fromme
Peter Steele wrote:
 > > Yes. The "clear" commands usually just zero-out the last sector of the 
 > > underlying provider (doesn't matter if it's a drive, slice or something 
 > > altogether different) so you don't have to do it manually. 
 > 
 > So, as a generic solution then I could just iterate through all
 > slices of all drives and run "gmirror clear" on each, and run dd
 > to clear the first sectors. What btw is in these first sectors? I
 > use this command because I saw it being done in one of the gmirror
 > tutorials. I understand what the gmirror clear command does, but what
 > is the dd command clearing?

It clears the MBR (slice table) and GPT or disklabel
(partition table), if any.  Depending on how many
sectors you clear, it will also destroy the beginning
the file system, e.g. the first UFS superblock.

By the way, if you cannot use "gmirror clear" for any
reason, you can also easily clear the last sector on
any devices using the information from diskinfo.
For example:

   DEV=/dev/ad0s1a
   set -- $(diskinfo $DEV)
   BLOCKSIZE=$2
   MEDIASIZE=$4
   LASTSEC=$(( $MEDIASIZE - 1 ))
   dd if=/dev/zero of=$DEV bs=$BLOCKSIZE seek=$(( $MEDIASIZE - 1 )) count=1

That's pretty much what "gmirror clear /dev/ad0s1a" does.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination
of their C programs."
-- Robert Firth
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
Okay, thanks everyone for their feedback. I think I have a workable solution 
now. 

Peter 

- Original Message - 
From: "Oliver Fromme"  
To: freebsd-hackers@FreeBSD.ORG, pste...@maxiscale.com 
Sent: Friday, March 6, 2009 11:15:11 AM GMT -08:00 US/Canada Pacific 
Subject: Re: How to tear down a geom mirror? 

Peter Steele wrote: 
> > Yes. The "clear" commands usually just zero-out the last sector of the 
> > underlying provider (doesn't matter if it's a drive, slice or something 
> > altogether different) so you don't have to do it manually. 
> 
> So, as a generic solution then I could just iterate through all 
> slices of all drives and run "gmirror clear" on each, and run dd 
> to clear the first sectors. What btw is in these first sectors? I 
> use this command because I saw it being done in one of the gmirror 
> tutorials. I understand what the gmirror clear command does, but what 
> is the dd command clearing? 

It clears the MBR (slice table) and GPT or disklabel 
(partition table), if any. Depending on how many 
sectors you clear, it will also destroy the beginning 
the file system, e.g. the first UFS superblock. 

By the way, if you cannot use "gmirror clear" for any 
reason, you can also easily clear the last sector on 
any devices using the information from diskinfo. 
For example: 

DEV=/dev/ad0s1a 
set -- $(diskinfo $DEV) 
BLOCKSIZE=$2 
MEDIASIZE=$4 
LASTSEC=$(( $MEDIASIZE - 1 )) 
dd if=/dev/zero of=$DEV bs=$BLOCKSIZE seek=$(( $MEDIASIZE - 1 )) count=1 

That's pretty much what "gmirror clear /dev/ad0s1a" does. 

Best regards 
Oliver 

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. 
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: 
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- 
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart 

FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd 

"One of the main causes of the fall of the Roman Empire was that, 
lacking zero, they had no way to indicate successful termination 
of their C programs." 
-- Robert Firth 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Spin down HDD after disk sync or before power off

2009-03-06 Thread Rick C. Petty
On Wed, Mar 04, 2009 at 08:56:14PM +0100, Joerg Sonnenberger wrote:
> On Wed, Mar 04, 2009 at 08:38:52PM +0100, Oliver Fromme wrote:
> > Octavian Covalschi wrote:
> >  > I'm looking a way to spin down HDD just right before power off. Why?
> >  > 
> >  > Because currently when I call "shutdown -p now", HDD is powered off at 
> > it's
> >  > full speed (7200.4) and as a result
> >  > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me 
> > as
> >  > I'm afraid it can damage HDD.
> > 
> > You don't have to spin down a disk before powering it off.
> > The noise you hear is probably caused by the "autopark"
> > feature of the drive.  It is harmless.
> 
> This is not true. Many hard disks don't like having to do an emergency
> shutdown as it affects the disk life time negatively. That's what
> happens if you poweroff the machine when the disks are still spinning.

I believe you are incorrect.  Most hard drives do an "autopark" of the head
into the landing zone (which is near the spindle) when power is lost.  My
understanding is that because it is spinning so fast, the heads can fly for
quite a long time so the HDD has enough time to autopark and such an
operation does not consume much power.  Thus the operation can be performed
with a little capacitance or by using some of the mechanical energy in the
spindle.

If drives did not auto, there would be orders of magnitude more failures
due to head crashes.  The heads absolutely have to be retracted into the
landing zone if the spindle speed is too low or the drive will fail.

What's actually bad for the drives is the actual spinup and spindowns,
which require the head to sit in the very bumpy landing zone until the
drive reaches optimal spindle speed and thus enough airflow to safely move
the heads around the platter without contact.

Strangely, atacontrol(8) has a command for spindown (which is inherently
bad for drives yet still a reasonable feature) but there is no command for
spinup.  I wish there was a spinup command because I've seen drives that
won't do a spinup until they receive a special ATA command.  I was never
able to find any docs, so if anyone knows the command I'd be willing to
write a patch against atacontrol!

-- Rick C. Petty
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Spin down HDD after disk sync or before power off

2009-03-06 Thread Octavian Covalschi
Why is spinning down is bad for HDD ? I believe it's better to spindown a
drive,
instead of cutting power too sudden.

On Fri, Mar 6, 2009 at 2:30 PM, Rick C. Petty <
rick-freebsd2...@kiwi-computer.com> wrote:

> On Wed, Mar 04, 2009 at 08:56:14PM +0100, Joerg Sonnenberger wrote:
> > On Wed, Mar 04, 2009 at 08:38:52PM +0100, Oliver Fromme wrote:
> > > Octavian Covalschi wrote:
> > >  > I'm looking a way to spin down HDD just right before power off. Why?
> > >  >
> > >  > Because currently when I call "shutdown -p now", HDD is powered off
> at it's
> > >  > full speed (7200.4) and as a result
> > >  > I hear a noise of stopping/spinning down of HDD, and _this_ concerns
> me as
> > >  > I'm afraid it can damage HDD.
> > >
> > > You don't have to spin down a disk before powering it off.
> > > The noise you hear is probably caused by the "autopark"
> > > feature of the drive.  It is harmless.
> >
> > This is not true. Many hard disks don't like having to do an emergency
> > shutdown as it affects the disk life time negatively. That's what
> > happens if you poweroff the machine when the disks are still spinning.
>
> I believe you are incorrect.  Most hard drives do an "autopark" of the head
> into the landing zone (which is near the spindle) when power is lost.  My
> understanding is that because it is spinning so fast, the heads can fly for
> quite a long time so the HDD has enough time to autopark and such an
> operation does not consume much power.  Thus the operation can be performed
> with a little capacitance or by using some of the mechanical energy in the
> spindle.
>
> If drives did not auto, there would be orders of magnitude more failures
> due to head crashes.  The heads absolutely have to be retracted into the
> landing zone if the spindle speed is too low or the drive will fail.
>
> What's actually bad for the drives is the actual spinup and spindowns,
> which require the head to sit in the very bumpy landing zone until the
> drive reaches optimal spindle speed and thus enough airflow to safely move
> the heads around the platter without contact.
>
> Strangely, atacontrol(8) has a command for spindown (which is inherently
> bad for drives yet still a reasonable feature) but there is no command for
> spinup.  I wish there was a spinup command because I've seen drives that
> won't do a spinup until they receive a special ATA command.  I was never
> able to find any docs, so if anyone knows the command I'd be willing to
> write a patch against atacontrol!
>
> -- Rick C. Petty
> ___
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
>
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Spin down HDD after disk sync or before power off

2009-03-06 Thread Rick C. Petty
On Fri, Mar 06, 2009 at 03:30:14PM -0600, Octavian Covalschi wrote:
> Why is spinning down is bad for HDD ? I believe it's better to spindown a
> drive,
> instead of cutting power too sudden.

Comparing those two, I'd say it shouldn't matter (although probably a
forced spindown may be better).  But pulling power from a drive does not
mean the drive immediately stops doing stuff.

I was just saying spindown on disks is bad in the first place.  Sure, you
might save some wear and tear on the bearings, but you risk problems with
the heads on both spindown and spinup.  In other words, if you can avoid
power-cycling your drives, they should last longer (in that you're less
likely to destroy the heads).

-- Rick C. Petty
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"