Skip to contentSkip to conversation

Problems with SCSI devices renaming...

DISCUSSION Martin Clauss 6 participants 6 messages Oct 19, 2004 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi all,

i got a problem with my raid. Current setup:

        raiddev /dev/md/0
                raid-level              5
                nr-raid-disks           10
                nr-spare-disks          0
                persistent-superblock   1
                parity-algorithm        left-symmetric

                device /dev/scsi/host2/bus0/target0/lun0/part1
                raid-disk               0
                device /dev/scsi/host2/bus0/target1/lun0/part1
                raid-disk               1
                device /dev/scsi/host2/bus0/target2/lun0/part1
                raid-disk               2
                device /dev/scsi/host2/bus0/target3/lun0/part1
                raid-disk               3
                device /dev/scsi/host2/bus0/target4/lun0/part1
                raid-disk               4
                device /dev/scsi/host2/bus0/target8/lun0/part1
                raid-disk               5
                device /dev/scsi/host2/bus0/target9/lun0/part1
                raid-disk               6
                device /dev/scsi/host2/bus0/target10/lun0/part1
                raid-disk               7
                device /dev/scsi/host2/bus0/target11/lun0/part1
                raid-disk               8
                device /dev/scsi/host2/bus0/target12/lun0/part1
                raid-disk               9

This works very fine so far. But when I attach an additional device to this DEC Storage Device, I get an additional target on this SCSI bus. Now this doesn't matter for the devfs names, but the superblock of the RAID saves major/minor numbers that are wrong now. So the raid won't start anymore.... Shouldn't autodetect handle exactly this problem? (Yes, partition type is linux raid autodetect for all raid disks...)

I guess, this should be a quite common problem, so I hope to find some answers here.

Greetz,
Martin Clauss

#1 lore raw
Quoted 11 lines · Martin Clauss

Hi all,

i got a problem with my raid. Current setup:

This works very fine so far. But when I attach an additional device to this DEC Storage Device, I get an additional target on this SCSI bus. Now this doesn't matter for the devfs names, but the superblock of the RAID saves major/minor numbers that are wrong now. So the raid won't start anymore.... Shouldn't autodetect handle exactly this problem? (Yes, partition type is linux raid autodetect for all raid disks...)

Quoted 3 lines

I guess, this should be a quite common problem, so I hope to find some answers here.

forget autodetect,
forget raidtools,
switch to mdadm.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#4 lore raw
In reply to Martin Clauss
Quoted 10 lines · Martin Clauss
                device /dev/scsi/host2/bus0/target11/lun0/part1
                device /dev/scsi/host2/bus0/target12/lun0/part1

This works very fine so far. But when I attach an additional device to this DEC Storage Device, I get an additional target on this SCSI bus. Now this doesn't matter for the devfs names, but the superblock of the RAID saves major/minor numbers that are wrong now. So the raid won't start anymore.... Shouldn't autodetect handle exactly this problem? (Yes, partition type is linux raid autodetect for all raid disks...)

Quoted 2 lines

I guess, this should be a quite common problem, so I hope to find some answers here.

You want something like udev (2.6 kernels) or devlabel (2.4 kernels,
http://linux.dell.com/projects.shtml), and to use those names rather than devfs names.

Thanks,
Matt

Signature · 4 lines
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#5 lore raw
In reply to Martin Clauss

If you are using raidstart to start your array, then yes common problem. Raidstart is part of raidtools, which is obsolete.

Try mdadm. You may need to install this. It was easy for me on redhat 9.

Your device names are very odd to me! What happened to /dev/sda1 and such?

The problem you are having is very similar to the problem you would have if a disk were to fail such that it could not be seen by the system. This is what happened to me first. I have also added disks since then with problems like yours. But in my case the device names changed. So I am confused by this also. For example I had 3 devices sda, sdb and sdc. If sdb were to fail or be removed, on reboot sdc would change names to sdb. Raidstart can't handle this, at least not for me! If my major minor/number changed, I did not notice.

Guy

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Clauss
Sent: Tuesday, October 19, 2004 10:48 AM
To: [email protected]
Subject: Problems with SCSI devices renaming...

Hi all,

i got a problem with my raid. Current setup:

        raiddev /dev/md/0
                raid-level              5
                nr-raid-disks           10
                nr-spare-disks          0
                persistent-superblock   1
                parity-algorithm        left-symmetric

                device /dev/scsi/host2/bus0/target0/lun0/part1
                raid-disk               0
                device /dev/scsi/host2/bus0/target1/lun0/part1
                raid-disk               1
                device /dev/scsi/host2/bus0/target2/lun0/part1
                raid-disk               2
                device /dev/scsi/host2/bus0/target3/lun0/part1
                raid-disk               3
                device /dev/scsi/host2/bus0/target4/lun0/part1
                raid-disk               4
                device /dev/scsi/host2/bus0/target8/lun0/part1
                raid-disk               5
                device /dev/scsi/host2/bus0/target9/lun0/part1
                raid-disk               6
                device /dev/scsi/host2/bus0/target10/lun0/part1
                raid-disk               7
                device /dev/scsi/host2/bus0/target11/lun0/part1
                raid-disk               8
                device /dev/scsi/host2/bus0/target12/lun0/part1
                raid-disk               9

This works very fine so far. But when I attach an additional device to this DEC Storage Device, I get an additional target on this SCSI bus. Now this doesn't matter for the devfs names, but the superblock of the RAID saves major/minor numbers that are wrong now. So the raid won't start anymore.... Shouldn't autodetect handle exactly this problem? (Yes, partition type is linux raid autodetect for all raid disks...)

I guess, this should be a quite common problem, so I hope to find some answers here.

Greetz,
Martin Clauss

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to Luca Berra
Quoted 3 lines

forget autodetect,
forget raidtools,
switch to mdadm.

Yep, seems a bit smarter, and I discovered that there were multiple superblocks on some of the disks (from former usage i guess), which confused mdrun.... Now I hope that it can handle changed device names, I'll try tomorrow...

Thanks,
Martin

#3 lore raw

mdadm - with multipath devices: I remember it bringing up the md device after the names changed, but had to manually add the alternate path. And, thereafter it behaved well, and have not added any more luns yet. Not sure if it is so in v1.7.0.

You may want to check out devlabel as Matt said..

Quoted 14 lines · Martin Clauss
Quoted 5 lines

forget autodetect,
forget raidtools,
switch to mdadm.

Yep, seems a bit smarter, and I discovered that there were multiple superblocks on some of the disks (from former usage i guess), which confused mdrun.... Now I hope that it can handle changed device names, I'll try tomorrow...

Thanks,
Martin