You are not logged in.
I know this is going to sound bizarre, but I think both pcmanfm and nautilus are misleading me.
Replicate:
1. copy/paste a large file (~700mb) from hard drive to thumb drive. watch the dialog box zip to 100% and close. play movie. it plays fine.
unmount thumb drive, remove, put back in. error messages when i try to play the file -- and sometimes it'll say the file is suddenly ~600 or ~650mb.
2. start over. copy/paste a large file (~700mb) from hard drive to thumb drive. watch the dialog box zip to 100% and close. play movie. it plays fine.
walk away, leaving thumb drive mounted and inserted for 20 minutes.
unmount and remove thumb drive. reinsert. play movie. it plays fine, no errors at all.
tried both 1 and 2 with two different usb ports, two different thumb drives, and a multitude of movies.
why does walking away for 20 minutes after it is "done" copying make a difference? any way i can get pcmanfm and/or nautilus to tell the truth about the progress?
Last edited by earthpig (2010-04-29 23:54:03)
Offline
How are you unmounting the thumb drive? From what I understand, some of the transfer is stored in a cache to speed up the process from a user perspective. But unmounting the drive should force all that to be written.
Offline
thanks for the response.
in both nautilus and pcmanfm (whichever i use to copy): right click on the drive on the left -> unmount -> wait till its done unmounting (both the indicator light on the thumb drive and the graphical indication in nautilus or pcmanfm) -> remove
some of the transfer is stored in a cache to speed up the process from a user perspective.
any way i can disable that? is that on arch's end, the hardware's end, or the thumb drive's end?
Last edited by earthpig (2010-04-29 23:57:24)
Offline
> any way i can disable that?
http://bbs.archlinux.org/viewtopic.php?id=96060
Offline
[OT]
Ummm, it's the first time I've seen a 'tie' (check the post time: mine and falconindy's) on the forums. Does it mean I'll die tomorrow or sth?
[/OT]
Offline
sweet, thanks guys!
just to make sure i understand correctly:
1. i should start the copy process
2. wait till it claims to be done
3. run the command 'sync'
4. now unmount and remove
is that correct?
Offline
Hmm, is there any way we can edit Udev (?) to use "sync(hronous)" mount for external hdd/usb?
I've experienced the exact same thing, and it's highly frustrating.
Offline
I don't use automounting and I have no file manager.
#!/bin/bash
DRIVE="/dev/sdb1"
if mount | grep -q $DRIVE; then
umount $DRIVE
else
mount $DRIVE /mnt/usb
fi
(I stole this piece of code, it's not mine)
I stick the stick in, run the script, copy / remove files and run it again - I physically remove the USB stick only after I see the prompt (and this can often take a while) ready after it finished unmounting - which means everything is synced.
Offline
sweet, thanks guys!
just to make sure i understand correctly:
1. i should start the copy process
2. wait till it claims to be done
3. run the command 'sync'
4. now unmount and remove
is that correct?
No, you're supposed to use the sync option at mount time. Type "man mount" in a terminal.
Arch Linux x86_64 · xbmc-svn all night
Offline
earthpig wrote:sweet, thanks guys!
just to make sure i understand correctly:
1. i should start the copy process
2. wait till it claims to be done
3. run the command 'sync'
4. now unmount and remove
is that correct?
No, you're supposed to use the sync option at mount time. Type "man mount" in a terminal.
Yes, but - the 'sync' command will also flush caches to disk ...
In the 'old days' we always had to do "sync; sync; umount"
Offline
eirik wrote:earthpig wrote:sweet, thanks guys!
just to make sure i understand correctly:
1. i should start the copy process
2. wait till it claims to be done
3. run the command 'sync'
4. now unmount and remove
is that correct?
No, you're supposed to use the sync option at mount time. Type "man mount" in a terminal.
Yes, but - the 'sync' command will also flush caches to disk ...
In the 'old days' we always had to do "sync; sync; umount"
I stand corrected.
When copying files to my memory stick, the copying progress indicator goes to 100%, but keeps waiting there until the cache has been written completely. It's weird that the OP's system doesn't handle this properly, but I guess hardware differences are to blame.
Arch Linux x86_64 · xbmc-svn all night
Offline
When your DE does an unmount, it takes quite a bit of time for syncing to properly finish if you've copied a large file. Using Gnome here, there's a big 'finishing copying files, do not remove yet' warning. If I wait for that to go away (and the activity light to shut off) then things are fine.
Its not really 'lying', caching of file writes is a Good Thing for preserving HD/thumbdrive lifespans and reducing power consumption.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Hmm, is there any way we can edit Udev (?) to use "sync(hronous)" mount for external hdd/usb?
I've experienced the exact same thing, and it's highly frustrating.
Sure. There's a few udev different flavors of udev rules in the wiki. I've modified one slightly, which looks like this...
KERNEL!="sd[e-z][0-9]", GOTO="media_by_label_only_auto_mount_end"
ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
ENV{ID_FS_LABEL}=="", GOTO="media_by_label_only_auto_mount_end"
ACTION=="add", RUN+="/bin/mkdir -p /media/$env{ID_FS_LABEL}"
# Global mount options
ACTION=="add", ENV{mount_options}="noatime,users"
# Filesystem specific options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},sync,utf8,uid=1000,gid=100,fmask=133,dmask=022"
ACTION=="add", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/$env{ID_FS_LABEL}"
ACTION=="remove", ENV{ID_FS_LABEL}=="?*", RUN+="/bin/umount -l /media/$env{ID_FS_LABEL}", RUN+="/bin/rmdir /media/$env{ID_FS_LABEL}"
LABEL="media_by_label_only_auto_mount_end"
Note that the first line probably needs to be modified -- I've been fighting something (dunno if its a bug) that makes this rule mount my internal drives at bootup -- fstab gets parsed, crying ensues because everything's already mounted, and I get dumped to a maintenance shell.
Offline
OP: can you reproduce this from the command line? I.e. do "mount; copy; unmount; mount;" and then check the big file.
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
I don't use automounting and I have no file manager.
#!/bin/bash DRIVE="/dev/sdb1" if mount | grep -q $DRIVE; then umount $DRIVE else mount $DRIVE /mnt/usb fi
(I stole this piece of code, it's not mine)
I stick the stick in, run the script, copy / remove files and run it again - I physically remove the USB stick only after I see the prompt (and this can often take a while) ready after it finished unmounting - which means everything is synced.
You could always put that in your shell config file. That way, when you start a terminal, it will be mounted
Offline
When copying files to my memory stick, the copying progress indicator goes to 100%, but keeps waiting there until the cache has been written completely. It's weird that the OP's system doesn't handle this properly, but I guess hardware differences are to blame.
the most significantly unusual hardware i have is that i am typically copying things from an SSD to a thumb drive -- likely one of the more drastic speed differences.
OP: can you reproduce this from the command line? I.e. do "mount; copy; unmount; mount;" and then check the big file.
sure, i will later.
Offline