# Why ZFS disk access every 5 min at idle?



## jimsve (Apr 12, 2010)

Hi,

I have a computer with the specs below which I want to use as a file server. FreeBSD is installed on the flash card and the 4 HDDs is in a ZFS raidz2 pool. The OS is a fresh minimal install and I only enabled sshd. Have have noticed that every 5 min (quite exactly) there is some HDD access even when the computer is idle. It is not cron because I have stopped that. Mostly I am just curious why, and if there is a way to avoid it. It does not matter much, but since I have those WD green drives with 8 second head parking it could increase the lifespan of the disk. I know there are other ways around the issue with the drives, I just think it would make sense for FreeBSD to not unnecessarily poke on my drives.

Thanks for reading and any feedback.


--------------

```
uname -a
FreeBSD luggage 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009     [email]root@mason.cse.buffalo.edu[/email]:/usr/obj/usr/src
/sys/GENERIC  amd64
```

Mobo: Asus m3a78-cm
CPU: Athlon II 240e 2.86 GHz
HDD: 4 x WD500AAC8 Caviar GP 500 Gbyte
NIC: Intel Gigabit CT Desktop Adapter PCIe x1, 1 Gbit/s
Flash Adapter: Lycom IDE to CF Bridge Board, Bracket Mode, A308-V4
Flash Card: Transcend 4 Gbyte Extreme Speed 300x


----------



## DutchDaemon (Apr 12, 2010)

http://forums.freebsd.org/showthread.php?t=13180
http://forums.freebsd.org/showthread.php?t=12091

Sounds similar.


----------



## phoenix (Apr 13, 2010)

The best thing you can do with those WD Green drives is to boot to DOS, and run wdidle3 to disable the head parking feature.  You'll extend the live of the drive by years.  

Actually, no, the best thing to do with those drives is to return them, and get anything else, by anyone else.  These drives are pure, unadulterated, crap.  They're not even 7200 RPM drives.


----------



## Jago (Apr 13, 2010)

phoenix said:
			
		

> These drives are pure, unadulterated, crap.  They're not even 7200 RPM drives.


Of course they aren't, it even says so right in the product description. What the OP wants is to run wdidle3 on the drives to disable the 8 second timer for automatic head parking. Once this is done, the GP drives become a good, cheap and quiet option for someone who needs lots of space. Not everyone has the option to spend 250-300 euro on a single 2TB disk (WD Black, WD RE4, Seagate XT) when a WD Green can be had for 150.


----------



## phoenix (Apr 13, 2010)

Yeah, but you can get non-WD green drives for the same price, that are just as quiet and power-efficient, while still being full-fledged 7200 RPM drives, without all the annoyances of the WD Green drives.  For example, Seagate and Hitachi.

The WD Green drives are crap.  Pure and simple.  WD is going to lose a lot of customers over this, and their botched 4KB-sectors drives.


----------



## Jago (Apr 14, 2010)

phoenix said:
			
		

> WD is going to lose a lot of customers over this, and their botched 4KB-sectors drives.


No they aren't.

Stock WD Green drives, without any modifications, work just fine in any OS as long you aren't using them in a RAID. I would argue that when it comes to consumer drives, let alone "green" consumer drives, RAID use is a very small niche. Additionally, 4KB-sectors pose no issues whatsoever to users of Windows 7, Windows 2008 and Windows Vista, which hold the lion part of the OS marketshare. The other OSes will have to play catchup to make transition to 4KB-sector drives easier for the user, because there will only be more and more models like this in the future.

Will they lose SOME customers who want to use green drives in a RAID? Most likely. Will they lose SOME customers who are using OSes other than Windows? You bet. Will the number of both combined be in any way meaningful? Nope, not even a blink on the radar,


----------



## phoenix (Apr 14, 2010)

The 4KB sector drives are broken by design.  They deliberately lie about the size of the physical disk sector size and the logical disk sector size.  There is no way to properly align a filesystem on these disks unless you force the filesystem to use 512B sectors.  The firmware doesn't support any of the ATA commands that tell you the physical disk sector size.  They are broken.  Simple as that.


----------



## Jago (Apr 14, 2010)

phoenix said:
			
		

> The 4KB sector drives are broken by design.  They deliberately lie about the size of the physical disk sector size and the logical disk sector size.  There is no way to properly align a filesystem on these disks unless you force the filesystem to use 512B sectors.  The firmware doesn't support any of the ATA commands that tell you the physical disk sector size.  They are broken.  Simple as that.


ATA is not a standard set in stone, it evolves over time. Not too long ago ATA didn't know anything about TRIM. Now it does.


----------



## sub_mesa (Apr 18, 2010)

May i add that the default partition offset is still 63 sectors of 512-bytes; thus 31.5KiB. That is unaligned with the new WD EARS 4K sector "Advanced Format" drives, and with any striping RAID array. Also SSDs are affected.

Also, using 4K sectors would solve the problem instantly, as any offset (in sectors) would be aligned. As i understand, the problem is that WD 4K sector drives still report as having 512-byte sectors. If it would identify as being a 4K sector drive, for example with a jumper, it would allow aligned usage of the drive. I think the reason WD didn't do this is to be compatible with Windows XP, which does not support HDDs with different sector size than 512 bytes.

Generally, when working with 512 byte sectors, the best offset to use for fdisk partitions ("slices" in freebsd) and BSD labels ("partitions" in freebsd) is 2048 sectors; that would align to 1024KiB offset. This would be aligned in most circumstances, though with RAID5 and RAID6 you may want to adjust according to your setup. virtually all SSDs, most RAID0, some RAID5/6 and all 4K sector drives all work right with this offset.


----------

