I've been having an odd problem lately. When I drag files from the computer to a flash drive, they appear to copy, but when I try to use the files I find that only the name was copied (file size of 0). When I copy the same files to the same flash drive, from the terminal, everything seems to work.
Has anyone else experienced a problem like this? It's starting to get a little frustrating.
Ron Blizzard wrote:
I've been having an odd problem lately. When I drag files from the computer to a flash drive, they appear to copy, but when I try to use the files I find that only the name was copied (file size of 0). When I copy the same files to the same flash drive, from the terminal, everything seems to work.
Has anyone else experienced a problem like this? It's starting to get a little frustrating.
Anything weird being logged to /var/log/messages? Probably the first place I'd check..
On Thu, Jul 2, 2009 at 2:27 PM, Ryan Pugatchrpug@tripadvisor.com wrote:
Ron Blizzard wrote:
I've been having an odd problem lately. When I drag files from the computer to a flash drive, they appear to copy, but when I try to use the files I find that only the name was copied (file size of 0). When I copy the same files to the same flash drive, from the terminal, everything seems to work.
Has anyone else experienced a problem like this? It's starting to get a little frustrating.
Anything weird being logged to /var/log/messages? Probably the first place I'd check..
Yes, there is. I didn't know to look there -- a lot to learn.
Jul 1 03:54:26 localhost kernel: Buffer I/O error on device sda1, logical block 519 Jul 1 03:54:26 localhost kernel: lost page write due to I/O error on sda1 Jul 1 03:54:26 localhost kernel: Buffer I/O error on device sda1, logical block 520 Jul 1 03:54:26 localhost kernel: lost page write due to I/O error on sda1 Jul 1 03:54:26 localhost kernel: sd 8:0:0:0: rejecting I/O to device being removed Jul 1 03:54:26 localhost kernel: Buffer I/O error on device sda1, logical block 18439 Jul 1 03:54:26 localhost kernel: lost page write due to I/O error on sda1 Jul 1 03:54:26 localhost kernel: sd 8:0:0:0: rejecting I/O to device being removed Jul 1 03:54:26 localhost kernel: Buffer I/O error on device sda1, logical block 18441 Jul 1 03:54:26 localhost kernel: lost page write due to I/O error on sda1 Jul 1 03:54:26 localhost kernel: Buffer I/O error on device sda1, logical block 18442 Jul 1 03:54:26 localhost kernel: lost page write due to I/O error on sda1 Jul 1 03:54:26 localhost hald[2450]: forcibly attempting to lazy unmount /dev/sda1 as enclosing drive was disc Jul 1 03:54:26 localhost hald: unmounted /dev/sda1 from '/media/disk' on behalf of uid 0
It looks like I'm getting I/O errors for some reason. Maybe a problem with the USB port itself?
Ron Blizzard wrote: 1
Jul 1 03:54:26 localhost hald[2450]: forcibly attempting to lazy unmount /dev/sda1 as enclosing drive was disc
That indicates that you unplugged the drive without first unmounting it, which is very likely to cause exactly the problem you are seeing.
On Thu, Jul 2, 2009 at 11:02 PM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
Ron Blizzard wrote: 1
Jul 1 03:54:26 localhost hald[2450]: forcibly attempting to lazy unmount /dev/sda1 as enclosing drive was disc
That indicates that you unplugged the drive without first unmounting it, which is very likely to cause exactly the problem you are seeing.
My main flash drive had issues also. So I've reformatted it and rebuilt Puppy Linux on it, and I'm going to do some more testing -- though I will definitely unmount the flash drive before taking it out in the future.
I'll report back -- one way or the other.
Thanks for the help.
On Thu, Jul 2, 2009 at 11:02 PM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
Ron Blizzard wrote: 1
Jul 1 03:54:26 localhost hald[2450]: forcibly attempting to lazy unmount /dev/sda1 as enclosing drive was disc
That indicates that you unplugged the drive without first unmounting it, which is very likely to cause exactly the problem you are seeing.
I think that was it. It also caused a problem with the hidden trash directory that CentOS builds on the flash when you delete files. I couldn't delete the files in the trash folder. The rebuild seems to have fixed everything.
One thing that is odd -- sometimes when I unmount the flash drive, I get a notice on the bottom of the screen that says 1) Wait until the files are written to the flash and 2) It is now safe to remove the flash drive. But I only get these notices some of the time -- maybe two out of ten times.
At any rate, I'm now unmounting and then waiting for a while before removing the flash (just in case it is still writing). Thanks.
Ron Blizzard wrote:
At any rate, I'm now unmounting and then waiting for a while before removing the flash (just in case it is still writing). Thanks.
You can if you want also run the 'sync' command to flush out the write cache of the system.
I do that myself before I remove any type of disk that I have written to, mainly out of habit, it's not a bad habit to have.
I believe once a file system is unmounted all of the writes have been flushed to it. You can see the change in behavior:
- write a bunch of data to a disk, run sync, then unmount, it should unmount immediately - write a bunch of data to a disk, then unmount, it may take a few seconds(or more) to unmount.
Not sure why those popups aren't showing up on a consistent basis, I don't use CentOS as a desktop, my Debian desktops don't show any messages I don't think, though Ubuntu seems to.
nate
On Tue, Jul 7, 2009 at 3:24 PM, natecentos@linuxpowered.net wrote:
You can if you want also run the 'sync' command to flush out the write cache of the system.
I do that myself before I remove any type of disk that I have written to, mainly out of habit, it's not a bad habit to have.
I believe once a file system is unmounted all of the writes have been flushed to it. You can see the change in behavior:
- write a bunch of data to a disk, run sync, then unmount,
it should unmount immediately
- write a bunch of data to a disk, then unmount, it may take
a few seconds(or more) to unmount.
Not sure why those popups aren't showing up on a consistent basis, I don't use CentOS as a desktop, my Debian desktops don't show any messages I don't think, though Ubuntu seems to.
Even better. I'm definitely going to use 'sync' when I unmount a removable drive. Thanks.
Hi,
On Tue, Jul 7, 2009 at 16:16, Ron Blizzardrb4centos@gmail.com wrote:
One thing that is odd -- sometimes when I unmount the flash drive, I get a notice on the bottom of the screen that says 1) Wait until the files are written to the flash and 2) It is now safe to remove the flash drive. But I only get these notices some of the time -- maybe two out of ten times.
I've seen that, apparently it will only show you the popups in the case where there are uncommitted writes that have to be flushed before the unmount finishes.
I agree that it is strange that it does not behave like this every time, it would certainly be less worrisome to always show the "it is now safe..." message.
At any rate, I'm now unmounting and then waiting for a while before removing the flash (just in case it is still writing). Thanks.
Same here!
Filipe
On Tue, Jul 7, 2009 at 3:43 PM, Filipe Brandenburgerfilbranden@gmail.com wrote:
Hi,
On Tue, Jul 7, 2009 at 16:16, Ron Blizzardrb4centos@gmail.com wrote:
One thing that is odd -- sometimes when I unmount the flash drive, I get a notice on the bottom of the screen that says 1) Wait until the files are written to the flash and 2) It is now safe to remove the flash drive. But I only get these notices some of the time -- maybe two out of ten times.
I've seen that, apparently it will only show you the popups in the case where there are uncommitted writes that have to be flushed before the unmount finishes.
I agree that it is strange that it does not behave like this every time, it would certainly be less worrisome to always show the "it is now safe..." message.
At any rate, I'm now unmounting and then waiting for a while before removing the flash (just in case it is still writing). Thanks.
Same here!
I also think I'll issue the 'sync' command a few times while the flash drive or removable hard drive are still there -- after I've moved files one way or the other. It "feels" kind of like issuing a "Save" command in a word processor.
Ron Blizzard wrote:
One thing that is odd -- sometimes when I unmount the flash drive, I get a notice on the bottom of the screen that says 1) Wait until the files are written to the flash and 2) It is now safe to remove the flash drive. But I only get these notices some of the time -- maybe two out of ten times.
If there is a significant amount of data that must be written to the device, then you get the pop ups. If the device can immediately be made ready to remove, then there are no messages. In either case, when the icon disappears from the desktop the device is safe to remove. The situation gets really messy if the device has more than one partition mounted. You can unmount one partition and get a "safe to remove" message while another partition is still mounted. I believe that's one reason MS Windows doesn't support multiple partitions on these devices.
On Wed, Jul 8, 2009 at 12:53 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
If there is a significant amount of data that must be written to the device, then you get the pop ups. If the device can immediately be made ready to remove, then there are no messages. In either case, when the icon disappears from the desktop the device is safe to remove. The situation gets really messy if the device has more than one partition mounted. You can unmount one partition and get a "safe to remove" message while another partition is still mounted. I believe that's one reason MS Windows doesn't support multiple partitions on these devices.
That makes sense. It does seem like the notice comes up when I've moved larger files. Thanks -- though I like using the 'sync' command anyhow. It kind of puts my mind at ease.
Hi,
On Thu, Jul 2, 2009 at 14:45, Ron Blizzardrb4centos@gmail.com wrote:
I've been having an odd problem lately. When I drag files from the computer to a flash drive, they appear to copy, but when I try to use the files I find that only the name was copied (file size of 0).
Do they show this way after you unplug/replug it? Are you unmounting it before unplugging it? This could cause the issue you are reporting.
HTH, Filipe
On Thu, Jul 2, 2009 at 2:45 PM, Filipe Brandenburgerfilbranden@gmail.com wrote:
Hi,
On Thu, Jul 2, 2009 at 14:45, Ron Blizzardrb4centos@gmail.com wrote:
I've been having an odd problem lately. When I drag files from the computer to a flash drive, they appear to copy, but when I try to use the files I find that only the name was copied (file size of 0).
Do they show this way after you unplug/replug it? Are you unmounting it before unplugging it? This could cause the issue you are reporting.
No, I haven't been. I'll try copying some files then unmount before pulling the flash drive. Thanks.