* [PATCH 5/8] fusion - adding verbose messages for RAID actions
@ 2006-01-17 1:53 Moore, Eric
2006-01-17 13:43 ` Christoph Hellwig
2006-01-30 19:22 ` James Bottomley
0 siblings, 2 replies; 5+ messages in thread
From: Moore, Eric @ 2006-01-17 1:53 UTC (permalink / raw)
To: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
A customer request to send raid asyn actions
from firmware to the event syslog. This shows
when raid volumes go degraded, or complete resync,
or volumes created/deleted, etc.
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
[-- Attachment #2: fusion-5-raid-dump.patch --]
[-- Type: application/octet-stream, Size: 4633 bytes --]
diff -uarN b/drivers/message/fusion/mptbase.c a/drivers/message/fusion/mptbase.c
--- b/drivers/message/fusion/mptbase.c 2006-01-16 18:07:03.000000000 -0700
+++ a/drivers/message/fusion/mptbase.c 2006-01-16 18:14:52.000000000 -0700
@@ -4390,6 +4390,138 @@
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+
+static void
+mptbase_raid_process_event_data(MPT_ADAPTER *ioc,
+ MpiEventDataRaid_t * pRaidEventData)
+{
+ int volume;
+ int reason;
+ int disk;
+ int status;
+ int flags;
+ int state;
+
+ volume = pRaidEventData->VolumeID;
+ reason = pRaidEventData->ReasonCode;
+ disk = pRaidEventData->PhysDiskNum;
+ status = le32_to_cpu(pRaidEventData->SettingsStatus);
+ flags = (status >> 0) & 0xff;
+ state = (status >> 8) & 0xff;
+
+ if (reason == MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED) {
+ return;
+ }
+
+ if ((reason >= MPI_EVENT_RAID_RC_PHYSDISK_CREATED &&
+ reason <= MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED) ||
+ (reason == MPI_EVENT_RAID_RC_SMART_DATA)) {
+ printk(MYIOC_s_INFO_FMT "RAID STATUS CHANGE for PhysDisk %d\n",
+ ioc->name, disk);
+ } else {
+ printk(MYIOC_s_INFO_FMT "RAID STATUS CHANGE for VolumeID %d\n",
+ ioc->name, volume);
+ }
+
+ switch(reason) {
+ case MPI_EVENT_RAID_RC_VOLUME_CREATED:
+ printk(MYIOC_s_INFO_FMT " volume has been created\n",
+ ioc->name);
+ break;
+
+ case MPI_EVENT_RAID_RC_VOLUME_DELETED:
+
+ printk(MYIOC_s_INFO_FMT " volume has been deleted\n",
+ ioc->name);
+ break;
+
+ case MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED:
+ printk(MYIOC_s_INFO_FMT " volume settings have been changed\n",
+ ioc->name);
+ break;
+
+ case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
+ printk(MYIOC_s_INFO_FMT " volume is now %s%s%s%s\n",
+ ioc->name,
+ state == MPI_RAIDVOL0_STATUS_STATE_OPTIMAL
+ ? "optimal"
+ : state == MPI_RAIDVOL0_STATUS_STATE_DEGRADED
+ ? "degraded"
+ : state == MPI_RAIDVOL0_STATUS_STATE_FAILED
+ ? "failed"
+ : "state unknown",
+ flags & MPI_RAIDVOL0_STATUS_FLAG_ENABLED
+ ? ", enabled" : "",
+ flags & MPI_RAIDVOL0_STATUS_FLAG_QUIESCED
+ ? ", quiesced" : "",
+ flags & MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS
+ ? ", resync in progress" : "" );
+ break;
+
+ case MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED:
+ printk(MYIOC_s_INFO_FMT " volume membership of PhysDisk %d has changed\n",
+ ioc->name, disk);
+ break;
+
+ case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
+ printk(MYIOC_s_INFO_FMT " PhysDisk has been created\n",
+ ioc->name);
+ break;
+
+ case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
+ printk(MYIOC_s_INFO_FMT " PhysDisk has been deleted\n",
+ ioc->name);
+ break;
+
+ case MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED:
+ printk(MYIOC_s_INFO_FMT " PhysDisk settings have been changed\n",
+ ioc->name);
+ break;
+
+ case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
+ printk(MYIOC_s_INFO_FMT " PhysDisk is now %s%s%s\n",
+ ioc->name,
+ state == MPI_PHYSDISK0_STATUS_ONLINE
+ ? "online"
+ : state == MPI_PHYSDISK0_STATUS_MISSING
+ ? "missing"
+ : state == MPI_PHYSDISK0_STATUS_NOT_COMPATIBLE
+ ? "not compatible"
+ : state == MPI_PHYSDISK0_STATUS_FAILED
+ ? "failed"
+ : state == MPI_PHYSDISK0_STATUS_INITIALIZING
+ ? "initializing"
+ : state == MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED
+ ? "offline requested"
+ : state == MPI_PHYSDISK0_STATUS_FAILED_REQUESTED
+ ? "failed requested"
+ : state == MPI_PHYSDISK0_STATUS_OTHER_OFFLINE
+ ? "offline"
+ : "state unknown",
+ flags & MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC
+ ? ", out of sync" : "",
+ flags & MPI_PHYSDISK0_STATUS_FLAG_QUIESCED
+ ? ", quiesced" : "" );
+ break;
+
+ case MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED:
+ printk(MYIOC_s_INFO_FMT " Domain Validation needed for PhysDisk %d\n",
+ ioc->name, disk);
+ break;
+
+ case MPI_EVENT_RAID_RC_SMART_DATA:
+ printk(MYIOC_s_INFO_FMT " SMART data received, ASC/ASCQ = %02xh/%02xh\n",
+ ioc->name, pRaidEventData->ASC, pRaidEventData->ASCQ);
+ break;
+
+ case MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED:
+ printk(MYIOC_s_INFO_FMT " replacement of PhysDisk %d has started\n",
+ ioc->name, disk);
+ break;
+ }
+}
+
+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
* GetIoUnitPage2 - Retrieve BIOS version and boot order information.
* @ioc: Pointer to MPT_ADAPTER structure
@@ -5978,6 +6110,10 @@
}
}
break;
+ case MPI_EVENT_INTEGRATED_RAID:
+ mptbase_raid_process_event_data(ioc,
+ (MpiEventDataRaid_t *)pEventReply->Data);
+ break;
default:
break;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5/8] fusion - adding verbose messages for RAID actions
2006-01-17 1:53 [PATCH 5/8] fusion - adding verbose messages for RAID actions Moore, Eric
@ 2006-01-17 13:43 ` Christoph Hellwig
2006-01-30 19:22 ` James Bottomley
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2006-01-17 13:43 UTC (permalink / raw)
To: Moore, Eric; +Cc: linux-scsi
On Mon, Jan 16, 2006 at 06:53:19PM -0700, Moore, Eric wrote:
> A customer request to send raid asyn actions
> from firmware to the event syslog. This shows
> when raid volumes go degraded, or complete resync,
> or volumes created/deleted, etc.
ok
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5/8] fusion - adding verbose messages for RAID actions
2006-01-17 1:53 [PATCH 5/8] fusion - adding verbose messages for RAID actions Moore, Eric
2006-01-17 13:43 ` Christoph Hellwig
@ 2006-01-30 19:22 ` James Bottomley
1 sibling, 0 replies; 5+ messages in thread
From: James Bottomley @ 2006-01-30 19:22 UTC (permalink / raw)
To: Moore, Eric; +Cc: linux-scsi
On Mon, 2006-01-16 at 18:53 -0700, Moore, Eric wrote:
> A customer request to send raid asyn actions
> from firmware to the event syslog. This shows
> when raid volumes go degraded, or complete resync,
> or volumes created/deleted, etc.
I've put this in, but it really is quite verbose. This is what my
single IM RAID gives on boot:
mptbase: ioc1: RAID STATUS CHANGE for VolumeID 0
mptbase: ioc1: volume is now optimal, enabled, quiesced
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 0
mptbase: ioc1: PhysDisk is now online, quiesced
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 1
mptbase: ioc1: PhysDisk is now online, quiesced
mptbase: ioc1: RAID STATUS CHANGE for VolumeID 0
mptbase: ioc1: volume is now optimal, enabled
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 0
mptbase: ioc1: PhysDisk is now online
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 1
mptbase: ioc1: PhysDisk is now online
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
mptbase: ioc1: RAID STATUS CHANGE for VolumeID 0
mptbase: ioc1: volume is now optimal, enabled, quiesced
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 0
mptbase: ioc1: PhysDisk is now online, quiesced
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 1
mptbase: ioc1: PhysDisk is now online, quiesced
mptbase: ioc1: RAID STATUS CHANGE for VolumeID 0
mptbase: ioc1: volume is now optimal, enabled
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 0
mptbase: ioc1: PhysDisk is now online
mptbase: ioc1: RAID STATUS CHANGE for PhysDisk 1
mptbase: ioc1: PhysDisk is now online
Which is rather a lot of spew for a single device ...
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 5/8] fusion - adding verbose messages for RAID actions
@ 2006-01-30 19:28 Moore, Eric
2006-01-30 21:17 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Moore, Eric @ 2006-01-30 19:28 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
On Monday, January 30, 2006 12:22 PM, James Bottomley wrote:
> I've put this in, but it really is quite verbose. This is what my
> single IM RAID gives on boot:
>
I didn't know that occurred on boot. I thought those messages only came
when
raid status change occured, such as a drive failing or volume coming
online after resycn completed.
>
> Which is rather a lot of spew for a single device ...
>
What is your recommendation for this?
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 5/8] fusion - adding verbose messages for RAID actions
2006-01-30 19:28 Moore, Eric
@ 2006-01-30 21:17 ` James Bottomley
0 siblings, 0 replies; 5+ messages in thread
From: James Bottomley @ 2006-01-30 21:17 UTC (permalink / raw)
To: Moore, Eric; +Cc: linux-scsi
On Mon, 2006-01-30 at 12:28 -0700, Moore, Eric wrote:
> I didn't know that occurred on boot. I thought those messages only came
> when
> raid status change occured, such as a drive failing or volume coming
> online after resycn completed.
It's quiescing the RAID prior to performing Domain validation
(apparently we get three messages per quiesce: one for the array and one
each for the two halves of the mirror).
> What is your recommendation for this?
Perhaps use the KERN_ logging system to work for us: so most array
event messages would be KERN_DEBUG that won't ordinarily display for the
less critical messages.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-30 21:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-17 1:53 [PATCH 5/8] fusion - adding verbose messages for RAID actions Moore, Eric
2006-01-17 13:43 ` Christoph Hellwig
2006-01-30 19:22 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2006-01-30 19:28 Moore, Eric
2006-01-30 21:17 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).