USB RAID 5 Problem on Joli OS 1.2 (Ubuntu) using mdadm


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users USB RAID 5 Problem on Joli OS 1.2 (Ubuntu) using mdadm
# 1  
Old 09-26-2012
USB RAID 5 Problem on Joli OS 1.2 (Ubuntu) using mdadm

Hi All,

I have been trying to create a USB RAID 5 using mdadm tool on Joli OS 1.2 (Ubuntu) but with no luck. I cannot even get pass the creation of array device (/dev/md0) and superblock. I am using 3 USB keys (2 16.4 GB kingston and 1 16GB sandisk).

My steps are:

root@gokopjolicloud:/home/gokop/RAID# mknod /dev/md0 b 9 0
root@gokopjolicloud:/home/gokop/RAID# mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sd[bcd]1 --auto=md
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 64K
mdadm: Cannot open /dev/sdb1: Device or resource busy
mdadm: Cannot open /dev/sdc1: Device or resource busy
mdadm: Cannot open /dev/sdd1: Device or resource busy
mdadm: create aborted
root@gokopjolicloud:/home/gokop/RAID# mdadm --examine /dev/md0
mdadm: No md superblock detected on /dev/md0.
root@gokopjolicloud:/home/gokop/RAID# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
unused devices: <none>

I have googled a lot with suggestions to change boot loader parameters to "nodmraid" , etc but with no luck. Any one any solutions?

Kind regards
Powell
# 2  
Old 09-26-2012
Are /dev/sd[bcd]1 already mounted anywhere? If so, unmount them.

Then:
Code:
# mdadm --create /dev/md0 --verbose --level=5 --raid-devices=3 /dev/sd[bcd]1

Udev will take care of creating /dev/md0 if it doesn't exist, you don't need to use mknod.
--
Bye
# 3  
Old 09-26-2012
Hi Lem,
Thanks so much. I did not mount them, however I just unmounted them as you said and there was very good progress. Though it does not seem to complete the array creation as there is a problem with one or 2 disks [UU_].

See outputs below:

