Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Questions about ext USB drive: Write Protect & Speed (SOLVED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
windz
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2006
Posts: 89

PostPosted: Fri Jun 01, 2007 6:16 pm    Post subject: Questions about ext USB drive: Write Protect & Speed (SO Reply with quote

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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Fri Jun 01, 2007 6:45 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
windz
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2006
Posts: 89

PostPosted: Fri Jun 01, 2007 7:10 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9893
Location: almost Mile High in the USA

PostPosted: Fri Jun 01, 2007 8:01 pm    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Fri Jun 01, 2007 8:32 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
warrawarra
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2007
Posts: 84

PostPosted: Fri Jun 01, 2007 11:29 pm    Post subject: Reply with quote

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 .
Back to top
View user's profile Send private message
windz
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2006
Posts: 89

PostPosted: Sat Jun 02, 2007 1:46 am    Post subject: Reply with quote

Thank you to everyone who has replied! You have been most helpful. :) 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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Sat Jun 02, 2007 10:43 am    Post subject: Reply with quote

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
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
irgu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2003
Posts: 131

PostPosted: Sat Jun 02, 2007 12:56 pm    Post subject: Reply with quote

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 ...)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum