View Full Version : Cannot save on USB external hard drive
perfectpol7
22nd May 2009, 01:59 PM
I have recently purchased USB external hard disk drive (500Gig) and need to use it as as a backup drive for linux. My distro is fedora 10. I had mount it and I cannot save data on it. When I plug it on it is being detected and when I open it I found out that there is a folder lost+found. This folder could not be displayed if clicked.
here is my vi /etc/fstab file
/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
/proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
gvfs-fuse-daemon /home/Administrator/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=Administrator 0 0
/dev/sdb1 /mnt/sdb1 ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sdc1 /media/disk ext3 rw,nosuid,nodev,uhelper=hal 0 0
root@Programming ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
142G 7.1G 127G 6% /
/dev/sda1 190M 21M 160M 12% /boot
tmpfs 2.0G 88K 2.0G 1% /dev/shm
/dev/sdb1 459G 199M 435G 1% /mnt/sdb1
/dev/sdc1 459G 199M 435G 1% /media/disk
How do I fix this
moniker117
23rd May 2009, 02:49 AM
I have recently purchased USB external hard disk drive (500Gig) and need to use it as as a backup drive for linux. My distro is fedora 10. I had mount it and I cannot save data on it. When I plug it on it is being detected and when I open it I found out that there is a folder lost+found. This folder could not be displayed if clicked.
here is my vi /etc/fstab file
/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
/proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
gvfs-fuse-daemon /home/Administrator/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=Administrator 0 0
/dev/sdb1 /mnt/sdb1 ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sdc1 /media/disk ext3 rw,nosuid,nodev,uhelper=hal 0 0
root@Programming ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
142G 7.1G 127G 6% /
/dev/sda1 190M 21M 160M 12% /boot
tmpfs 2.0G 88K 2.0G 1% /dev/shm
/dev/sdb1 459G 199M 435G 1% /mnt/sdb1
/dev/sdc1 459G 199M 435G 1% /media/disk
How do I fix this
Every partition on your computer will probably have a lost+found folder in linux. I don't think you should worry about it's existance. What happens when you try to copy a file onto the drive? Do you get an error? What about creating a folder?
From your df -h listing, it looks like it mounted correctly. What do you see when you type "mount"?
JohnVV
23rd May 2009, 05:58 AM
it mounted but it looks like
/dev/sdb1 459G 199M 435G 1% /mnt/sdb1
/dev/sdc1 459G 199M 435G 1% /media/disk
sdb1 and sdc1 are the SAME partition with two mount points
Dangermouse
23rd May 2009, 07:08 PM
Another thing to do is unmount the drive before you unplug it otherwise it doesnt always save the data
right click on icon select unmount
perfectpol7
25th May 2009, 08:08 AM
the output for the code mount is as follows:-
[root@Programming ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/Administrator/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=Administrator)
/dev/sdb1 on /mnt/sdb1 type ext3 (rw,nosuid,nodev,uhelper=hal)
/dev/sdc1 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)
[root@Programming ~]#
sdb1 and sdc1 are the SAME partition with two mount points. Yes its the same Usb external harddrive, probably thats why I am not able to save.
When I unmount the usb external harddrive I just right click it and select unmount it then plug it on again but to no avail.
kevmif
25th May 2009, 08:20 AM
Another thing to do is unmount the drive before you unplug it otherwise it doesnt always save the data
right click on icon select unmount
I've learnt that the hard way :(
Hopefully its fixed soon.
moniker117
25th May 2009, 07:53 PM
the output for the code mount is as follows:-
[root@Programming ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/Administrator/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=Administrator)
/dev/sdb1 on /mnt/sdb1 type ext3 (rw,nosuid,nodev,uhelper=hal)
/dev/sdc1 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)
[root@Programming ~]#
sdb1 and sdc1 are the SAME partition with two mount points. Yes its the same Usb external harddrive, probably thats why I am not able to save.
When I unmount the usb external harddrive I just right click it and select unmount it then plug it on again but to no avail.
This all looks good. What error are you getting when you try to create a folder or copy a file to the drive? Again, keep in mind that the lost+found folder is a standard system folder, you're not going to be able to do anything with that folder and you should leave it alone.
CiaW
26th May 2009, 04:05 AM
I'm still a newbie, so forgive me if I'm off-base. However.... there's a good chance that the drive is pre-formatted in NTFS format. I got one a few months back and that was the case.
I haven't used it since I installed F7 last weekend and just installed ntfs-config; but when I just now plugged it in it said it couldn't mount it (due to unsafe shutdown previously, apparently....)
I'm sure there's a way to make yours (and mine once I get it mounted) an ext3 drive, it didn't specifically look like it showed what type of format on your listing. Is that something parted could handle? :confused:
Thought I'd throw that out there, something to look at.
Edit: Nevermind, it looks like from your log that it does show it's ext3 (?) so maybe my theory is all wrong. I'd previously read before switching to Linux that most of those external drives are pre-formatted for NTFS. fwiw.
pwca
26th May 2009, 06:19 AM
I have purchased a 500GB drive to use with my laptop in the same fashion. Your problem sounds like the one I had when I first plugged in my drive.
My problem was solved by opening Nautilus (your file browser) and looking at the file permisions on:
/media/disk
I found mine were set as root and read only for users.
To solve the problem (as root) I reset the ownership and permissions of the directory /media/disk to the system user.
marko
27th May 2009, 12:33 AM
I've learnt that the hard way :(
Hopefully its fixed soon.
No, that can't be 'fixed', Linux can't read your mind. The point of doing the unmount is to flush the buffered file system data to the USB disk right now
and lock down/unregister the disk as a filesystem target because usually written data goes to a buffer which then is written after a certain timeout passes. This allows for more efficient usage of the disk (reduces unnecessary spin ups, etc). umount is there so the flush/lockdown can occur before you pull the cable out.
So we have two possible options:
1) instantly force file writes to the disk: Pro -> can immediately (sort of) unplug drives without unmounting, con -> no benefit of caching writes, disk is frantically used if lots of small writes occur in a short time. Note also that even having immediate writes doesn't ensure a good filesystem if you just yank the cord, what if the bytes were flowing right as you pulled the cord? --> this is why some kind of unmount and disabling of the drive is needed.
2) using file system caching: pro -> performance benefits, con -> you have to unmount or wait the flushing timeout time (assuming you know that things are waiting in the buffer)
The flushing timeout is vm.dirty_expire_centisecs or about 30 seconds on Fedora 11
marko
27th May 2009, 12:38 AM
By the way, if you have a USB device, in current Fedoras there should be no fstab entry at all. udev / hal will notice the drive has been plugged in, trump up a mount point named after the volume label it sees on the filesystem and use that name as the mount name in /media.
So it could be that the system is getting confused with the hal automatic mount point and the one you defined in /etc/fstab
You might need to use e2label to see or modify/add a label
I'd try commenting out any fstab entries that point to a usb drive, then reboot fedora and try the disk again. By try I mean
with Fedora up and on the desktop, plug in the drive. The Desktop should notice the event and ask you if you want to mount it.
KDE4 has a "device notifier" widget that will do this (lets you use Dolphin to mount it) if you add the widget from the "Add Widgets" panel.
JohnVV
27th May 2009, 12:40 AM
CiaW
I haven't used it since I installed F7 last weekend and just installed ntfs-config;
you do know that support for ntfs in the OLD and unsupported fedora 7 was not good . It was read only and used the OLD ntfs kmod . Not the current ntfs-3g .
CiaW
27th May 2009, 03:34 AM
CiaW
you do know that support for ntfs in the OLD and unsupported fedora 7 was not good . It was read only and used the OLD ntfs kmod . Not the current ntfs-3g .
No, I did not know that until this very moment (I know F7 is OLD; but it's working great for me so far.... I'll do some research on upgrading in the next few weeks .. There are some things like Firefox add-ons, etc that I'd prefer not to have to re-download, like I said, I'm a newbie.)
I had the newest version of Ubuntu on dvd / CD and it wouldn't install on my thinkpad 600x (kernel panic), but another bookstore had a F7 Bible with dvd / disk which worked fine on install, so here I am.
Is there an ntfs-3g that I could install on F7 via yum or something? I did get it to recognize the drive and I still have 275 gig free on the drive, so it'd be nice to use it for backups. And if I could partition the free portion to ext3 -- which I'd suspect Fedora / Linux would prefer?, that'd be nice to be able to do too. In the meantime I have the ability to burn data cd's for backup. Thanks for the heads-up.
Edit : Apparently I have ntfs-3g as it appeared to attempt to mount the usb drive (which wasn't plugged in) when I booted today, and the line specifically showed ntfs-3g. I had just used 'yum install ntfs-config' and that must have grabbed the right version! Thanks.
kevmif
27th May 2009, 04:05 AM
No, that can't be 'fixed', Linux can't read your mind. The point of doing the unmount is to flush the buffered file system data to the USB disk right now
and lock down/unregister the disk as a filesystem target because usually written data goes to a buffer which then is written after a certain timeout passes. This allows for more efficient usage of the disk (reduces unnecessary spin ups, etc). umount is there so the flush/lockdown can occur before you pull the cable out.
So we have two possible options:
1) instantly force file writes to the disk: Pro -> can immediately (sort of) unplug drives without unmounting, con -> no benefit of caching writes, disk is frantically used if lots of small writes occur in a short time. Note also that even having immediate writes doesn't ensure a good filesystem if you just yank the cord, what if the bytes were flowing right as you pulled the cord? --> this is why some kind of unmount and disabling of the drive is needed.
2) using file system caching: pro -> performance benefits, con -> you have to unmount or wait the flushing timeout time (assuming you know that things are waiting in the buffer)
The flushing timeout is vm.dirty_expire_centisecs or about 30 seconds on Fedora 11
I swear this is not a troll question..... but why doesn't this issue occur with Windows? Why bother doing things differently in this particular case?
Basically when I copy something to my USB drive I usually wait for the file to copy, then pull the drive out and take it to another PC or put it in my pocket. I don't leave it sitting there.
Unmount is not needed in this case. Plug the drive in, copy your files, wait for the indicator on the drive to stop responding, remove the drive.
Unmount is only needed if you are actually using your USB drive as an active disk - which is not what USB pocket drives are designed for. Therefore in my opinion not writing data immediately to pocket drives is a very bad decision.
Very tempted to file a bug on this. Is it simple enough to change the setting yourself?
unamanic
27th May 2009, 04:44 AM
I swear this is not a troll question..... but why doesn't this issue occur with Windows? Why bother doing things differently in this particular case?
Basically when I copy something to my USB drive I usually wait for the file to copy, then pull the drive out and take it to another PC or put it in my pocket. I don't leave it sitting there.
Unmount is not needed in this case. Plug the drive in, copy your files, wait for the indicator on the drive to stop responding, remove the drive.
Unmount is only needed if you are actually using your USB drive as an active disk - which is not what USB pocket drives are designed for. Therefore in my opinion not writing data immediately to pocket drives is a very bad decision.
Very tempted to file a bug on this. Is it simple enough to change the setting yourself?
Even in windows, if you do as you describe, you (used to) get the "unsafe removal" pop up. I've dorked up a thumb drive in windows pulling it out too soon, and have used the safe removal icon in the system tray ever since.
tktim
6th June 2009, 12:43 AM
In Windows Vista as soon as you insert a USB drive an icon appears in lower right hand corner. If you hover over it, it says Safely Remove Hardward. If you click it once it says Do you want to safely remove USB drive? You click it and after awhile it says you can now safely remove your USB drive.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.