Sponsored Content
Top Forums Shell Programming and Scripting RAID setup automation problem Post 302232997 by alirezan on Friday 5th of September 2008 06:58:25 PM
Old 09-05-2008
RAID setup automation problem

Hi guys,

I'm trying to write a small script that sets up RAID using MDADM without asking user for any input.
Here's what I'm doing:
Code:
start=`mdadm --create $2 --level=$3 --raid-devices=$4 $5 $6 <<  MAYDAY
y
MAYDAY`

When I it, I get this
Code:
./redundancy -setup /dev/md0 1 2 /dev/files/test0 /dev/files/test1

MDADM Module successfully loaded. Starting the RAID Array.
mdadm: /dev/files/test0 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Thu Aug 28 18:56:33 2008
mdadm: /dev/files/test1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Thu Aug 28 18:56:33 2008
Continue creating array? Continue creating array? (y/n) Continue creating array? (y/n) mdadm: create aborted.

Can someone help me fix this please?
Thank you
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

2-Ch RAID Problem in SCO Open Server

Help, if possible. In SCO Open Server with installation of two-channel RAID controller the following happens: on the channel 0 disk array is seen by an operational system, and on the channel 1 array is not seen (simultaneously). That is the operational system can not simultaneously use more than... (1 Reply)
Discussion started by: pko60
1 Replies

2. Filesystems, Disks and Memory

Problem replace disk with RAID-5 volumes

Good morning, I have a problem replacing a disk with raid-5 volumes. An hardware error was occurred from a disk c9t3 so all slices were in maintenace. Every slice is part of a raid-5 volume. Any replica is present. Following Volume manager manual for replacing a disk, I have: - phisically... (0 Replies)
Discussion started by: bonovox
0 Replies

3. Solaris

Hardware Raid related problem

Dear All I would Like to know that if suppose c1t0d0 is of 72 gb hard disk and system boot from this hard disk and c1t1d0 is of 147gb hard disk. Can we implement hardware raid (Mirror) between these two hard disks of different capacity if raid crontroller is present in the server Kind regards (4 Replies)
Discussion started by: girish.batra
4 Replies

4. Solaris

How to setup hardware RAID on a T2000

Hello all We've just bought a T2000. It has two disks and I'm trying to figure out how to create a mirror of the boot disk. I understand that I have to boot into single user mode from DVD and then use the raidctl command to set up the mirror and label the volume afterwards. Format returns... (4 Replies)
Discussion started by: soliberus
4 Replies

5. Shell Programming and Scripting

korn shell automation problem!

I got the task writting Korn Shell script to automate the tuxedo login so that users neednot have to enter options manually. I have done that using expect tool from the Unix but my manger told me its not secure so you have to do that using Kornshell without using Expect. Here is the way to login to... (0 Replies)
Discussion started by: pareshan
0 Replies

6. 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

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. 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

9. UNIX for Advanced & Expert Users

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: ... (5 Replies)
Discussion started by: powelltallen
5 Replies

10. UNIX for Dummies Questions & Answers

Help with RAID setup...

Hi All, Quick question on the RAID. I have a Dell server with 27 hard drives. Two hard ware controller cards. Boot disks will be mirrored. That leaves us with 25 disks. I need to configure that as Raid 5. On the Boot disk, already installed RHEL 6. How do I make the 25 disks as RAID 5? ... (2 Replies)
Discussion started by: samnyc
2 Replies
raidstart(8)						      System Manager's Manual						      raidstart(8)

NAME
raidstart, raidstop, - command set to manage md devices. SYNOPSIS
raidstart [options] <raiddevice>* raidstop [options] <raiddevice>* DESCRIPTION
RAID devices are virtual devices created from two or more real block devices. This allows multiple disks to be combined into a single filesystem, possibly with automated backup and recovery. Linux RAID devices are implemented through the md device driver. If you're using the /proc filesystem, /proc/mdstat gives you informations about md devices status. Currently, Linux supports linear md devices, RAID0 (striping), RAID1 (mirrroring), and RAID4 and RAID5. For information on the various lev- els of RAID, check out: http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/ for new releases of the RAID driver check out: ftp://ftp.fi.kernel.org/pub/linux/daemons/raid/alpha Avaible commands are : mkraid : configures (creates) md (RAID) devices in the kernel, banding multiple devices into one. raidstart : activates (starts) an existing 'persistent' md device raid0run : activates old nonpersistent RAID0/LINEAR md devices raidstop : turns off an md device, and unconfigures (stops) it By default, a systems RAID configuration is kept in /etc/raidtab, which can configure multiple RAID devices. All of these tools work similiarly. If -a (or --all) is specified, the specified operation is performed on all of the RAID devices men- tioned in the configuration file. Otherwise, one or more RAID devices must be specified on the command line. For example: raid0run -a Starts all of the 'old' RAID0 RAID devices specified in /etc/raidtab. If only /dev/md1 should be started, the following command should be used instead: raidstart /dev/md1 OPTIONS
-a, --all Apply the command to all of the configurations specified in the config file. -c, --configfile filename Use filename as the configuration file (/etc/raidtab is used by default). -h, --help Displays a short usage message, then exits. -V, --version Displays a short version message, then exits. NOTES
The raidtools are derived from the md-tools and raidtools packages, which were originally written by Marc Zyngier, Miguel de Icaza, Gadi Oxman, Bradley Ward Allen, and Ingo Molnar. BUGS
no known bugs. SEE ALSO
raidtab(5), raid0run(8), raidstop(8), mkraid(8) raidstart(8)
All times are GMT -4. The time now is 05:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy