Re: Problems spinning down drives in RAID5 array



Anton Ertl wrote:

Tim S <ts@xxxxxxxxxx> writes:
Burzum wrote:

On Sat, 14 Apr 2007 10:30:24 -0700, Dmitry wrote:

So the question is:
1. Why is it touching it if there's nothing being read or written from
the array?
2. Is there a way to prevent it from disturbing the peace?

You're using a journalled fs, so it flushes the buffer every few seconds
(defaults 5 for ext3, 30 for reiserfs etc.)

Would that apply to a quiescent filesystem though - ie no writes mean no
journal events to flush?
Any processes reading from the file system (e.g., cron scripts) can
change the atime of a file, which results in a write.

That I was aware of.

However, the OP has the problem even if he does not mount any file
system on the device, so I guess this is a problem with the array
driver (what array driver is he using? md?). My second disk
definitely spins down if I don't have any file systems mounted there
(and usually also if I have), but it does not use RAID.

*Assuming that the RAID is handled in software by the kernel's Device
Mapper:*

Here's a test that might ascertain if it's the dm subsystem doing something:
for the OP, perhaps you could try:

dmsetup suspend /dev/whatever-is-your-aggregate-device-that-you-mount

Wait - and see if the disks *do* spin down.

When bored, re-activate with

dmsetup resume /dev/same-dev-as-before

Don't do this is your RAID is being handled in hardware or by a special
driver.

I am fairly comfortable with the DM subsystem at the logical level, but
again, I must confess I don't know the ins and outs of when/if it may
decide to fiddle with the disks. On thing I do know is that it will attempt
to flush any pending writes from time to time and perform additional writes
to update the RAID superblock dirty-bitfields. I wouldn't *expect* any
activity after a while once the filesystem had gone quiet, but I can't be
certain.

The only circumstances that I know for certain that the DM system will
access it's devices, even if the filesystem is quiet, is if the RAID system
is both a redundant type (ie not RAID 0) and it has been asked to verify
it's consistency, whence it will read all of the data and verify it (ie
check mirror sets or re-calculate RAID 5/6 parity blocks). This operation
must be *explicitly* started from userspace, but that doesn't mean that a
random distro didn't run a cron job to do it automatically. Unlikely
though, but not impossible.

That is very brain-damaged. I'd have suggested smartd and hddtemp if I'd
have realised that.

I cannot follow you here, but smartd is one reason why hard disks spin
up regularly. So if the OP is running smartd, he should either
disable it or take these disks out of the smartd configuration.

I don't disagree - I was just expressing dismay, that the disk's firmware
would be so stupid, to spin the disk up if merely asked for some SMART
attributes. But I am not particularly surprised...

Cheers,

Tim
.



Relevant Pages

  • Re: Making a RAID array
    ... hard it might be to set up my own RAID array. ... and then set it up to do RAID. ... disks to that, but I'd like to see how easy it is to do it in the Mac ... If I add disks to the mirror set, ...
    (uk.comp.sys.mac)
  • Re: insufficient space in super block for rotational layout
    ... Occurs typically on very high density disks. ... the file system structure cannot ... Is this really an issue with a RAID 5 storage ... It doesn't sound like a problem with the array, but the size of the array. ...
    (comp.unix.solaris)
  • Re: VLDB, RAID, and clustering
    ... And clustering for windows and SQL Server is a hardware failover technology only, ... You can not have data or log files on disks outside the cluster resource groups. ... You absolutely need to ensure the transaction logs for all user and tempdb databases are separate from the data files and on a raid 1 or 10. ... You may need to segregate the tempdb data files onto their own array as well depending on usage. ...
    (microsoft.public.sqlserver.security)
  • Re: VLDB, RAID, and clustering
    ... clustering for windows and SQL Server is a hardware failover technology ... A raid 10 is recommended for the data files. ... disks in the array the better if there is high usage. ...
    (microsoft.public.sqlserver.security)
  • Re: A8N SLI Deluxe Question
    ... > Currently the drives are partitioned and my apps are on one partition. ... Someone suggested using RAID 0. ... The media rates for disks are still in the ~70MB/sec range ... the array reports certain errors. ...
    (alt.comp.periphs.mainboard.asus)