2007-08-27 17:50:42

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] mptsas: scan the logical volume at first

[PATCH] mptsas: scan the logical volume at first

user like to see the raid show as /dev/sda before left raw disks.
So scan the volume at first to make their life easier.

Signed-off-by: Yinghai Lu <[email protected]>

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index b9c69bf..4c452be 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -2403,9 +2403,6 @@ mptsas_scan_sas_topology(MPT_ADAPTER *ioc)
int i;

mutex_lock(&ioc->sas_discovery_mutex);
- mptsas_probe_hba_phys(ioc);
- while (!mptsas_probe_expander_phys(ioc, &handle))
- ;
/*
Reporting RAID volumes.
*/
@@ -2420,6 +2417,9 @@ mptsas_scan_sas_topology(MPT_ADAPTER *ioc)
ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0);
}
out:
+ mptsas_probe_hba_phys(ioc);
+ while (!mptsas_probe_expander_phys(ioc, &handle))
+ ;
mutex_unlock(&ioc->sas_discovery_mutex);
}


2007-08-27 22:20:47

by Moore, Eric

[permalink] [raw]
Subject: RE: [PATCH] mptsas: scan the logical volume at first

On Monday, August 27, 2007 11:58 AM, Yinghai Lu wrote:
>
> [PATCH] mptsas: scan the logical volume at first
>
> user like to see the raid show as /dev/sda before left raw disks.
> So scan the volume at first to make their life easier.
>
> Signed-off-by: Yinghai Lu <[email protected]>
>

Although I agree with the patch, there are people on this list that will
reject it due to the fact distro's ship today having udev label and
device id mapping, so device ordering should be an non-issue. However
there are systems that ship that don't have BIOS BBS support, allowing
you to select the boot device. Without it BBS support, you are forced to
boot to the lowest device id. There are HP and Dell systems like that.
Are SUN systems like that? If so, there is an additional patch which I
have yet posted that will sort the raid volumes in acsending order.
Currently they are in descending order (due to Firmware putting them in
that order), which if you did a install to what you think is /dev/sda,
its really the highest target id, and when you reboot, the BIOS will
boot to the lowest id, which is /dev/sdb, and it will not find the boot
partition.

Eric

2007-08-27 22:44:17

by Yinghai Lu

[permalink] [raw]
Subject: Re: [PATCH] mptsas: scan the logical volume at first

Moore, Eric wrote:
> On Monday, August 27, 2007 11:58 AM, Yinghai Lu wrote:
>> [PATCH] mptsas: scan the logical volume at first
>>
>> user like to see the raid show as /dev/sda before left raw disks.
>> So scan the volume at first to make their life easier.
>>
>> Signed-off-by: Yinghai Lu <[email protected]>
>>
>
> Although I agree with the patch, there are people on this list that will
> reject it due to the fact distro's ship today having udev label and
> device id mapping, so device ordering should be an non-issue. However

even so, user still can customize it to use /dev/sdaX as root instead of use /dev/scsi/by-id/...or LABEL=/ as root.

> there are systems that ship that don't have BIOS BBS support, allowing
> you to select the boot device. Without it BBS support, you are forced to
> boot to the lowest device id. There are HP and Dell systems like that.
> Are SUN systems like that? If so, there is an additional patch which I
> have yet posted that will sort the raid volumes in acsending order.
> Currently they are in descending order (due to Firmware putting them in
> that order), which if you did a install to what you think is /dev/sda,
> its really the highest target id, and when you reboot, the BIOS will
> boot to the lowest id, which is /dev/sdb, and it will not find the boot
> partition.
Yes, I was wondering why kernel.org mainline will have /dev/sdb for first raid. but it seems RHEL 5 kernel have first raid before second raid...( it
after all left over raw devices..), maybe they already aplied some patch?

can you send out patch?

Thanks

Yinghai Lu

2007-08-27 22:51:18

by Moore, Eric

[permalink] [raw]
Subject: RE: [PATCH] mptsas: scan the logical volume at first

On Monday, August 27, 2007 4:52 PM, Yinghai Lu wrote:
> Yes, I was wondering why kernel.org mainline will have
> /dev/sdb for first raid. but it seems RHEL 5 kernel have
> first raid before second raid...( it
> after all left over raw devices..), maybe they already aplied
> some patch?
>
> can you send out patch?
>

That is not necessary, as we have already implemented the change to sort
volumes in acsending order to Red hat and Suse, and its been accepted.
I will post the change to lsml.

Eric