![]() |
File transfer stopped, now can't open any of the files
I was transferring files from my computer (Fedora Linux 22) to my Android phone and the power went out. I can see all the files in the folder on the computer and some on the phone as well, with their names and subdirectories, but I can't open any of them, and I have no idea where to start. It was about 27GiB. I wouldn't think every single one of them would suddenly be corrupted due to the transfer interruption, but that appears to be so. What do?
|
so... am I screwed?
|
it may just be a permission problem, what does the stat command give for the files/folder on the computer?
|
Code:
File: ‘/home/username/Documents/Phone transfer’ Code:
File: ‘/home/username/Documents/Phone transfer/Music/’ |
What's interesting is the files that made it to the phone display with no problem. The files that remained on the computer are all inaccessible, even when I move them to the phone now.
|
Have never seen this:
Code:
... Context: unconfined_u:object_r:user_home_t:s0 ... |
Wasn't fsck utility invented to fix problems like this?
|
Quote:
Quote:
|
What output did you get from fsck?
|
Quote:
|
What's also interesting is the output of 'file' on any of the images just lists it as 'data.' As though they're encrypted... but if they were encrypted, how come moving them to the phone worked fine until the outage, but now none of them are good?
|
Sounds like they are fubar'ed, if you have backups it might just be easier to restore from them.
|
I don't. This was supposed to BE the backup. But why would this all just... stop... I would think maybe the file that was in the process of being transferred would be effed, not the ENTIRE FOLDER.
|
The power outage has probably corrupted the underlying filesystem.
Have a look here: https://docs.fedoraproject.org/en-US...ing_Files.html Looks like this could be your problem, might have helped if you had said you was on SELinux. |
Quote:
|
At any rate thank you for the link :) I'll definitely be checking that out when I get home
|
Don't get humpy with me pal I'm trying to help, this info would have been helpful, and being reminded politly to include extra info on your problem is a reasonable request, so I am outta here if you want to give me attitude about helping you to help us with your problem!
|
Uh... that wasn't attitude... that was just humor and a sheepish apology for not providing enough information...
|
Now can we continue talking like gentlemen or... no?
|
That "unconfined_u:object_r:user_home_t:s0" is a perfectly normal SELinux context for files under your home directory. No problem there.
What application or command were you using to do the transfer? That might help in understanding what happened. Unless you told it to move the files or delete the source files after the transfer (unlikely -- you said this was intended as a backup), the source files should not have been affected. Running fsck in these situations (except in it's automatic "preen" (-p) mode) is not a good idea. The job of fsck is to make the filesystem consistent, and that can sometimes come at the expense of user data. |
Hmm, okay...
I'm just using F22 with Gnome. I had the MicroSD card in my phone, phone plugged in via USB to the laptop, pulled both folders - the local computer folder and the SD card - up side by side, selected the files on the computer, and tried to drag the selection over to the SD card. I did give my unskilled hand a shot at running fsck after this all happened, BUT before that (just to prevent further damage, I guess) I copied the folder to an external HD. I'm pretty sure I did run fsck with -p on the folder on the computer but the folder on the external HD is as it was immediately after the outage with no further changes. |
I was under the impression that a click and drag to external storage would end up as a copy, not a cut... maybe I'm wrong
|
Yes, the default should be "copy" when the source and destinations are on different filesystems. There would be a little "+" sign with the "hand" cursor to indicate a copy. Holding down the shift key changes the operation to "move", and the "+" sign changes to a little arrow. When going between directories on the same filesystem, the default is "move" and you have to hold down the ctrl key to copy.
Is the source filesystem ext4? I've lost track of what Fedora uses as a default filesystem. |
Man, I'm not even sure. I'm sorry guys. I'll have to get you more when I get home. That'll be pretty soon here after I get my daughter from day care (and get off work in a half hour).
|
Okay. I'm back and using the computer in question. Quick way to check the file system type of it, please?
|
Mount ought to tell you the filesystem of any mounted drive:
Code:
mount Otherwise, parted can definitely tell you the FS for both a mounted and unmounted drive: Code:
$ sudo parted /dev/sdc print |
Also, "df -T" will report the filesystem type as well as the space.
|
Okay... let's go with df. mount is a lot to read. Okay, the folder in question is in the /home partition (of course, right?). df says /home is ext4. Do you also need that of the phone?
|
Quote:
|
Quote:
|
Okay, here are the ls -lc results for the parent directories
Code:
[matthewreichert@localhost Phone transfer]$ ls -lc Code:
[matthewreichert@localhost Music]$ ls -lc | tail |
I like:
Code:
rsync Not sure if it could help you now or have prevented the problem in a power failure? I do have a couple good back up power supplies from thrift stores (similar to) but I use them for my Pi and other projects. Maybe I should put one back together? ;) Good luck! |
I'll have to remember that... I just hope, for now, that I can get these files back. I seriously don't see what could've caused this. Maybe corrupted headers or something. The "files" are still there and named properly, right where they were. There HAS to be a way to get them back.
|
I just tried to open one of the images and immediately checked /var/log/messages. Here's what appeared:
Code:
Jul 22 17:25:10 localhost gnome-session: Gjs-Message: JS LOG: The property brightness doesn't seem to be a normal object property of [0x6043810 StWidget] or a registered special property |
Quote:
Your best bet at this point would be to shut that system down, copy an image of the entire partition or LVM volume to another disk (which you undoubtedly do not have right now), and then run photorec on that image to see what files can be recovered, perhaps from where they had been prior to moving them to this location. Anything you do with that system prior to making the image decreases the chances for a successful recovery, so shut it down now. |
Quote:
|
Quote:
Quote:
|
Oh, so essentially you're suggesting putting the files back on the SD card from which they came? That is impossible - that card is bricked. After I was done removing the files and putting them on this computer, I formatted the disk, or attempted to, so my roommate could use it for her phone. The format failed and the card is toast. Just keeps getting better and better.
|
Quote:
Quote:
|
Not even the top two? Where it says Brightness and vignette_sharpness? Those are image properties
|
Quote:
|
I'd try to use testdisk/photorec
|
I guess I just don't understand how a file corrupts.
|
Quote:
|
All times are GMT -5. The time now is 01:02 AM. |