Koozali.org: home of the SME Server

IDE Drives with large cache

Dave

IDE Drives with large cache
« on: August 09, 2002, 09:28:28 PM »
All:

I have a number of IDE drives with 2 meg cache.  Here's the problem I've had:

Under Win2K/Win9X - using these drives would cause boot problems.  I found on the MS web site there was a utility I could install on the 9X boxes that added a 2 second delay to allow the drive to flush the cache before a shut down.  Win2K didn't have (at least I couldn't find it) the same utility.  The problem was described as when using drives with large caches on systems with slower speed processors, during a shut down/reboot, the cache wouldn't have the opportunity to fully flush to disk before the actual power down.  What was still in cache is lost and if the drive was in the middle of writing the final files to disk those files would be corrupt.  I wound up putting the drives in a WinNT server because that OS doesn't power the box down automatically when shut down is initiated, it puts up a screen saying 'it's safe to power down now' and that allows the drives to empty the cache before an actual power down.

Here's the question:
Does anyone have any experience with this kind of issue under SME?  I would think the problem would recur since it's the same processor, same motherboard, same controller and same drives.  I haven't tried it yet but I'd like to move my main domain server to SME but only if I don't have to buy new drives.

The drives are Maxtor, 2 20's and a 30.  This problem occurred under Win2K Pro (workstation), Win2K Server and Advanced Server.  Under these OS's the startup files would be corrupt and would render the system unbootable (I tried all the possible options to recover but nothing worked, the OS was useless with these drives)  Also the problem existed under Win98 but with Win98 it would automatically go into the scan disk and would usually be able to repair itself, sometimes it wouldnt be able to and again became unreliable - after installing the utility that added a 2 second pause during shutdown, this problem went away but I needed a PDC.  I've tried it on various motherboards and processors, gigabyte, asus, dell with various processor speeds PII 233 and 333, PIII 550 and 600, Celeron 533.  Currently they're in a gigabyte BX2000, 512meg RAM, PIII 550 processor running WinNT 4.0 SP6a - it works here only because a shut down doesn't actually power the box down under NT.

I didn't mean to write a book here but this appears to be an obscure problem that doesn't happen often.  I want to move away from MS on my servers at least (I already have on my gateway, working like a champ) but I don't want to spend an entire weekend loading and reloading SME only to ultimately find it wont work with these drives.

Any thoughts or input would be appreciated.

Dave

Nathan Fowler

Re: IDE Drives with large cache
« Reply #1 on: August 09, 2002, 10:08:38 PM »
Dave, I got to Chapter 2 *laugh* and noticed that you could simply disable the linux apmd (Advanced Power Management Daemon) to achive the same effect you saw in NT 4.0 (During a shutdown the machine did not actually power down.).  Also, you could just leave APMD alone and see if you get data corruption since the way Linux shuts down is much different than it's Microsoft counterpart.

Hope this helped,
Nathan

Dave

Re: IDE Drives with large cache
« Reply #2 on: August 09, 2002, 11:06:29 PM »
<... I got to Chapter 2 ...>

I do tend to get 'wordy' with my messages :) .. sorry about that.  

This has been a difficult issue to explain.  I even tried using Maxtor's support group, they were worthless, told me I should reboot the PC (!!?!?? - this is what causes the problem!).  I went to the MS news groups too.  Messages there said the drives were bad, bad motherboard, bad RAM, bad powersupply, etc.  No one considered there may have been an issue with software somewhere (that's MS for ya).

Thanks Nathan, I'll give it a try.

chris meredith

Re: IDE Drives with large cache
« Reply #3 on: August 10, 2002, 02:33:06 AM »
I believe if you disable ACPI in the Win2k install you can do the same thing.  It behaves like NT and doesn't power down.  You will need to hit F8 (I believe) at the begining of the install and choose special options, disable ACPI, or just disable it in your bios/on your motherboard.

Randall

Re: IDE Drives with large cache
« Reply #4 on: August 10, 2002, 07:13:32 AM »
Dude !

It's NOT the cache and it's NOT the drives.  It's Windoze.  When windows shuts down on a warm boot it doesn't clear the memory. Period!  

You have to shut the computer "OFF" for 15 second then back on to clear the memory (drive cache in your case).  This is an inhereint problem with Microsoft O/S's which includes NT4, 2000 workstation and Server.  
Unix / Linux (as stated in a previous message),  shutdown diffrently,  which is why a warm boot works.  Keeps from dimmin' the lights each time too !

