WD30EZRX formatting under linux

Dear All,

I got an WD30EZRX and want to format it under linux.

Even when I use a recent version of parted (>2.2) I can not

get the drive to be formatted to the full capacity and only 800GB become available.

Could someone help to list the commands required?

I tried it under SUSE 11.4 under linux 2.6.37 as well as 11.2, where

the kernel version is 2.6.31.

Help would be really appreciated.

b

I don’t believe WD claims the drives are supported under any flavour of 'nix – just Win and Mac OS.

@RoofingGuy

I don’t believe WD claims the drives are supported under any flavour of 'nix – just Win and Mac OS.

If that were the case, i would stop buying wd products right now. For WD “supported” means that they will
not give you instructions or know-how (well, maybe they will give you some advice). But the drives itself
should work with any sata controller as long as linux has drivers for that controller and the controller

supports that type of disk. (otherwise, they should be advertised as “win-disks” “winata” and the

green and black editions should turn blue when windows crashes :-)  )

@bbbbb

Interesting, i do use linux and at some point in the future i may buy one of those…

which controller are you using? (the wd provided or the motherboard’s one?)

lspci -nn | grep SATA

check which drivers (kernel modules) are used for each card:

lspci -k | grep -vi subsys

Check /var/log/messages or dmesg for something like that:

scsi0 : ahci

ata1: SATA max UDMA/133 abar m8192@0xfbd7a000 port 0xfbd7a100 irq 40

ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

ata1.00: ATA-8: WDC WD1001FALS-00J7B1, 05.00K05, max UDMA/133
ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133

sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA

That is how linux sees my disk, compare (or post yours), look for how is it detected.

The messages may be out of order (they are not serialized)

If you are unsure post your dmesg rigth after booting.

Aternativelly, this is for my nvidia controller:

ahci 0000:00:09.0: version 3.0
ACPI: PCI Interrupt Link [LSA0] enabled at IRQ 23
ahci 0000:00:09.0: PCI INT A → Link[LSA0] → GSI 23 (level, low) → IRQ 23
ahci 0000:00:09.0: irq 40 for MSI/MSI-X
ahci 0000:00:09.0: controller can’t do PMP, turning off CAP_PMP
ahci 0000:00:09.0: AHCI 0001.0200 32 slots 6 ports 3 Gbps 0x3f impl SATA mode
ahci 0000:00:09.0: flags: 64bit ncq sntf led clo pio boh
ahci 0000:00:09.0: setting latency timer to 64

Is is connected to a sata controller or to an usb enclosure?

Also post your kernel version:

uname -r

rtguille wrote:

@RoofingGuy

I don’t believe WD claims the drives are supported under any flavour of 'nix – just Win and Mac OS.

If that were the case, i would stop buying wd products right now. For WD “supported” means that they will
not give you instructions or know-how (well, maybe they will give you some advice). But the drives itself
should work with any sata controller as long as linux has drivers for that controller and the controller

supports that type of disk. (otherwise, they should be advertised as “win-disks” “winata” and the

green and black editions should turn blue when windows crashes :-)  )

Well, I mostly meant that WD isn’t going to offer any help… the answer will be to check with the 'nix people – obviously smaller drives will work. :wink:

As far as I know, many 'nix versions will NOT work above 2.19TB.  There’s not much WD can do about that.

All that can really be done is to find a version that supports 3TB drives if you wanna buy 3TB drives.

WD would give the same “unsupported” answer if I was having trouble with a 3TB drive under Win2K.

Dear rtguille,

thanks for getting into this.

I followed your recommendations of narrowing the problem down.
First I checked if it was the USB enclosure that I used to
attach the HDD. I get the same problem when I use the
drive internally.

I had to use another computer than the one I’m usually working on,
but that one uses SUSE 11.4 and a recent kernel.

Here is the output of what I get:

lspci -nn | grep SATA
gives
00:1f.2 IDE interface [0101]: Intel Corporation N10/ICH7 Family SATA IDE Controller [8086:27c0] (rev 01)

lspci -k | grep -vi subsys
gives
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 4 Series Chipset PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
        Kernel driver in use: HDA Intel
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01)
00:1c.2 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 3 (rev 01)

00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01)
        Kernel driver in use: uhci_hcd
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)
        Kernel driver in use: uhci_hcd
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)
        Kernel driver in use: uhci_hcd
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)
        Kernel driver in use: uhci_hcd
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)
        Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
        Kernel driver in use: ata_piix
00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01)
        Kernel driver in use: ata_piix
01:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9500 GT] (rev a1)
        Kernel driver in use: nvidia
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
        Kernel driver in use: r8169

scsi0 and scsi1-4 are all: ata_piix

This is what dmesg lists for the new 3TB drive:
ata4.00: ATA-8: WDC WD30EZRX-00MMMB0, 80.00A80, max UDMA/133
[    1.212618] ata4.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 0/32)

scsi 3:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00M 80.0 PQ: 0 ANSI: 5
[    1.230043] sd 3:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    1.230120] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[    1.230223] sd 3:0:0:0: [sdc] Write Protect is off
[    1.230286] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[    1.230304] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
[    1.242532]  sdc: sdc1
[    1.242787] sd 3:0:0:0: [sdc] Attached SCSI disk

That looks fine to me…

uname -r
gives
2.6.37.6-0.5-default

Still parted only lets me format it as 800 GB…

Any suggestions?

b

sd 3:0:0:0: [sdc] 4096-byte physical blocks

humm… this line is new, i am on 2.6.38.7-30.fc15.x86_64 (Fedora 15)

