LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-20-2011, 08:13 PM   #1
jtag
Member
 
Registered: Aug 2008
Posts: 33

Rep: Reputation: 0
software raid (mirror); mount partition


I have a Ubuntu linux software raid (mirror) md0 of sda1 and sdb1. My sda1 is bad. How can I mount only sdb1? I cant mount sdb1 since initially was declared as raid and not as ext3.
 
Old 04-20-2011, 09:31 PM   #2
jason_not
Member
 
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76

Rep: Reputation: 19
Hello,

Have a look at the mdadm man page, in the "Manage" section. Something like:

mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1

After this, you should (I think) be able to mount /dev/md0 if you need to.

once you replace the device, (or if you have another disk already to replace it) you should be able to run
mdadm /dev/md0 --add /dev/<devicename>

Hope this helps...

--jason
 
1 members found this post helpful.
Old 04-22-2011, 07:21 PM   #3
jtag
Member
 
Registered: Aug 2008
Posts: 33

Original Poster
Rep: Reputation: 0
I stooped sdb4 from array using graphical interface "Disk Utility". Then:

sudo mkdir /mnt/sdb4
sudo mount /dev/sdb4 /mnt/sdb4
mount: unknown filesystem type 'linux_raid_member'

----------

sudo mount /dev/md1 /mnt/sdb4
mount: you must specify the filesystem type
 
Old 04-23-2011, 12:26 AM   #4
jason_not
Member
 
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76

Rep: Reputation: 19
Hi There,

I am not sure how /dev/sdb4 came about, or /dev/md1. Did you mean /dev/sdb1 as in your original post? I will assume such...

Look at the contents of /proc/mdstat. The file will show every /dev/md* array, and the partitions that make them up. On your system, I would expect to see something showing /dev/md0 as being active raid1, and composed of sdb1 and sda1. If you don't see any md* devices listed, or there is no /proc/mdstat file, maybe your system hasn't loaded the appropriate module.

You will not be able to directly mount a partition that was once part of an array. You must remove the bad partition from the array, then mount the array again. You can't remove the good partition and expect to mount it separately from the array. When you get the error unknown filesytem type "linux raid member", that actually is what the partition manager is saying about the partition signature. This partition is only accessible through the software raid manager.

If I go back to your original post, and my original answer, once you break the bad /dev/sda1 partition away from the array, you should still be able to mount /dev/md0 with only the one partition in it. It will be mounted in degraded mode, but it should be there. Fortunately, you can do that since you used mirroring.

I have never used the gui disk utility tool, so I don't know how well it runs. Most gui tools though don't fully implement all disk tools: that's why I have only used the command line tools.

For more details, please look at the following page: http://tldp.org/HOWTO/Software-RAID-HOWTO.html
 
1 members found this post helpful.
Old 05-08-2011, 07:09 PM   #5
jtag
Member
 
Registered: Aug 2008
Posts: 33

Original Poster
Rep: Reputation: 0
Worked,
I removed the raid from graphical interface (then the file /proc/mdstat was almost empty); then I mounted "sudo mount -t ext4 /dev/sdb4 /mnt/sdb4/" (sorry initially I mentioned sdb1; however)
 
  


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
Help with software mirror (Raid) setup in startup drummer54 Linux - Newbie 2 03-24-2009 11:46 PM
Setting up 4 drives. 2 as 1 partition and other 2 as RAID mirror driv-crazy Linux - Hardware 6 11-13-2008 04:21 PM
Creating software mirror raid during installation hq4ever Fedora 1 02-21-2006 09:09 AM
Recovering Software RAID Mirror rootking Linux - Software 1 11-01-2004 07:32 PM
software raid/mirror in MDK 9.1? basicaccess Mandriva 2 09-19-2003 04:03 AM

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

All times are GMT -5. The time now is 02:15 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
Open Source Consulting | Domain Registration