Re: add disk/partition to softRaid5

From: John-Paul Stewart (jpstewart_at_binaryfoundry.ca)
Date: 05/21/05


Date: Sat, 21 May 2005 10:51:20 -0400

Carsten Menke wrote:
> Hi there,
>
> I am trying to add a partition to a 3 disk RAID5 device by using
> raidreconf and after the procedure which I describe below the filesystem
> is in a complete mess and e2fsck crashes with a segmentation fault and
> up to now I do nit figure out what I am doing wrong.
[snip]
> #!/bin/sh
> umount /mnt/raid
> raidstop /dev/md0
> cp -f /etc/raidtab1 /etc/raidtab
> fdisk /dev/sdc <myraid.fdisk
> mkraid -R /dev/md0
> raidstart /dev/md0
> sleep 5
> cat /proc/mdstat
> while grep = /proc/mdstat ; do
> sleep 2
> done
> cat /proc/mdstat
> mkfs -t ext3 /dev/md0
> mount /dev/md0 /mnt/raid
> cp /var/tmp/dump/* /mnt/raid
> umount /mnt/raid
> fsck -f /dev/md0
> raidstop /dev/md0
> cp -f /etc/raidtab /etc/raidtab.old
> cp -f /etc/raidtab.new /etc/raidtab
> raidreconf -o /etc/raidtab.old -n /etc/raidtab -m /dev/md0
> sleep 2
> cat /proc/mdstat
> while grep = /proc/mdstat ; do
> sleep 2
> done
> cat /proc/mdstat

OK. After you did the raidreconf command, if it worked, you'd then have
a larger array, but the ext3 filesystem on it is still the same size as
before. At a minimum, I expect you'll need to re-size the filesystem to
match the size of the new array. See the manpage for resize2fs for details.

Please also note the warnings in the raidreconf manpage. Resizing the
filesystem is no guarantee that things will work out either. From what
I've read about resizing software RAID-5 arrays, I wouldn't be too
surprised if this doesn't work out at all.



Relevant Pages

  • Re: limits on raid
    ... I'm trying to build a 45x750G array and want to experiment with the ... I think the unwritten bit is easier than you think, you only need it on parity blocks for RAID5, not on data blocks. ... don't know if it has) is that since the filesystem an raid are integrated into one layer they can optimize the case where files are being written onto unallocated space and instead of reading blocks from disk to calculate the parity they could just put zeros in the unallocated space, potentially speeding up the system by reducing the amount of disk I/O. ...
    (Linux-Kernel)
  • Re: limits on raid
    ... I'm trying to build a 45x750G array and want to experiment with the ... calculate the parity they could just put zeros in the unallocated space, ... But the raid doesn't need to be tightly integrated ... into the filesystem to achieve this. ...
    (Linux-Kernel)
  • Problems with mounting RAID5 array at boot
    ... mount a RAID5 array on four drives with some existing data. ... The superblock could not be read or does not describe a correct ext2 ... filesystem, ... Now here I can type control-D to boot up normally or enter the root ...
    (Debian-User)
  • Re: Loading modules
    ... > I`m trying to get a driver module for my HighPoint hpt372 raid card to ... > but once given a path can load it. ... > automatically be loaded after the filesystem has come up. ... Can you pre-compile in support for the RAID array? ...
    (comp.os.linux.hardware)
  • Re: making a huge fileserver
    ... You can, in theory, expand a software array and expand the filesystem ... problem is getting the tape backup unit. ... The equipment was an older Dell PowerEdge 2600 and 300GB SCSI drives ...
    (Debian-User)