I'm sorry no one in those other forums etc. told you this.

-Randall

Dave wrote:
>
> All:
>
> I have a number of IDE drives with 2 meg cache.  Here's the
> problem I've had:
>
> Under Win2K/Win9X - using these drives would cause boot
> problems.  I found on the MS web site there was a utility I
> could install on the 9X boxes that added a 2 second delay to
> allow the drive to flush the cache before a shut down.  Win2K
> didn't have (at least I couldn't find it) the same utility.
> The problem was described as when using drives with large
> caches on systems with slower speed processors, during a shut
> down/reboot, the cache wouldn't have the opportunity to fully
> flush to disk before the actual power down.  What was still
> in cache is lost and if the drive was in the middle of
> writing the final files to disk those files would be
> corrupt.  I wound up putting the drives in a WinNT server
> because that OS doesn't power the box down automatically when
> shut down is initiated, it puts up a screen saying 'it's safe
> to power down now' and that allows the drives to empty the
> cache before an actual power down.
>
> Here's the question:
> Does anyone have any experience with this kind of issue under
> SME?  I would think the problem would recur since it's the
> same processor, same motherboard, same controller and same
> drives.  I haven't tried it yet but I'd like to move my main
> domain server to SME but only if I don't have to buy new
> drives.
>
> The drives are Maxtor, 2 20's and a 30.  This problem
> occurred under Win2K Pro (workstation), Win2K Server and
> Advanced Server.  Under these OS's the startup files would be
> corrupt and would render the system unbootable (I tried all
> the possible options to recover but nothing worked, the OS
> was useless with these drives)  Also the problem existed
> under Win98 but with Win98 it would automatically go into the
> scan disk and would usually be able to repair itself,
> sometimes it wouldnt be able to and again became unreliable -
> after installing the utility that added a 2 second pause
> during shutdown, this problem went away but I needed a PDC.
> I've tried it on various motherboards and processors,
> gigabyte, asus, dell with various processor speeds PII 233
> and 333, PIII 550 and 600, Celeron 533.  Currently they're in
> a gigabyte BX2000, 512meg RAM, PIII 550 processor running
> WinNT 4.0 SP6a - it works here only because a shut down
> doesn't actually power the box down under NT.
>
> I didn't mean to write a book here but this appears to be an
> obscure problem that doesn't happen often.  I want to move
> away from MS on my servers at least (I already have on my
> gateway, working like a champ) but I don't want to spend an
> entire weekend loading and reloading SME only to ultimately
> find it wont work with these drives.
>
> Any thoughts or input would be appreciated.
>
> Dave

Charlie Brady

Re: IDE Drives with large cache
« Reply #5 on: August 10, 2002, 09:37:05 PM »
Randall wrote:

> It's NOT the cache and it's NOT the drives.  It's Windoze.
> When windows shuts down on a warm boot it doesn't clear the
> memory. Period!
>
> You have to shut the computer "OFF" for 15 second then back
> on to clear the memory (drive cache in your case).

I don't see how shutting the computer OFF can help to flush data from the disk's cache onto the disk proper. You are right though that the problem is a Windows OS problem - before powering down the drive it should tell the drive to flush its cache - then wait for it to complete doing so.

At least as of April 2001 linux, according to:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0110.0/0925.html

did not flush disk drive caches either.

You haven't seen a problem, which could be due to a variety of reasons:

- linux is in fact flushing the drive's cache
- the file system hasn't done any recent writes
- the file system is robust enough for you not to notice any occasional problems
- the write cache isn't enabled by linux (there is no standard default value ).

You can enable or disable the write cache on the drives using hdparm's -W flag and/or by changing a jumper on the drive.

Regards

Charlie

Charlie Brady

Re: IDE Drives with large cache
« Reply #6 on: August 10, 2002, 09:38:54 PM »
Charlie Brady wrote:

> At least as of April 2001 linux, according to:
>
> http://www.uwsg.iu.edu/hypermail/linux/kernel/0110.0/0925.html
>
> did not flush disk drive caches either.

Hmm, it seems that there are some drives which ignore flush commands in any case (mostly laptop drives). Read more about write cache problems with IDE drives here:

http://www-106.ibm.com/developerworks/linux/library/l-fs8.html?dwzone=linux

Charlie