LinuxQuestions.org
Visit Jeremy's Blog.
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 09-18-2013, 04:54 AM   #1
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Rep: Reputation: 0
Recurring input/output error on my network HD


Hello,

As the title says, my network hard drive (ext4) that I use for storage keeps on having input/output errors. Usually a reboot or applying fsck to restore the journal fixes it, but then the problem just returns a coupe of days later. The drive is shared via NFS and Samba. Does anybody have a clue as to what might be the cause of these recurring glitches?

EDIT: The HD is new, only two months old.

BR

Last edited by LightSeeker; 09-18-2013 at 05:02 AM.
 
Old 09-18-2013, 07:24 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
That a HDD is new does not mean that it is error free. I recommend to test it using the manufacturer's diagnosis tool.
 
Old 09-24-2013, 05:44 AM   #3
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
Are there any other reasons, beside a Hard drive failure as to why a journal of an ext4 formatted drive would keep getting corrupted every couple of days? I have my home server to automatically shut down and then reboot every day to save power and the drive is connected via USB,
 
Old 09-24-2013, 06:13 AM   #4
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,149

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
you can probably - shut down the server without allowing the external drive to save cached data. Probably power is lost for a few seconds. You may need to force "safely remove" that drive before reboot.
By the way why do you want to reboot that host? It is quite unusual.
 
Old 09-24-2013, 10:12 AM   #5
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
Thank you for your answer. How can I safely remove it? When I try to unmount it (even with force or lazy unmount) it always just says that the resource is busy. I tried checking the processes tied to it (I think it was lsof), but it was all very confusing (now when I have a problem, I just unplug the disk, plug it back in and do the fsck, then reboot).

I use rtcwake to shutdown, with sleep set to 2 seconds - perhaps it would be better to give it some more time? Or should I do something else?

I power it down in the middle of the night and turn it back on in the early morning. Since this is a home server, nobody is using it in those hours, so I turn it off to save on electricity.
 
Old 09-24-2013, 10:34 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Shutting the machine down should safely unmount the partitions on the disk, while unplugging when mounted is a good way to get data and/or filesystem corruption. Do you really power down the machine or is this some kind of suspend/standby?
 
Old 09-24-2013, 11:43 AM   #7
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
Yes you are right, but I didn't know what else to do really, when I couldn't unmount it remotely. It would probably be doable if I would hook the server up to a monitor then try to unmount it in the file manager. But that's quite a hassle, since I have to unplug a monitor from my computer and carry it to the other end of the house, then hook it up and run a desktop environment etc.

Here is the output of my rctwake script:

#! /bin/sh
t=`date -d "06:10" +%s`
sudo /bin/true
sudo rtcwake -u -t $t -m on &
sleep 2
sudo shutdown -h 0

This script is then put in crontab and runs at a quarter to two AM.
 
Old 09-25-2013, 01:35 AM   #8
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,149

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
Yes, in general shutdown should work, but in your case probably an explicit umount (or eject?) and a sleep afterwards may help. you can insert it into that script.
Have you checked the state of your disk?
 
Old 09-25-2013, 02:33 AM   #9
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
I did run some checks on it with fsck -c but because the size of the disk is 3TB, the check would last 25 hours, when connected through the USB, so I always interrupted it prematurely (I needed to access the data). When exited it said it fixed a bad block and that was it.
 
Old 09-25-2013, 03:22 AM   #10
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,149

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
I'm afraid you would need to check it several times. Probably that bad block "moves" (will reappear several times)...
 
Old 09-27-2013, 07:03 AM   #11
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
I'm going to run fsck -vcck today to check for badblocks and let it run until completion (until tomorrow probably it's a 3 TB drive). I was also told that the input/output errors might be connected to the fact, that this is an external Hard drive that is connected to the computer via USB – because of fluctuations in power supply that the computer sends through, this might have something to do with the drive continually loosing journal information which then needs to be recovered. Is there any basis to this claim?
 
Old 09-27-2013, 07:07 AM   #12
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,149

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
you may try external power supply (strong enough) to check it - or usb hub?
 
Old 09-27-2013, 07:45 AM   #13
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
Hmmm, 'll go to my local store and check out those USB bays that use DC power, might be a good idea.
 
Old 09-28-2013, 06:26 AM   #14
LightSeeker
Member
 
Registered: Nov 2007
Distribution: Manjaro, Win7
Posts: 41

Original Poster
Rep: Reputation: 0
I went to the store and asked about the USB port that would have it's own power supply. The salesman said that he can order it, but after hearing that I have a problem with my disk that has an USB 3 output (I connect that to USB 2 on my computer), he said that it probably won't help much with regards to power supply and that a lot of people have had problems with the usb 3 based disks.

I'm confused now, I must admit WIll getting a usb port that has it's own power mean a steadier supply of power to the hard drive or not? Or should I maybe start thinking about getting a new enclosure to put the drive in that will have it's own power supply?

I tried to run a fsck test, but it just kept getting slower and slower and this morning, after more than 22 hours it was just at 20 %. Interrupted it.
 
Old 09-28-2013, 08:12 AM   #15
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,149

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
what about your nfs and samba cache? Probably you can turn off all the caches (that will slow down the access but probably will avoid corruption.
I do not know if a new enclosure is cheaper (or an usb port with power supply).
You can try also another usb port (of your pc), probably you can try to use an usb2 port (maybe it is only available on the motherboard).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Error fsyncing/closing/dev/sda: Input/output error Petalocsta Linux - Laptop and Netbook 2 11-07-2011 06:40 PM
aplay: pcm_write:1029: write error: Input/output error mimithebrain Linux - Software 2 12-04-2007 12:51 PM
k3b write error for dvd's (input/output) error mocean Suse/Novell 3 06-27-2007 03:39 PM
RPM iinstallation [error: failed to stat /mnt/windows: Input/output error] Ameii83 Linux - Software 1 04-09-2007 08:05 AM
cp - error reading /mnt/cdrom/mpegav/avseq01.dat input/output error manishsingh4u Linux - General 2 10-17-2005 06:02 AM


All times are GMT -5. The time now is 11:41 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration