LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2009, 08:35 AM   #1
aclhkaclhk
Member
 
Registered: Mar 2009
Posts: 54

Rep: Reputation: 15
software raid - read only filesystem


I am using centos 5.1 for setting up raid 1 software raid using 2 seagate 500g hdd.

after running for several months, the filesystem becomes readonly. all system services such as httpd fails. Even creating a new file is impossible.

Below is the result of some commands. pls advise.

[root@localhost ~]# mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Wed Dec 24 23:14:24 2008
Raid Level : raid1
Array Size : 471997632 (450.13 GiB 483.33 GB)
Used Dev Size : 471997632 (450.13 GiB 483.33 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Thu Mar 19 11:57:40 2009
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 1
Spare Devices : 0

UUID : b7974505:46381e1b:6f332600:70eecbe8
Events : 0.2138762

Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 0 0 1 removed

2 8 17 - faulty spare /dev/sdb1

[root@localhost ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb2[2](F) sda2[0]
16386176 blocks [2/1] [U_]

md0 : active raid1 sdb1[2](F) sda1[0]
471997632 blocks [2/1] [U_]

unused devices: <none>
 
Old 03-20-2009, 12:55 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Reading /proc/mdstat it says that you have 2 raid devices, md0, md1. Each has a partition from sda and sdb. sdb has died (specifically sdb2), see also last line of

mdadm --detail /dev/md0.
.
.
2 8 17 - faulty spare /dev/sdb1


You'll get similar output from mdadm --detail /dev/md1.

Get a backup ASAP and either replace sdb, or run fdisk sdb (good luck).
 
Old 03-23-2009, 10:01 PM   #3
aclhkaclhk
Member
 
Registered: Mar 2009
Posts: 54

Original Poster
Rep: Reputation: 15
I realised that sdb is faulty but sda is ok. the whole system is nearly unusable as the filesystem is readonly.

eg. i type
root> touch a.txt
touch: cannot touch `a': Read-only file system

it is a software raid. if sda is ok, the system should be normal. otherwise, sw raid is not stable enough for production use.

pls kindly advise.
 
Old 03-23-2009, 11:43 PM   #4
vindoan
LQ Newbie
 
Registered: Mar 2009
Posts: 23

Rep: Reputation: 17
Some information on recovering linux soft raid can be found at http://wpkg.org/Software_RAID_in_Linux

Your filesystem maybe marked read only, until you do an fsck. Boot to single user mode. The way to boot into single user mode, will depend on your Linux distribution.

After booting into single user mode, do a file system check on the partition. Unmount the partition if, its mounted.

umount /mnt/yourmountpoint

Then do a filesystem check

fsck /dev/sda1
fsck /dev/sdb1

If you're paranoid, you can remove the drive from the computer and put it in another computer to do the fsck.
 
  


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
Existing LVM filesystem to software RAID 0 (mirroring) hellowe Linux - Server 8 11-25-2009 07:28 AM
How can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 04:31 AM
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 05:21 AM
Extremely slow disk read access software raid 5 Magsimoe Linux - Software 2 12-18-2006 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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