# Questions about ext USB drive: Write Protect & Speed (SOLVED

## windz

Hi,

I just bought a external USB hard drive 80GB 5400 8MB IDE. I partitioned and formated the drive myself into 2 partition using fdisk, mkdosfs and mkfs.ext3. I don't use auto-mount but mount them manually and my /etc/fstab entries are as follows:

/dev/sda1               /mnt/flash      auto            noauto,rw,users,sync,fmask=0133,dmask=0022       0 0

/dev/sda2               /mnt/flash2     auto            noauto,rw,users,sync       0 0

My questions:

1. In dmesg, I get the following messages:

usb 1-5: new high speed USB device using ehci_hcd and address 3

usb 1-5: configuration #1 chosen from 1 choice

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 3

usb-storage: waiting for device to settle before scanning

scsi 0:0:0:0: Direct-Access     WDC WD80 0BEVE-00UYT0     0811 PQ: 0 ANSI: 0

SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)

sda: test WP failed, assume Write Enabled

sda: assuming drive cache: write through

SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)

sda: test WP failed, assume Write Enabled

sda: assuming drive cache: write through

 sda: sda1 sda2

sd 0:0:0:0: Attached scsi disk sda

sd 0:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete

Could anyone tell me if the 'test WP failed' ist significant? Did I do something wrong? I checked with my other USB drives and the message in dmesg is "Write Protect is off".

2. I tried transferring a 170MB file to the FAT32 partition, the ext3 partition and and NTFS partition which is on another external USB hard drive. I find that the transfer rate is very slow for FAT32 and ext3. The time taken to transfer a 170MB file:

NTFS = 9s

ext3 = 1m 26s

FAT32 = 2m 9s

Can anyone please comment? 9 seconds and 2 minutes is such a huge difference!

Thanks.Last edited by windz on Sat Jun 02, 2007 3:43 am; edited 1 time in total

----------

## NeddySeagoon

windz,

9s for a 170Mb is a little faster than is believable but the other times are far too slow.

Remove the sync option in your fstab entries. This turns off caching.

----------

## windz

Hi NeddySeagoon,

thank you for your reply.

 *Quote:*   

> 9s for a 170Mb is a little faster than is believable but the other times are far too slow.

 

But 9s is the time that I got. I measured it by running the command: time cp /the/170MB/file /mnt/flash1

 *Quote:*   

> Remove the sync option in your fstab entries. This turns off caching.

 

I did that and the the transfer time taken was:

FAT32:  0m10.548s

Ext3: 0m2.310s

By the way, I had the sync option enabled for the ntfs partition and that didn't affect the transfer rate at all. Could you please explain why? Would like to ask also if it is advisable to turn off sync. I read somewhere that this might result in corrupted data due to the asynchronous input and output of data. Is that true? 

Regarding my first original question about the "test WP failed" message in dmesg. I suppose I can safely ignore that message?

Thanks!

----------

## eccerr0r

Yes, you can safely ignore "test wp failed" - it was just testing if the disk is write protected.  IIRC there is a flag that could be read to tell if the disk is read-only or not but some disks don't have this feature...  Not sure exactly what Linux is doing to test if the disk is writeprotected or not, but that's what it's checking.

----------

## NeddySeagoon

windz,

How do you do writes the ntfs?

The kernel doesn't support it.

The sync option can result in data loss under power failure conditiios because of data in RAM, not flushed to the drive. Its no worse a risk than with internal drives.

----------

## warrawarra

ntfs read/write workes for 1 year or more.

ntfs-3g is the prog to emerge.

Heck Sabayon linux it worked since 3.1 or at latest 3.2 , current 3.4 beta final.

2.6.21-rc2 was also slow on ext3 writes to ntfs did 760mb in about 1min to usb maxtor but the remaining upto 1gb was slow.

Would like to know how ext4 does have not tested it yet but looks good root partition is ext4 .

----------

## windz

Thank you to everyone who has replied! You have been most helpful.  :Smile:  Thanks!

I did a little read-up on the async and sync options for /etc/fstab. I guess that as long as I remember to umount the drive before unplugging it, it should be all right.

 *Quote:*   

> NeddySeagoon:How do you do writes the ntfs?

 

As warrawarra has already mentioned, it can be done by emerging ntfs sys-fs/fuse and ntfs-3g. Here's the WIKI:http://gentoo-wiki.com/HOWTO_NTFS_write_with_ntfs-3g

 *Quote:*   

> eccerr0r: Yes, you can safely ignore "test wp failed"

 

Thanks. I was a little worried there because I tested another Western Digital 80GB ext HD which was formatted as ntfs and the "WP failed" message was not in dmesg.

----------

## NeddySeagoon

windz,

I'm aware of ntfs-3g, however, I don't have any ntfs partitions to test on, (better still, I don't have Windows at home,) so I don't use it.

Thank you for the link though

----------

## irgu

 *NeddySeagoon wrote:*   

> I'm aware of ntfs-3g, however, I don't have any ntfs partitions to test on, (better still, I don't have Windows at home,)

 

You don't need either, testing is doable without any of them:  http://ntfs-3g.org/quality.html#howtotest

@windz: ntfs-3g ignores sync. If you want to measure the real write time then also measure the umount time because that will sync everything:

mount ; time (cp ... ; umount ...)

----------

