You are not logged in.

#1 2012-05-05 16:29:57

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

USB hdd write speed shenanigans

The USB HDD is connected through USB 2.0, and is formatted as NTFS.
If I copy files to it from my ext4 partition in linux, I get write speed of ~1 - 2MB/s
But If inside this linux I run a vbox machine with windows XP64 and then copy the same files, I get 4-8MB/s

Why is that?

Offline

#2 2012-05-05 17:37:31

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: USB hdd write speed shenanigans

Lockheed wrote:

NTFS

Install ntfs-3g. Mount partition as type "ntfs-3g", with mount option "noatime", and definitely without the mount option "sync" (use "flush" instead, if that works).

Offline

#3 2012-05-05 17:41:42

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: USB hdd write speed shenanigans

How can I automate it? FSTAB is out of the question because it is an external I only occasionally mount with spaceFM, which does all the mounting work automatically.

Last edited by Lockheed (2012-05-05 17:42:14)

Offline

#4 2012-05-05 17:48:35

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: USB hdd write speed shenanigans

This udev rule is an option. You can edit it to change the mountpoint,... obviously.


Burninate!

Offline

#5 2012-05-06 18:47:28

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: USB hdd write speed shenanigans

Fantastic. My transfers went from 1MB/s to 27-30MB/s.

However, when I try to unmount the drive after copying files, I get this:

Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address (polkit-error-quark, 0)
Error unmounting /dev/sdb1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operation

Offline

#6 2012-05-07 13:57:27

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: USB hdd write speed shenanigans

Using the udev rule, you will then need root permissions to unmount. Or maybe you do not have ConsoleKit setup properly?

Offline

#7 2012-05-07 14:21:14

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: USB hdd write speed shenanigans

anonymous_user wrote:

Using the udev rule, you will then need root permissions to unmount. Or maybe you do not have ConsoleKit setup properly?

Hmm, There is not much in Wiki on this. It mostly covers hibernation, which I have working fine already.
Is there a way to allow a user unmonut devices mounted with udev rule?

Offline

#8 2012-05-07 14:45:43

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: USB hdd write speed shenanigans

I do this with my USB-2tb drive:

(/etc/fstab:)

/dev/sdd1 /mnt/wing ntfs-3g defaults,noauto,nofail 0 0

And it would let me mount i manually when i actually need it, and umount it (though with sudo-rights),
you could make your own script doing the mounting/unmounting, or just manually tab-type it as i do.

Though that route might not be for everyone smile

Last edited by PReP (2012-05-07 14:46:23)


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#9 2012-05-07 14:50:39

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: USB hdd write speed shenanigans

Lockheed wrote:

Is there a way to allow a user unmonut devices mounted with udev rule?

The "users" option?

man mount:

If any user should be able to unmount, then use users instead of user in the fstab line.

Offline

#10 2012-05-07 14:52:13

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: USB hdd write speed shenanigans

Lockheed wrote:

Is there a way to allow a user unmonut devices mounted with udev rule?

You could try this rule but it relies on pmount:

https://wiki.archlinux.org/index.php/Ud … n-mounting

Also you didn't specify how you were unmounting. Is it through the command line or a file manager?

Offline

#11 2012-05-07 15:25:36

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: USB hdd write speed shenanigans

I tried doing
ACTION=="add", ENV{mount_options}="noatime,users,exec"
in the rule, but it didn't solve the problem.

I am unmounting it from within spaceFM file manager.

Offline

#12 2012-05-07 16:01:35

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: USB hdd write speed shenanigans

I think spaceFM uses udisks (at least for now), right? You could use something like udiskie or devmon to mount it. It should allow user unmounting then.

Offline

Board footer

Powered by FluxBB