LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-18-2013, 03: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 04:02 AM.
 
Old 09-18-2013, 06:24 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 04: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, 05:13 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 09: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, 09:34 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 10: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, 12:35 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 01: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, 02:22 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I'm afraid you would need to check it several times. Probably that bad block "moves" (will reappear several times)...
 
Old 09-27-2013, 06: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, 06:07 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you may try external power supply (strong enough) to check it - or usb hub?
 
Old 09-27-2013, 06: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, 05: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, 07:12 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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



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

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

All times are GMT -5. The time now is 08:15 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