LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-15-2021, 10:39 AM   #1
bla5
LQ Newbie
 
Registered: May 2018
Posts: 9

Rep: Reputation: Disabled
Error when getting information for a file input/output error.


Hi.
I was moving a mp4 file from partition1 to the partition2, I leave the machine and when I returned the computer was turn-off. I don't know why.
I start again the PC and when I try to open partition2 the windows folder is empty with a message told me:

Error when getting information for a file "/media/partition2/namefile.mp4" input/output error.

I try to delete that "namefile.mp4" but was impossible, from a terminal command line not worked also from Midnight Commander not worked, even attempted from a LiveCD but with the same result. I have a lot of data in that partition. Is will be possible recover the partition or delete that particular file without lose all content of partition?

I discover it this:
When I open the partition2 whit File Manager (Thunar) in the Dir-bar I type a direction of a SubFolder (example: /media/partition2/VideoMusic) and I can read and play the files in that folder, only "/media/partition2" in not readable.
Well, apparently the problem is the file namefile.mp4 in the main directory of the partition2.

Thanks in advance.

Last edited by bla5; 01-15-2021 at 10:41 AM.
 
Old 01-15-2021, 02:13 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
I have had similar problems when power is lost while writing a large file. Some data is written wrong and may wipe out everything, or it may be confined to the single file.

I would, BEFORE writing anything else to that drive, do a backup of everything that can still be accessed. Once that is done, reformat the filesystem then restore what was removed.
 
Old 01-15-2021, 02:25 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
...or run an fsck on the unmounted partition, then try to delete the file as root.
of course a backup is always a good idea.
 
Old 01-15-2021, 06:29 PM   #4
bla5
LQ Newbie
 
Registered: May 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
<b>computersavvy:</b>
Apparently the problem is only in the file because from a terminal or using the prog. Midnight-Commander I can access the other .mp4 files in the main directory (partition2). No proble to play the files with VLC.
When I try to rename, delete or move that file I get the same error message. Thank you for your reply.

<b>ondoho:</b>
I already tried to delete it or move it as root but I did not try to run fsck, I will try and then tell you if it worked. Thank you for your answer.
 
Old 01-16-2021, 03:14 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by bla5 View Post
I did not try to run fsck, I will try and then tell you if it worked.
IIRC fsck does not repair by default.
Read its man page.
If you repair, make a backup of the raw partition data first.
Save all output to show it to us.
 
Old 01-17-2021, 12:39 PM   #6
bla5
LQ Newbie
 
Registered: May 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
IIRC fsck does not repair by default.
Read its man page.
If you repair, make a backup of the raw partition data first.
Save all output to show it to us.
A backup is complicated due to the number of long files.
I will continue testing with fsck, so far I have not been successful.
 
Old 01-21-2021, 01:57 PM   #7
bla5
LQ Newbie
 
Registered: May 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
Nothing happened with fsck.
Now I am thinking, partition 2 is storage only.
I know it still has an NTFS file system but it is not the partition the operating system is on.
fsck is useful in this case?
 
Old 01-21-2021, 02:10 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by bla5 View Post
fsck is useful in this case?
Why not?
Storage only filesystems also need to function properly.
Read the fabulous manual:
Code:
man fsck
 
Old 01-21-2021, 02:40 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,697

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
fsck is useful in this case?
Actually it depends. In this case fsck uses ntfsfix which can only repair minor problems. Since the partition is mountable and you only have trouble with a single file probably not but I've never encountered this problem. The only way the it might be fixed is if you can run chkdsk from a Windows system.
 
Old 01-21-2021, 05:03 PM   #10
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by bla5 View Post
Nothing happened with fsck.
Now I am thinking, partition 2 is storage only.
I know it still has an NTFS file system but it is not the partition the operating system is on.
fsck is useful in this case?
I would not use fsck on an ntfs partition. If the windows system can access that partition I would recommend the native chkdisk instead.

AFAIK Linux access to ntfs filesystems is still 100% reverse engineered and may not be 100% the same as the native tools.
 
Old 01-25-2021, 04:08 PM   #11
bla5
LQ Newbie
 
Registered: May 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
No way Jose.
I tried everything I know and I always get the same error. The "problem file" has a number in parentheses in his name and
when I try to delete, rename or move it shows me this error:
Bash: Syntax error near unexpected token `(`

To make a chkdisk I have to move the HD to a computer with VirtualMachine and install some Windows.
Thanks to all for a help.
 
Old 01-25-2021, 04:34 PM   #12
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by bla5 View Post
No way Jose.
I tried everything I know and I always get the same error. The "problem file" has a number in parentheses in his name and
when I try to delete, rename or move it shows me this error:
Bash: Syntax error near unexpected token `(`
You haven't specified the name of the file you're trying to move/delete but the parentheses are confusing bash as it attempts to parse your command line.

Try enclosing the troublesome file name inside single quotes to keep bash from interpreting whatever that character is, say:
Code:
$ mv '/mnt/disk1/(strange)-file-name' /mnt/disk2
You could also try escaping that open parenthesis character -- using: \( -- but that may not be the only character that bash will wind up (mis)interpreting as having a special significance. You might need to escape additional characters. I find that enclosing the mess in single quotes works the vast majority of the time.

HTH...

Last edited by rnturn; 01-25-2021 at 04:45 PM.
 
  


Reply



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
NFS Large File Copies Fail - Error writing to file: Input/output error deck- Linux - Server 10 08-01-2022 02:30 AM
[SOLVED] Write a shell script that receives a word, an input file and an output file. The scripts copies all the lines in the input file that contain mandy2112 Linux - Newbie 3 08-18-2016 10:11 AM
Output in Log file instead of Standard Input Output srinietrx Programming 3 10-18-2015 09:34 AM
[SOLVED] stty: standard input: Input/output error [bash] DoME69 Programming 7 05-22-2015 12:14 AM
Repeated "input: AT Translated Set 2 keyboard as /class/input/input" messages AcerKev Mandriva 2 09-16-2007 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration