LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 08-18-2009, 12:43 PM   #1
albengy
LQ Newbie
 
Registered: Aug 2009
Posts: 1
Thanked: 0
reconnect raid5 device after reinstall ubuntu server


[Log in to get rid of this advertisement]
Hi all,

I created a soft raid5 array (4 hard drives) in ubuntu 9.04 server and wanted to test if my server crashes due to hardware failure (I use an old computer as a file server) I can reuse the raid device after reinstall the ubuntu server back on, but I've been having troubling getting the raid5 device, /dev/md0 to mount and recover the data back. I'd like to make sure I can recover the data before I commit to add more important data to the raid5 array. Any expert in mdadm please help.

I create raid5 using mdada:

sudo mdadm –create –verbose /dev/md0 –level=5 –raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde

and I did format the partition:

sudo mkfs -t ext3 /dev/md0

created a mount point:

mkdir /media/samba

and edit fstab:

sudo edit /etc/fstab with following line

/dev/md0 /media/samba ext3 defaults 0 3

Now the raid5 device works fine in the current environment. But I wanted to make sure when the server crash due to hardware problem and I have to reinstall the server again, I'd be able to recover the data from the raid5 array, but I have been stuck here. Everytime I try to reinstall server, either Ubuntu server 8.10 or Ubuntu 9.04 server, I can assemble the array:

sudo mdadm --assemble --scan


and I got this added to the /etc/mdadm/mdadm.conf
ARRAY /dev/md0 level=raid5 num-devices=4 UUID=15181fa0:e0b47e28:b62cfa25:81e9a18b

which is the the correct UUID. However, I can't mount the array, it says mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

unless I format the raid5 array again, then it let me mount the device, but that mean I'd loose all my data. Would anyone who has experience with this like to share their knowledge?

Thanks,
Albert

Last edited by albengy; 08-18-2009 at 12:45 PM..
albengy is offline  
Tag This Post , ,
Reply With Quote
Old 10-18-2009, 07:31 PM   #2
Raum the Old
LQ Newbie
 
Registered: Jul 2008
Location: Southern California
Distribution: Debian, Ubuntu, FreeBSD
Posts: 19
Thanked: 5
What is the mount command you are trying to use?
linuxdebian Raum the Old is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
HDD crash on RAID5 in Ubuntu Server 8.10 DarkFlame Linux - Server 12 09-11-2009 07:09 PM
mandriva - wlan does not reconnect if server stops for a while. Have to reinstall ma ollickle Linux - Wireless Networking 7 03-16-2009 06:49 AM
RAID5 for root device in FC5 2.6.20? hsugawar Fedora 1 10-09-2008 02:49 PM
Trying to create a raid5 array in ubuntu, ubuntu crashes. randknu Ubuntu 3 02-27-2008 01:00 PM
Raid5 Recovery Help on Embedded-Linux NAS Device phyros Linux - General 1 06-09-2007 10:35 PM


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

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration