Unable to shutdown

Kevin Oberman kob6558 at gmail.com
Tue Aug 30 15:50:38 UTC 2011


On Mon, Aug 29, 2011 at 1:06 PM, Eli Dart <dart at es.net> wrote:
>
>
> On 8/28/11 1:06 PM, Bengt Ahlgren wrote:
>>
>> Kevin Oberman<kob6558 at gmail.com>  writes:
>>
>>> I've run into an odd problem with dismounting file systems on a
>>> Seagate Expansion portable
>>> USB drive. Running 8-stable on an amd64 system and with two FAT32
>>> (msdosfs) file systems
>>> on the drive.
>>>
>>> The drive is "green" and spins down when idle.  If an attempt is made
>>> to shutdown the
>>> system while the drive is spun down, the system goes through the usual
>>> shutdown including
>>> flushing all buffer out to disk, but when the final disk access to
>>> mark the file systems as
>>> clean, the drive never spins up and the system hangs until it is
>>> powered down. I've found no
>>> way to avoid this other then to remember to access the disk and cause
>>> it to spin up before
>>> shutting down.
>>>
>>> If I attempt to unmount the file systems when the drive is shut down.
>>> the same thing
>>> happens, but I can recover as the second file system is still mounted
>>> and an ls(1) to that file
>>> system will cause the disk to spin up and everything is fine.
>>>
>>> This looks like a bug, but I don't see why the unmounting of an
>>> msdosfs system does not
>>> spin up the drive. It's clearly hanging on some operation that is not
>>> spinning up the drive,
>>> but does block.
>>>
>>> Any ideas what is going on? Possible fix?
>>
>> Not a solution to your problem, but a data point:
>>
>> I have a WD Passport 750GB (2.5") drive with an UFS filesystem on it.  I
>> don't think I've tried shutdown with the drive mounted, but I've
>> experienced no problems after the drive has spun down, including umount.
>> There is just a delay while it spins up.  This is on 8.2-REL/i386, that
>> is, with the new USB stack.
>
> In my experience, the issues don't show up at lower capacities.  I've seen
> problems with 2TB drives, but 1TB and 1.5TB drives seem to work fine.
>
> Kevin - how big is the disk in question?

"Only" 750G. It's just a little portable drive and not even a new one.
It was big back
when I bought it, but not any more. I think it might be more of an
issue with the
particular firmware on the drive. Some CAM operation seems to never complete
when the drive is spun down. Either:
1. The command cannot be completed with until the drive is spun up,
but a firmware
    bug is not triggering a spin-up
or:
2. The command does not need the drive spun up, but a bug in the firmware is not
    allowing the completion wen the drive is not spinning.

The more I look at this, the more it seems to me that it is an issue
with the Seagate
drive and not a FreeBSD issue. Probably a bug that is never triggered
on Windows,
so is largely unnoticed. I suspect Widows probably orders the command
is a subtly
different order.

It is probably an issue that FreeBSD fails to ever timeout when this
happens, though.
That makes me suspect that the command in question is one that should
always return
something immediately. I suppose it is also possible that it is some
oddity in the USB
stack, too, but I still suspect that the root issue is a firmware bug
in the drive.
-- 
R. Kevin Oberman, Network Engineer - Retired
E-mail: kob6558 at gmail.com


More information about the freebsd-stable mailing list