[plug] Don't do that!

Brad Campbell brad at wasp.net.au
Thu Sep 16 12:10:03 WST 2004


Bernd Felsche wrote:
> building a filesystem on them. I'm not mirroring swap, instead
> assigning equal-priority swap partitions on both drives and letting
> the kernel handle the striping.

Why not? You go to the trouble of mirroring all the data, but if you lose a disk with some allocated 
swap space on it the machine *will* die a horrid death.

> I ended up with four filesystems on RAID1, /, /var, /home and /srv. 
> 6GB, 10GB, 10GB and 30GB respectively.  The rest of the space from
> the two '80GB' discs has been allocated to /scratch, unmirrored and
> under LVM.
> 
> Once I started installation, booting off a USB stick and using media
> on the server, I noted the error of my ways.  Each md driver
> commenced mirror recovery to the second drive.  Fortunately, the
> drivers noticed that they were about to collide on the bus and
> kindly waited for another to complete.  There was no deadly embrace
> so it all sort of worked; very slowly; over 10 hours!

If you mark one disk as removed then add the partitions manually that won't happen and it will 
sequence the rebuilds.

> Load averages were in excess of 6 with 98% IO wait.
> 
> In part, that's due to the single IDE channel with master and slave
> mirroring.

Oooh. What happens if one drive dies and takes out the IDE channel? (Not an unheard of occurence 
with IDE disks).

In addition, by using a single IDE channel you significantly knobble the IO on the machine as all 
writes are duplicated and have to contend for the one channel.

Just a few comments from personal experience with exactly this configuration.

Regards,
Brad


gateway:~# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hdc1[1] hda1[0]
       2104384 blocks [2/2] [UU]

md1 : active raid1 hdc2[1] hda2[0]
       530048 blocks [2/2] [UU]

md2 : active raid1 hdc3[1] hda3[0]
       2104448 blocks [2/2] [UU]

md3 : active raid1 hdc4[1] hda4[0]
       112478976 blocks [2/2] [UU]

unused devices: <none>
gateway:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              2.0G  1.8G  151M  93% /
/dev/md2              2.0G  1.9G   56M  98% /var/spool/squid
/dev/md3              106G   92G  8.3G  92% /server
gateway:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/dev/md0        /               ext3    errors=remount-ro       0       1
/dev/md1        none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
/dev/fd0        /floppy         auto    user,noauto             0       0
/dev/cdrom      /cdrom          iso9660 ro,user,noauto          0       0
/dev/md2        /var/spool/squid ext3 defaults                  0       2
/dev/md3        /server         ext3 defaults                   0       2

gateway:~#



More information about the plug mailing list