Reply
cougar694u
Posts: 29
Registered: ‎08-01-2010
Accepted Solution

Sector alignment question on 4k disks, WD30EZRS works, but only 2TB usable

I have the WD30EZRS disk and had a question about alignment.  I formatted it using ubuntu with the following fdisk commands:

 

partition 1 = starting at sector 2048, +259M, type = 82

partition 2 = starting at default (forget, but can look it up), +134M, type = 83

partition 3 = starting at default, +1843, type = fd

 

I then formatted each like this:

 

mkswap -c /dev/sdb1

mkfs.ext3 -c /dev/sdb2

mkfs.reiserfs /dev/sdb3

 

When I did an fdisk -lu, partition 1 starts at 2048, but each partition states it doesn't end in a cylinder boundary.  For instance, partition 1 ends at say 54, and partition 2 starts at 54 also (not exact, just using as example).

 

When you first boot up the NAS, it says the RAID failed, so you revert to single disk mode and everything works fine.  I assumed that since the first partition was aligned at 2048, and adding each subsequent partition by size, they would be aligned properly.  fdisk does pick it up as "Sector size (logical/physical): 4096 bytes / 4096 bytes", so I assumed it was correct.  Would I be better off reformatting, starting partition 1 at 2048, having it end at a cylinder making it near 271MB, and partition 2 start at the next cylinder?  The starting point of each partition (in sectors) is divisible by 2048 (and obviously 8), so I figured it is aligned properly.  I was going to try to start partition 1 at 64, but it wouldn't let me.  The lowest it would do was 2048.



It has to be MBR because the NAS doesn't support GPT, thus only 2TB, so essentially wasting 1TB.  Sucks, I know, but it was an RMA WD sent back to me for my WD20EARS.

michiko_airashii
Posts: 64
Registered: ‎04-20-2010

Re: Sector alignment question on 4k disks, WD30EZRS works, but only 2TB usable

[ Edited ]

Sorry to burst your bubble but i think that device is not a Linksys product. Or do you have a Linksys product along with this?

cougar694u
Posts: 29
Registered: ‎08-01-2010

Re: Sector alignment question on 4k disks, WD30EZRS works **for NMH-300 possibly NMH-400**

[ Edited ]

You guys are funny on here, always so quick to say stuff doesn't work, or not supported, or whatever.

 

Yes, I have a Linksys product, NMH-300-series.  I say series because it was a 305, but I have since replaced the disks with WD20EARS, and more recently at WD30EZRS (3TB disk).

 

I did get the WD30EZRS to work, but again, only 2TB will be usable.  I currently have a WD30EZRS in slot 1 and a WD20EARS in slot 2.  I formatted both of them identically, here's how I did it (updated from above):

 

I put both hard drives in my system (no USB dock/cradle, as some won't work with the 4k blocks, will show 512/512) and booted into ubuntu.  You can use a Live CD if you don't have it installed somewhere.

 

THIS WILL WORK FOR ALL 4k SECTOR SIZE DISKS - ENSURES PROPER ALIGNMENT AND PERFORMANCE

 

ran fdksik -l to see what disks I had.  Mine were /dev/sdc and /dev/sdd, so I ran the following commands:

 

fdisk /dev/sdc <-- this was on the 3TB disk, but commands are exactly the same for the 2TB (ensures it'll work with RAID 1).

u (change units to sectors)

c (turn off dos flag)

 

n (for new partition)

p (for primary)

1 (for first partition)

2048 (starting sector)

+259M (setting size to 259MB)

t (to set partition type)

82 (for swap partition)

 

n (for new partition)

p (for primary)

2 (for second partition)

Enter (accept default starting sector)

+134M (setting size to 134MB)

 

n (for new partition)

p (for primary)

3 (for third partition)

Enter (accept default starting sector)

+1860G (setting size to 1860GB) <- I tried 1863G but it was 'out of range' on my 2TB disks, 1860 was the most I could do, so ran same on 3TB disk to ensure compatibility

t (for type)

fd (for linux raid)

 

w (write partition table)

 

Back at prompt, run the following:

 

mkswap -c /dev/sdc1

mkfs.ext3 -c /dev/sdc2

mkfs.reiserfs /dev/sdc3

 

This formats the partitions as they should be for the NMH-300 NAS.  Do this for BOTH disks.  Now, shutdown your system and put only ONE (1) disk into the NAS.  Power it on and wait for it to boot.  All settings will be defaulted, it should pull DHCP, and when you log in, it will say the RAID is degraded and probably show an error for the disk.  Go to the disk screen and click revert to single disk mode, it will reboot again.  When it does, it will show 1859.9GB free.  Now you can shut it down, add the second disk, power it back on, go to the disk section and select to increase protection (or whatever your plans are).  For single disk mode, it might have worked leaving the 2TB as type 83 and formatting to ext3, but I didn't test this.

 

I have tested this, it works with both WD20EARS and WD30EZRS, as well as mixing the two (I currently have WD30 in slot 1 and WD20 in slot 2).

cougar694u
Posts: 29
Registered: ‎08-01-2010

Re: Sector alignment question on 4k disks, WD30EZRS works **for NMH-300 possibly NMH-400**

Just wanted to add that I'm so pleased with the performance of my NAS after doing this.

quiet1
Posts: 258
Registered: ‎12-08-2010

Re: Sector alignment question on 4k disks, WD30EZRS works **for NMH-300 possibly NMH-400**

Hi cougar694u,

 

     Good job on correcting the sector alignment! I'll try this if I decide to upgrade to newer drives.

s.romeo
Posts: 6
Registered: ‎11-10-2011

Re: Sector alignment question on 4k disks, WD30EZRS works **for NMH-300 possibly NMH-400**

[ Edited ]

Hi,

I would like to know if I can change sector size without ubuntu and linux ..... there's some program I can use in Windows (XP SP3 or Seven) ?

 

And to change sector size, had you inserted the HD into the NAS ?

 

Last thing: I haven't known if the best configuration is to put the sector size to 512 or 4096 ......

 

Thanks in advice and excuse for my english.

Best regards, Sergio.

s.romeo
Posts: 6
Registered: ‎11-10-2011

Re: Sector alignment question on 4k disks, WD30EZRS works **for NMH-300 possibly NMH-400**


s.romeo wrote:

Hi,

I would like to know if I can change sector size without ubuntu and linux ..... there's some program I can use in Windows (XP SP3 or Seven) ?

 

And to change sector size, had you inserted the HD into the NAS ?

 

Last thing: I haven't known if the best configuration is to put the sector size to 512 or 4096 ......

 

Thanks in advice and excuse for my english.

Best regards, Sergio.


UP :smileywink:

 

I would like to install my NHM300 in this weekend. and I would like to know how configure my 2 HD 2Tb drives (see my questions in the previous post).

 

Thanks in advice.

Best regards, Sergio.