root@gokopjolicloud:~# umount /dev/sdb1
root@gokopjolicloud:~# umount /dev/sdc1
root@gokopjolicloud:~# umount /dev/sdd1
root@gokopjolicloud:~# mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sd[bcd]1 --auto=md
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 64K
mdadm: size set to 15633280K
mdadm: largest drive (/dev/sdb1) exceed size (15633280K) by more than 1%
Continue creating array? y
mdadm: array /dev/md0 started.
root@gokopjolicloud:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sdd1[3] sdc1[1] sdb1[0]
31266560 blocks level 5, 64k chunk, algorithm 2 [3/2] [UU_]
[>....................] recovery = 0.1% (23520/15633280) finish=534.0min speed=486K/sec
unused devices: <none>
You have mail in /var/mail/root
root@gokopjolicloud:~# mdadm --examine /dev/md0
mdadm: No md superblock detected on /dev/md0.
root@gokopjolicloud:~# mdadm --detail /dev/md0
/dev/md0:
Version : 00.90
Creation Time : Wed Sep 26 16:05:30 2012
Raid Level : raid5
Array Size : 31266560 (29.82 GiB 32.02 GB)
Used Dev Size : 15633280 (14.91 GiB 16.01 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Wed Sep 26 16:05:33 2012
State : clean, degraded, recovering
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
Rebuild Status : 0% complete
UUID : 0e6fee1c:4a05e886:b1380be4:00007494 (local to host gokopjolicloud)
Events : 0.2
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
3 8 49 2 spare rebuilding /dev/sdd1

Regards
Powell
# 4  
Old 09-26-2012
This is normal. From the man of mdadm:

Quote:
When creating a RAID5 array, mdadm will automatically create a degraded
array with an extra spare drive. This is because building the spare
into a degraded array is in general faster than resyncing the parity on
a non-degraded, but not clean, array. This feature can be overridden
with the --force option.
If you're just testing, can I suggest you to use some superfast /dev/ram devices, instead of slow USB keys? Try creating /dev/dm1 as a RAID5 using /dev/ram[3456], for instance.
--
Bye
# 5  
Old 09-26-2012
Thanks so much for solving my problem. I will try your suggestions.
# 6  
Old 09-30-2012
Hi,
From:
Code:
root@gokopjolicloud:/home/gokop# mdadm --detail /dev/md0 
/dev/md0:
        Version : 00.90
  Creation Time : Wed Sep 26 16:05:30 2012
     Raid Level : raid5
     Array Size : 31266560 (29.82 GiB 32.02 GB)
  Used Dev Size : 15633280 (14.91 GiB 16.01 GB)
   Raid Devices : 3
  Total Devices : 3
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sun Sep 30 11:07:47 2012
          State : clean, degraded, recovering
 Active Devices : 2
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 64K

 Rebuild Status : 6% complete

           UUID : 0e6fee1c:4a05e886:b1380be4:00007494 (local to host gokopjolicloud)
         Events : 0.98

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       3       8       49        2      spare rebuilding   /dev/sdd1


Please if I remove one of the active disks (/devsdb1 or /dev/sdc1), how can I reconstruct the data. I have saved a file on /dev/md0. Or if i remove the degraded spare /dev/sdd1, what happens? I want to test how to reconstruct my data when any of the 3 raid5 disks is removed (a scenario for a failed disk)

Regards
Powell
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to fix mistake on raid: mdadm create instead of assemble?

Hi guys, I'm new to RAID although I've had a server running raid5 for a while. It was delivered preinstalled like this and I never really wondered how to monitor and maintain it. This quick introduction just to let you understand why I'm such an idiot asking such a silly question. Now what... (0 Replies)
Discussion started by: chebarbudo
0 Replies

2. Ubuntu

Installing UBUNTU on USB stick

I'd like to install the OS on my stick. I would like to be able to save my works there and install apps or customize the OS. What can I do Ps. At home I use an iMac, but in the school where I work there are only PC... Ty (2 Replies)
Discussion started by: Fabio_Puricelli
2 Replies

3. Ubuntu

Copy existing Ubuntu to boot from USB

Hello all, I am looking for a way to copy the existing Ubuntu server 12.04 to a USB (with all the packages and such) and make it boot from the USB. I have seen other threads about copying the CD image to the USB, which is not exactly I am looking for. Before I start diving into anything I... (4 Replies)
Discussion started by: br1an
4 Replies

4. Ubuntu

[SOLVED] Dual boot Windows 7 and Ubuntu on USB

I am trying to dual boot on an external USB 500GB drive using my laptop.I have Windows 7 installed and booting on 1st partition 230GB now as active primary, 2nd partition is 100GB as primary, and 3rd partition is 135GB as primary. I was intending on installing Ubuntu onto the 2nd partition. I read... (12 Replies)
Discussion started by: coolecho
12 Replies

5. Ubuntu

How to implement TIOCOUTQ for USB modem on Linux Ubuntu

Hi, I need to override ioctl operation for a few USB drivers (sierra, option, cdc-acm) on Linux Ubuntu 2.6.34sb2 to support TIOCOUTQ command. Unfortunately, none of the drivers I mentioned above support TIOCOUTQ because it seems unclear to know amount of data inside a modem. Does Linux... (12 Replies)
Discussion started by: SDoroshenko
12 Replies

6. Hardware

Problem with External Raid Controller.

Hi, We have a Sunfire 4150 with On-Board Internal Raid Controller connected to 4 X 146 GB SAS disks. This also has an External Raid Controller (Storagetek Eight-Port, External HBA Model SG-XPCIESAS-R-EXT-Z) connected to a JBOD array ( Storagetek XTA2530 ) which has 5 X 300 GB Hard disk. ... (1 Reply)
Discussion started by: ranjansukumar
1 Replies

7. Solaris

Raid problem on T2000

Hi all, First post so be gentile :) It's my first time installing Solaris on T2000 server. I have 2 72GB HD's on it. After configuring HW raid and running raidctl command I get this output: bash-3.00# raidctl -l c0t0d0 Volume Size Stripe Status Cache RAID ... (2 Replies)
Discussion started by: Obi-Wan
2 Replies

8. Ubuntu

Ubuntu on USB stick?

Hey Guys I have an Ubuntu CD and I was thinking of creating like a bootable hard drive with various OS so that I can just boot OSs with t drive and not require the CDs. I was just wondering is there a way I can do this, like have Ubuntu boot from a USB stick? If yes how is that possible(even if I... (3 Replies)
Discussion started by: rbansal2
3 Replies

9. Filesystems, Disks and Memory

RAID Problem on SUSE 11.0

I setup a RAID 5 with 5 drives, one failed, hardware failure so I physically removed it from the raid after powering the machine off then powered it back on and my raid was still good but no 5th drive. I built a 5th drive from scratch and added it in the raid thinking the raid would go into... (0 Replies)
Discussion started by: lacakid
0 Replies
Login or Register to Ask a Question