Re: mdadm Raid Management - Assigning Hot Spares

From: Brian E. Seppanen (seppanen_at_chartermi.net)
Date: 10/05/04


Date: Tue, 05 Oct 2004 15:06:39 -0400


John-Paul Stewart wrote:
> Brian E. Seppanen wrote:
>
>> Hi Folks:
>>
>> I've got the following configuration
>>
>> md11 raid 0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sdf1
>> md12 raid 0 /dev/sdj1 /dev/sdl1 /dev/sdm1 /dev/sdo1
>> md10 raid 1 /dev/md11 /dev/md12
>>
>> I have two spares that I want to assign to md10, but when I did the
>> following
>>
>> mdadm -Cv /dev/md10 -l1 -n2 /dev/md11 /dev/md12 -x2 /dev/sgi1 /dev/sdg1
>>
>> it created the raid1 configuration to use only 36GB the size of one of
>> the spare devices.
>
>
> Sure. RAID-1 arrays will be the size of the smallest component. Nothing
> unusual there.
>
>> If I leave out the spare devices the mirror gets created the appropriate
>> size.
>>
>> How do I create a hot spare configuration so that /dev/sdi1 and
>> /dev/sdg1 are assigned as hot spares for /dev/md10?
>
>
> If you want /dev/sdi1 and /dev/sdg1 to be spares for /dev/md10, you need
> to make sure they are at least as large as the components of /dev/md10
> (in this case, /dev/md11 and /dev/md12). Or you could possibly create
> another RAID-0 of /dev/sdi1 and /dev/sdg1 (as /dev/md13 or whatever) and
> use that as the hot spare. That way your spare will be larger and
> possibly a better match, size-wise.

Heh, thanks for the advice. The raid array I'm setting up, I
originally posted about in early March on how to get a Network Appliance
DS14 14*36GB drives array available for Linux. You were one of those
kind enough to respond at that time. 6 months later, after a long
hiatus and one moment of inspiration, I finally completed the majority
of the tasks. I'm now setting up the raid on the drives that are
available to me.

You probably don't care but I'll retell the story because I'm so damned
happy about making these drives useful to a good OS in whatever capacity
I deem useful. I have a Network Appliance DS14 Disk Shelf, that
consists of 14 36 GB drives, 10 Seagates, and 4 Fujitsu's. The device
is connected to an appliance device (netcache C6100) via a PCI qlogic
card.

Linux has the appropriate driver for the card, so I was able to see the
drives without any issues whatsoever, but making them usable to linux
was another problem. Each drive has a firmware specific to the Network
Appliance caching device that formats the blocksize to 520 bytes, rather
than the standard 512 bytes. So basically that was another block. I
found a seagate utility available at seagate.com called st that provides
options such as setting the blocksize to a different size. So I used
st against the raw scsi device such as
st -i /dev/sg1

to get information on the drive.

st -B 512 /dev/sg1 to set the blocksize to 512 bytes

st -C <highblock> from st -i /dev/sg1 output

st -F /dev/sg1 to low level format.

Once that was done, I had a 512 byte blocksize drive available to linux.
   The next problem was formatting and fdisking the drive.

After low level formatting all seagate drives, I rebooted, and then
linux showed the appropriate entries in /proc/partitions as far as the
major and minor numbers.

Some of the devices didn't exist in /dev so I had to mknod -m 660
/dev/sdo b <major> <minor>

fdisk /dev/sdo

error about partition table, write new partition table.

check out /proc/partitions
mknod -m 660 /dev/sdo1 b <major> <minor>

After repeating that ten times, once for each seagate drive I now have a
132GB Storage Array available to linux connected to a qlogic card.

And thanks for the help in getting me there.

Brian Seppanen



Relevant Pages

  • New System planning -- Summary
    ... >To build a system that to run Linux (probably Ubuntu or Kubuntu, ... > Flat Panel monitor, Make? ... You want huge hard drives with 16 MB buffers. ... Two fast 160 GB drives will work, but not RAID, one 250 MB drive is cheaper. ...
    (Ubuntu)
  • Re: newbie question <VERY_LONG>
    ... That's what the Linux Documentation Project is for. ... That's only because the original DOS used the name to identify the type ... >partition, unless it occupies the entire disk as a primary partition. ... When the box got updated to DOS 5, the drives ...
    (alt.os.linux.redhat)
  • Re: Why I am Still Using Windows
    ... > I am assuming you are talking Windows 2000 or better. ... present, 9 Linux distros. ... We're talking things like mount points, where drives suddenly ... Get everything running right, and make a backup, Install to a new ...
    (alt.os.linux.suse)
  • Re: New Computer Install
    ... Is it better to have a seperate hard drive for linux? ... boot from a floppy in modern versions such as SuSE 10.0 or will the boot ... handle single or multiple drives well with no problem. ... There is a slight advantage I suppose in having two hard drives in ...
    (alt.os.linux)
  • Re: problems with the permissions for /mnt/windows parition
    ... >> mount, which obviously means he has totoal control over it. ... built from the ground up for personal desktops, and as linux lovies will ... that'll give you a list of the drives which the os can see. ... If you want to write to the win disk, you mite try being root. ...
    (alt.linux)

Loading