smellyeagle

Running WD15EARS in Raid 1 on Debian 5.0

Recommended Posts

Hi Everyone-

My plan is to build a home server using Debian 5.0 and a pair of WD15EARS drives in RAID 1 for boot and storage.

1. What is a good file system when reliability > performance?

2. Any special concerns when using WD15EARS drives? Issues with write caching, for example.

3. How to deal with 4kb sectors?

4. Any personal experience using similar hardware?

Thanks

Edited by smellyeagle

Share this post


Link to post
Share on other sites

looks like sector sizes must be set manually in both parted and fdisk. sector must start at 64 (default is 63) and all subsequent partitions must start on sectors divisible by 4k. block size also should be 4096 bytes; thankfully that is default on most configurations.

if this is incorrect, please let me know here

Share this post


Link to post
Share on other sites

While I can't exactly say how things might differ in Debian vs Ubunutu, I had no trouble with Advanced Format drives with the latest builds.

Now I can't say what the best method is for RAID1 for the boot/storage section since I used a notebook drive for boot and larger drive for storage, plain old mdadm worked great.

fdisk was flawless for setting up the partition on the array, aligned things without any sort of user intervention. Just make the volume like you normally would. Linux has no trouble with 4k sectors, where some Windows rigs might be thrown for a loop.

EXT4 is my current file system of choice, no problems to date.

My particular notebook drive had issues with excessive parks, so what I used was good ole "hdparm -B 255 /dev/sda" or "hdparm -B 254 /dev/sda" to stop it. My system stayed on 24/7, so I never had to deal with possible loss of setting when power cycled, so if you boot frequently you might have to re-issue that command.

Share this post


Link to post
Share on other sites

Linux has no trouble with 4k sectors, where some Windows rigs might be thrown for a loop.

Be careful with such assertions:

YES: Linux (both kernel and most known application such as parted & fdisk) is aware of 4ki bytes (4KiB) sectors hard drives

BUT: hard drive like WD15EARS pretend they have 512B sectors (both logicaly & physically) and but this is FALSE:

(parted) p                                                               
Model: ATA WDC WD15EARS-00Z (scsi)
Disk /dev/sda: 1500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      1049kB  1500GB  1500GB  primary  ext4

So you NEED to format partitions aligned on 4kiB and make partitions length as a multiple of 4kiB (or as a multiple of 8 sectors 4kiB=8*512B).

For my WD15EARS I do the following using parted (note that only 'mkpartfs primary ext3 64s 100%' is required to do the job for a full disk partition):

$ parted /dev/sda
(parted) mkpartfs primary ext3 64s 100%
(parted) unit s                                                           
(parted) p
Model: ATA WDC WD15EARS-00Z (scsi)
Disk /dev/sda: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End          Size         Type     File system  Flags
1      2048s  2930276351s  2930274304s  primary  ext4
(parted) q
$ mkfs.ext4 [options] /dev/sda1
$ ...

Note that the partition size is a multiple of 8 (2930274304/8=366284288)

PS: I did a lot of benchmark tests (using ext4, reiserfs, xfs with or without lvm2)... un-aligned partition performances are really horrible (R/W ~6MB/s)

Edited by NicoLarve

Share this post


Link to post
Share on other sites

Hi Everyone-

My plan is to build a home server using Debian 5.0 and a pair of WD15EARS drives in RAID 1 for boot and storage.

1. What is a good file system when reliability > performance?

2. Any special concerns when using WD15EARS drives? Issues with write caching, for example.

3. How to deal with 4kb sectors?

4. Any personal experience using similar hardware?

Thanks

I want to do exactly the same, did you encounter special issues, or have tips?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now