LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Seagate External HDD getting unmounted after certain period of inactivity (https://www.linuxquestions.org/questions/linux-newbie-8/seagate-external-hdd-getting-unmounted-after-certain-period-of-inactivity-775525/)

kosys 12-14-2009 05:42 AM

Seagate External HDD getting unmounted after certain period of inactivity
 
Hi All,

This is an external HDD(500 GB) Seagate(Freeagent go), OS is RHEL 5.3.
This external HDD has two primary partitions:

Disk /dev/sda: 500.1 GB, 500107860992 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 83 Linux
/dev/sda2 30402 60801 244188000 83 Linux


Now everytime I'm mounting the hard disk, after certain period of inactivity, its getting unmounted and then remounted in 'Read only' mode. Say, 1 or 2 minutes after mounting in read-write mode, whenever I'm trying to copy some files to HDD, its giving the following error:

[root@demo ~]# tar -zcvf /webb1/test.txt test_bkp/
tar: /webb1/test.txt: Cannot open: Read-only file system
tar: Error is not recoverable: exiting now
test_bkp/
test_bkp/test12009-12-08
test_bkp/stopERP
test_bkp/test3
test_bkp/startERP
test_bkp/test_bkp.log


Following is an excerpt of the /var/log/messages(when files are being copied to the external HDD):


Dec 11 11:14:40 demo kernel: sd 6:0:0:0: Device not ready: <6>: Current: sense k
ey: Not Ready
Dec 11 11:14:40 demo kernel: Add. Sense: Logical unit not ready, initializin
g command required
Dec 11 11:14:40 demo kernel:
Dec 11 11:14:40 demo kernel: end_request: I/O error, dev sda, sector 1052751
Dec 11 11:14:40 demo kernel: printk: 110 messages suppressed.
Dec 11 11:14:40 demo kernel: Buffer I/O error on device sda1, logical block 1315
86
Dec 11 11:14:40 demo kernel: lost page write due to I/O error on sda1
Dec 11 11:14:40 demo kernel: Aborting journal on device sda1.
Dec 11 11:15:07 demo kernel: ext3_abort called.
Dec 11 11:15:07 demo kernel: EXT3-fs error (device sda1): ext3_journal_start_sb:
Detected aborted journal
Dec 11 11:15:07 demo kernel: Remounting filesystem read-only
Dec 11 11:21:14 demo kernel: sd 6:0:0:0: Device not ready: <6>: Current: sense k
ey: Not Ready
Dec 11 11:21:14 demo kernel: Add. Sense: Logical unit not ready, initializin
g command required
Dec 11 11:21:14 demo kernel:
Dec 11 11:21:14 demo kernel: end_request: I/O error, dev sda, sector 489969049
Dec 11 11:21:14 demo kernel: Buffer I/O error on device sda2, logical block 1971
23
Dec 11 11:21:14 demo kernel: lost page write due to I/O error on sda2
Dec 11 11:21:14 demo kernel: Aborting journal on device sda2.
Dec 11 11:21:42 demo kernel: ext3_abort called.
Dec 11 11:21:42 demo kernel: EXT3-fs error (device sda2): ext3_journal_start_sb:
Detected aborted journal
Dec 11 11:21:42 demo kernel: Remounting filesystem read-only

Sometimes its also throwing the following error when giving 'ls -l' command:

# ls -l
ls: reading directory .: Input/output error
total 0

This is a serious issue.....if anyone can highlight as to where the problem lies......with the HDD or with the Kernel.......a suggestion is highly appreciable.

Thanks and Regards,
Kosys

AutoBot 12-14-2009 07:48 AM

It appears as if your drive is potentially going bad, run fsck.ext3 on it to make sure it isn't simply corruption.

michaelk 12-14-2009 09:18 AM

There is a known inactivity issue with freeagent drives and assume that this is the issue with your setup as well but had not seen any posts that the drive would remount.

http://news.softpedia.com/news/Worka...nt-73528.shtml
http://www.theinquirer.net/inquirer/...rkaround-linux

kosys 12-15-2009 01:14 AM

Hi AutoBot,

As suggested by you, I ran e2fsck:


# e2fsck /dev/sda
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

Then again I ran as given in the error message but it threw the same error:

# e2fsck -b 8193 /dev/sda
e2fsck 1.39 (29-May-2006)
e2fsck: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>




Quote:

Originally Posted by AutoBot (Post 3790893)
It appears as if your drive is potentially going bad, run fsck.ext3 on it to make sure it isn't simply corruption.


michaelk 12-15-2009 10:59 AM

Quote:

e2fsck /dev/sda
You need to specify a partition ID i.e. sda1 or sda2.

kosys 12-15-2009 11:04 PM

Hi Michael,

Following are the activities I did:

# fsck.ext3 /dev/sda1
e2fsck 1.39 (29-May-2006)
/dev/sda1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 14/30539776 files (7.1% non-contiguous), 9636758/61049000 blocks


# fsck.ext3 /dev/sda2
e2fsck 1.39 (29-May-2006)
/dev/sda2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda2: 14/30583008 files (7.1% non-contiguous), 7333373/61046784 blocks

But still the issue exists. Please help.......

Regards,
Kosys


Quote:

Originally Posted by michaelk (Post 3792428)
You need to specify a partition ID i.e. sda1 or sda2.


michaelk 12-16-2009 08:04 AM

Have you tried disabling the drive's power saving feature?

kosys 12-16-2009 11:44 PM

Hi Michael,

Thanks for your response. May I know how to disable the drive's power saving feature?

Also can you tell me why you are suggesting so? How would this help?

Thanks once again,
Kosys

Quote:

Originally Posted by michaelk (Post 3793659)
Have you tried disabling the drive's power saving feature?


michaelk 12-17-2009 11:39 AM

Quote:

Originally Posted by kosys (Post 3794792)
Hi Michael,

Thanks for your response. May I know how to disable the drive's power saving feature?

Also can you tell me why you are suggesting so? How would this help?

Did you read the links I posted?


All times are GMT -5. The time now is 07:11 PM.