|
12 years ago 6 |
The Western Digital 1.5 TB Drives are known to report the wrong size and many programs like fdisk create partitions on the wrong boundary, or without physical sector alignment.
I realized this after horrible performance during a mkfs.ext4 -cc, a read write bad blocks test which took over 24 hours.
When you type
sudo fdisk -l
Do any of your partitions have a START value of 63 or some odd number?
IMPORTANT! It is important to understand which drive you want to work with. "sudo fdisk -l" lists all drives and partitions. Be very careful to choose the correct one. Delete all data from the drive. And Verify with "df" that your correct drive is actually 0% full.This tutorial uses /dev/sdd. This values is chosen as most computers don't have 4 physical hard drives and will most likely error out. You will need to adjust /dev/sdd to represent your actual value.
List the partitions
sudo fdisk -l
Execute Fdisk with compatibility and units parameters, turning it into old mode to compensate for WD lying drives.
sudo fdisk -c -u /dev/sdd
Execute Fdisk with compatibility and units parameters.
sudo fdisk -c -u /dev/sdd
Run dd with a byte size of 1MB, for a total of 128MB of data coming from the /dev/zero zero generator to the hard drive /dev/sdd1 using file synchronization before termination (commits writes). Write speeds in my test case indicate 59.8 MB/s
sudo dd bs=1M count=128 if=/dev/zero of=/dev/sdd1 oflag=dsync
Format the ext4 filesystem with read write bad blocks test. At the time of this writing.n The following command...
sudo mkfs.ext4 -L WDEARS -cc /dev/sdd1
... uses block sizes of 4096 by default. But in the case that it does not. You should format using
sudo mkfs.ext4 -b 4096 -L WDEARS -cc /dev/sdd1
or perhaps a windows compatible format.
sudo mkfs.ntfs -b 4096
Initially a read write bad blocks test indicated that my hard drive was performing horrible. Although it made it though the read write bad block test with zero errors, it had consumed too much time to be reasonable.
After this procedure the hard drive performs an order of magnitude better. Compatibility and Unit Parameters were given to fdisk to override the kernel values. Manually Alignment along 2048 boundaries allow for faster writes and verifies.
The Following link provided reference material, and useful editorial comments. It summarizes a days worth of research on online forums. EARS Information
This drive, like most of WD Caviar ones with equal or more than 1 TB, is known for having serious problem with EXT4 - intensive use, specially with more than one partition leaves then to generate false badblocks in a matter of minutes. EXT4 is not recommended, prefer to use a more robust filesystem, like XFS. EXT3 is known to have worse performance than XFS; and EXT2 have the problem to need to fsck after every reboot. BTRS is slow, and ReiserFS will be probably dead in near future.