It may not be an error, but i have never seen it.

As an example, my  WD20EARS (adv. format 4k hw sectors, 512b logical secors):

ata6.00: ATA-8: WDC WD20EARS-00MVWB0, 50.0AB50, max UDMA/133
ata6.00: 3907029168 sectors, multi 0: LBA48
ata6.00: configured for UDMA/133
ata6: EH complete
scsi 5:0:0:0: Direct-Access     ATA      WDC WD20EARS-00M 50.0 PQ: 0 ANSI: 5
sd 5:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 5:0:0:0: [sdc] Write Protect is off
sd 5:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
sd 5:0:0:0: Attached scsi generic sg3 type 0
sdc: sdc1
sd 5:0:0:0: [sdc] Attached SCSI disk


When you used parted, did you tried to create a MBR partition scheme or a GPT one?

keep in mind that for such big disk, a GPT partition scheme is requiered for full usage.

MBR > linux command “fdisk” or “cfdisk” and also “parted”

GPT > linux command “gdisk” and also “parted”

I don’u use parted, but my second WD20EARS is GPT partitioned with gdisk.

just in case, parted intructions for GPT partitions:

http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html


Also, are you using the SATA controller in IDE mode? Normally it is recommened to

set it to AHCI for either better performance and hot-swap. (not directly related to the issue)

regarding that:

sd 3:0:0:0: [sdc] 4096-byte physical blocks

In my case:

cat /sys/block/sdc/queue/physical_block_size

512

cat /sys/block/sdc/queue/logical_block_size

512

Maybe your kernel has some patch that exposes/detects the physical sector size, check what these commands print in your case. Since i do not have a WD30EZRX, i do not know if it is not normal. 

Update

I had another look at the earlier post Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

I followed the steps given and now manage to format the drive with the correct size.

In case others are interested, here are the required steps again:

parted /dev/sdc

GNU Parted 2.3                                                                                
Using /dev/sdc                                                                                
Welcome to GNU Parted! Type ‘help’ to view a list of commands.                                
(parted) rm 1                                                                                 
(parted) unit s                                                                               
(parted) print                                                                                
Model: ATA WDC WD30EZRX-00M (scsi)                                                            
Disk /dev/sdc: 5860533168s                                                                    
Sector size (logical/physical): 512B/4096B                                                    
Partition Table: msdos                                                                        

Number  Start  End  Size  Type  File system  Flags

(parted) mklabel gpt              

Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes 

 (parted) mkpart primary ext2 40 -1
Warning: You requested a partition from 40s to 5860533167s.              
The closest location we can manage is 40s to 5860533134s.                
Is this still acceptable to you?                                         
Yes/No? Yes                                                              
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore                                                        
(parted) quit           

After leaving parted I evoked

 mkfs.ext4 -T largefile4 /dev/sdc1

Cheers,

b

Remember, on the link i pasted, there was this comment:

Jeff May 26, 2011

If you get this…
 Warning: The resulting partition is not properly aligned for best performance.

You really should run parted like so…

parted -a optimal /dev/sdc


The partition you created may work, but it is not aligned. check that, before filling it with 3tb of data. :wink:

These advanced format drives need to be aligned for performance reasons (to avoid RMV cycles).

Problem not solved yet!

I was now able to write files to the newly formatted partition

when it was on the controller on the SUSE 11.4 machine.

Now I took the hdd out and put it into an external USB case.

I got the hdd for doing backups originally.

Now I get the following messages with dmesg:

[  127.876012] usb 1-3: new high speed USB device using ehci_hcd and address 4
[  128.009748] usb 1-3: New USB device found, idVendor=152d, idProduct=2336
[  128.009751] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[  128.009753] usb 1-3: Product: JM20336 SATA, USB Combo
[  128.009755] usb 1-3: Manufacturer: JMicron
[  128.009757] usb 1-3: SerialNumber: DCA047915588
[  128.175904] usb 1-3: selecting invalid altsetting 1
[  128.175921] usbcore: registered new interface driver uas
[  128.182317] Initializing USB Mass Storage driver…
[  128.182410] scsi4 : usb-storage 1-3:1.0
[  128.182525] usbcore: registered new interface driver usb-storage
[  128.182527] USB Mass Storage support registered.
[  129.180819] scsi 4:0:0:0: Direct-Access     WDC WD30 EZRX-00MMMB0          PQ: 0 ANSI: 2 CCS
[  129.181022] sd 4:0:0:0: Attached scsi generic sg3 type 0
[  129.181939] sd 4:0:0:0: [sdc] 1565565872 512-byte logical blocks: (801 GB/746 GiB)
[  129.183189] sd 4:0:0:0: [sdc] Write Protect is off
[  129.183193] sd 4:0:0:0: [sdc] Mode Sense: 00 38 00 00
[  129.183195] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[  129.185059] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[  129.206184]  sdc: unknown partition table
[  129.207804] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[  129.207808] sd 4:0:0:0: [sdc] Attached SCSI disk

It just divides the space by 4 since it thinks the blocksize is 512 kb…

Aaargh

b

CAREFULL!

sd 4:0:0:0: [sdc] 1565565872 512-byte logical blocks: (801 GB/746 GiB)
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 00 38 00 00
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sdc: unknown partition table
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Attached SCSI disk

Check if the enclosure does support such disk, unless the previous example, this time the disk itself is not being configured correctly, maybe the enclosure does not support it correclty. do not write anything, since it can corrupt data.

which enclosure are you using?