LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Thread Tools
Old 03-07-2004, 08:55 PM   #1
mjenkins
Member
 
Registered: Jun 2003
Location: kc
Distribution: fc2
Posts: 52
Thanked: 0
files going to 0 kb


[Log in to get rid of this advertisement]
i am really angry and i don't know how to fix this.
i am dual booting windows 2000 and fedora core1
i have a 40GB Maxtor for both of these to run off of seperatly.
i also have a 160BG Maxtor for storage.

I think the problem arose when i tried to make a simlink
the 160BG is formatted fat32 so i can read it from both operating systems.
while i was located in a directory on this drive i accidentally tried to simlink
to another folder on the drive. i don't know if this could have ruined the drive or something?

all i know is that when i become root and try to move files onto the drive now, sometimes they will appear as 0KB and not be able to access them.

i went back into windows and ran a defrag on this drive and some of the files appeared as found files which i could then rename.

does anyone have any opinion whether this is a hardware problem, a problem under linux or i have also heard the mellissa virus does this (but i was in linux)...
mjenkins is offline     Reply With Quote
Old 03-08-2004, 06:32 PM   #2
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394
Thanked: 0
Really looks like a bug, you should file this to fedora core (after double-checking your mount options).
Symlinking on fat32 should only give a "operation not permitted" error.
However, if I remember right at present there is a limit of 2GB for a single file, so this may be the problem.
ac1980 is offline     Reply With Quote
Old 03-08-2004, 09:58 PM   #3
DavidPhillips
LQ Addict
 
Registered: Jun 2001
Location: South Alabama
Distribution: RedHat / SuSE
Posts: 7,150
Thanked: 0
Can you give the exact command you used?
DavidPhillips is offline     Reply With Quote
Old 03-19-2004, 05:40 PM   #4
mjenkins
Member
 
Registered: Jun 2003
Location: kc
Distribution: fc2
Posts: 52
Thanked: 0

Original Poster
i found the message below and emailed this guy (Adam)
he mailed me how he fixed this on his debian box.
i upgraded to the 2.6.3-2.1.253.2.1 kernel and this seemed to fix it.
i am also getting the "failed to preserve ownership" message again
so this seems reassuring for now...

this was getting really bad. below are the conditions in which i experienced this:
any use of mv as root to the vfat filesystem
any use of cp as root to the vfat filesystem
any use of gnome to drag and drop files as root to the vfat filesystem
any use of konqueror as root to the vfat filesystem (i was using the "make gallery" option on pictures)

Included message
------------------------------------------
hi,

wow, I thought I was the only one

yes, I think, kindof - since posting this I've made a
few changes to my system and I recently I tried moving
files and had no problem. Not sure what fixed it but
heres whats different:

* updgraded to 2.6.2 kernel - I suspect its a bug in
2.4 fat32 filesystem

* changed fstab to mount my drive so my normal user
has access ie:
/dev/hdg1 /mnt/c vfat
rw,user,noauto,umask=022,uid=i 0 0

* Other things - I update my system very regularly so
although unlikely it could have perhaps been insmod,
mv, etc.


I still think the mv command should check the dest
file size when the move has finished before deleting
the original file - like for moving between file
systems

Let me know if you fix it on yours, i'd be interested
to know what the cause is.

Thanks,
Adam

--- Michael Jenkins wrote: >
Hi,
>
> I was just wondering if you ever found a way to fix
> this... The same thing happened to me using a 160
> GB Maxtor with Fedora Core 1
> and 2.4.22-1.2174.nptl kernel. I know it is
> normal for you to get this message "failed to
> preserve ownership" for doing operations to a vfat
> (fat32) drive because that filesystem does not
> support ownerships.
> I thought I had done something to ruin the drive
> because vfat does not support symlinks either and i
> tried to ln -s to some files while in that drive.
> Anyway, I just wanted to see if maybe it is because
> of a bad kernel or something....
> I lost about 140 GB of mp3's this way so don't feel
> too bad !!!
> Mike Jenkins
>
>
> Hello,
>
> I just moved a heap of direcories to a 140GB fat32
> partition and now most
> the newly created files are 0 bytes. The old files
> are no longer there.
>
> I got this message from mv:
> mv: *failed to preserve ownership* for
> `/mnt/d/test-dir/123/xine_snapshot-1.png': Operation
> not permitted
>
> I also had this happen when I tried to move files
> using konqueror. The
> directories that had subdirectories have had the subdirectories
> emptied. I'm very frustrated with this and would like to know
> why this is happening
> and what I can do to prevent it (I'd like to keep
> that partition as
> fat32). The strange thing to me is that some files
> copied ok. I'm running
> debian testing with kernel 2.4.22. I was getting
> this same problem on
> debian stable and on an older kernel (this is one
> reason I upgraded).
>
> I was originally thinking it may have caused by my
> HPT370 IDE controller,
> or the fat32 filesystem not properlly supporting my
> 200GB HD, which could
> perhaps still be the case???
>
> This has been happening since I've had debian on
> this computer so I have
> been using cp -r;rm -r to move directories. Today I
> was lazy and used mv.
> Should I always do the two commands or am I suppsed
> to be able to use mv?
>
> Is there any way I can recover moved files from an
> ext2 partition? Its
> probably been overwritten my mozillas cache, but for
> next time...
>
> Any thoughts or suggestions would be apreciated,
>
> Thanks,
> Adam
mjenkins is offline     Reply With Quote
Old 03-20-2004, 07:25 AM   #5
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836
Thanked: 0
Gnome may be running suid root. maybe I dont know what Im talking about, but failed to preserve ownership means exactly what it says. its not a bug.

and when copying files try to copy them as their original owner.

I copy files to a vfat USB storage device all the time as root.
I get this errror also. but doesnt matter cause I use root to install these files.
AutOPSY is offline     Reply With Quote
Old 03-21-2004, 01:23 PM   #6
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394
Thanked: 0
It's indeed a kernel problem. In the link below you can find a discussion and even a patch for 2.4.20 kernel. I suppose this has been fixed in recent 2.4 kernels, still I'm not 100% sure.

http://www.ussg.iu.edu/hypermail/lin...12.0/1036.html
ac1980 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Able to write files to MP3 player but no files written into actual device? olnex Linux - Hardware 0 11-11-2005 07:32 AM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 12:42 PM
How can konqueror view html files in .gz & .bz2 files directly? ailinzhe Linux - Software 5 05-24-2004 09:36 AM
xine plays only (a part of) the sound of a wmv, some divx files and crushes mp4 files bezoomny Linux - Software 1 03-10-2004 08:33 PM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 03:38 AM


All times are GMT -5. The time now is 08:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration