ls: reading directory /var/share/movies/: Input/output error

Post Reply
mister_v
Posts: 137
Joined: Sat Jun 20, 2009 5:42 pm

ls: reading directory /var/share/movies/: Input/output error

Post by mister_v »

Hello,

I get the following error when using the ls-command

Code: Select all

ls: reading directory /var/share/movies/: Input/output error
Anyone know what it means?
Chris
Site Admin
Posts: 127
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

Re: ls: reading directory /var/share/movies/: Input/output e

Post by Chris »

Sounds like you have a read problem (hardware problem).

Try unmounting and remounting your drive.

You can also check dmesg for more info.
mister_v
Posts: 137
Joined: Sat Jun 20, 2009 5:42 pm

Re: ls: reading directory /var/share/movies/: Input/output e

Post by mister_v »

Unmounted the drive and checked it with fdisk:

Code: Select all

# fdisk /dev/sdd
fdisk: cannot open /dev/sdd: Input/output error
Dmesg gives the following:

Code: Select all

dmesg | grep sdd
[1530841.170290] sd 5:0:0:0: [sdd] Unhandled error code
[1530841.170293] sd 5:0:0:0: [sdd]
[1530841.170297] sd 5:0:0:0: [sdd] CDB:
[1530841.170323] sd 5:0:0:0: [sdd] Unhandled error code
[1530841.170326] sd 5:0:0:0: [sdd]
[1530841.170330] sd 5:0:0:0: [sdd] CDB:
[1530841.170354] sd 5:0:0:0: [sdd] Unhandled error code
Doesn't sound good...
mister_v
Posts: 137
Joined: Sat Jun 20, 2009 5:42 pm

Re: ls: reading directory /var/share/movies/: Input/output e

Post by mister_v »

the drive is bad,
but how do I know in linux what drive is connected to what sata-port?

I have 6 drives,
the bad one is /dev/sdd
Chris
Site Admin
Posts: 127
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

Re: ls: reading directory /var/share/movies/: Input/output e

Post by Chris »

In the latest version of linux (at least from kernel 3.2)
you can get a list of hard disk id's in /dev/disk/by-id/

Code: Select all

ls -l /dev/disk/by-id/
lrwxrwxrwx 1 root root  9 Aug 27 20:47 scsi-SATA_SAMSUNG_HD103SJS246J9GB303707 -> ../../sdb
lrwxrwxrwx 1 root root 10 Aug 27 20:47 scsi-SATA_SAMSUNG_HD103SJS246J9GB303707-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug 27 20:47 scsi-SATA_SAMSUNG_HD103SJS246J9GB303707-part2 -> ../../sdb2
it doesn't tell you which SATA port;
But it does tell you the drive id.
The same number is also printed on a label of the hard disk.

This should help you find the correct disk.
Post Reply