Weblog entry #5 for GhostR

It alway comes all together!
Posted by GhostR on Fri 24 Oct 2008 at 18:22
Tags: none.
Ok, lets see what I got... its Friday night, I m at home, next to me a broke 2k3 DC from work which gives me a hard time the second day now.
tried to clone the sata disks in my private home server via acronis and sata backplanes.
removed the disks, put my linux raid5 disks back in (in the right order), boot debian, and guess what I got.... a degraded raid5! what happened? - fucking (excuse me) sata controller decided to swap sdd with sdc, now mdadm cant find sdd any more because I have only 3 disks!

I m ready to shoot my self in the head! (at least I know I can fix stuff like this under linux ;) )
Have a nice weekend all!

 

Comments on this Entry

Posted by GhostR (80.128.xx.xx) on Fri 24 Oct 2008 at 18:23
[ Send Message | View Weblogs ]
Screw this! I m going out for dinner and beers!

Cheers!

[ Parent | Reply to this comment ]

Posted by diveli (150.101.xx.xx) on Sat 25 Oct 2008 at 03:11
[ Send Message | View Weblogs ]
You came to the same conclusion that I would've in your shoes :) (sorry for accidental PM too..)

[ Parent | Reply to this comment ]

Posted by GhostR (80.128.xx.xx) on Sat 25 Oct 2008 at 18:02
[ Send Message | View Weblogs ]
Now, I slept over it. New day, new luck.
My question now is, how can I prevent that my controller keeps switching the device IDs e.g. /dev/sdd1 and /dev/sdc1? Thats a gotcha in my eyes, it kinda happened to me before a few years ago. (formated the wrong disk after adding a new one, ok I didnt check, stupid me)
Did somebody else experience something like that before?

Thats my degraded mdadm conf:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This file was auto-generated on Thu, 14 Feb 2008 12:06:23 +0100
# by mkconf $Id: mkconf 261 2006-11-09 13:32:35Z madduck $

ARRAY /dev/md0 level=raid5 num-devices=3 UUID=cc4f7e12:3e4eb184:12ae1fd4:c3f4983b
devices=/dev/sda1,/dev/sdb1,/dev/sdd1

[ Parent | Reply to this comment ]

Posted by mangler (24.81.xx.xx) on Sun 26 Oct 2008 at 20:15
[ Send Message ]
I've found that it's always preferable to link the MD's using it's internal UUID settings, rather than specifically identify the device.

MDADM stores the UUID of the array in modern versions (last couple of years) in the partion. This should allow you to move things around without fear of a broken array.

If you look at the man page for mdadm.conf, it has a DEVICE definition, that allows you to do the superblock search on devices.

(from man page)
DEVICE /dev/sd[bcdjkl]1
DEVICE /dev/hda1 /dev/hdb1

# /dev/md0 is known by it’s UID.
ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371

Rather than using your last ARRAY definition which defines your devices to be exactly /dev/sd[abd]1

Hope that helps (haven't had to muck with my md partitions in a year or so tough wood)

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search