From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 19 Dec 2003 20:26:04 +0300 From: Grigory Batalov To: sisyphus@altlinux.ru Message-Id: <20031219202604.54dc7856.bga-no-spam@kovgok.ru> Organization: OAO "Kovdorsky GOK" X-Mailer: Sylpheed version 0.8.8 (GTK+ 1.2.10; i586-alt-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Fri__19_Dec_2003_20:26:04_+0300_0821f3a0" Subject: [sisyphus] SAF-TE Utils project started X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.3 Precedence: list Reply-To: sisyphus@altlinux.ru List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2003 17:26:16 -0000 Archived-At: List-Archive: This is a multi-part message in MIME format. --Multipart_Fri__19_Dec_2003_20:26:04_+0300_0821f3a0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Здравствуйте! Отчаявшись найти подходящий инструмент для работы с SAF-TE устройствами, я решил написать его сам =). Спешу поделиться своими наработками и с благодарностью приму комментарии. SAF-TE (SCSI Accessible Fault Tolerant Enclosures) - это hotswap-корзины для SCSI-дисков, интерфейс к которым описан в соответствующей спецификации. Последний её выпуск датируется 1997 годом, взять можно здесь: http://www.intel.com/design/servers/ipmi/saf-te.htm http://www.intel.com/design/servers/ipmi/pdf/SAFTEarchive.zip Из готовых программ удалось найти safte-monitor-0.0.5: http://oss.metaparadigm.com/safte-monitor/ Однако, он имеет ряд "неисправимых преимуществ" =): - использует SCSI Generic v.2 (устарел) - статически слинкован с веб-сервером mathopd - имеет неточности, иногда приводящие к дезинформации - только считывает данные По этому на основе его и sg3_utils ( http://www.torque.net/sg/ ) я написал несколько утилит (пока две), рассчитанных на sg v.3 и представляющих некоторый интерес. Safte-info /dev/sgN выводит доступную информацию об устройстве, такую как кол-во дисков, вентиляторов, температуру датчика и т.п. Реализованы все описанные в спецификации операции чтения, хотя и не все поддерживаются устройством. Safte-slot-led /dev/sgN X включает индикатор на разъёме X устройства /dev/sgN. Используются два метода: - пометить диск как "сбойный" - выполнить операцию "указать диск" Первый работает только на пустых слотах (у меня), второй -- всегда. Работоспособность проверялась на двух корзинах: ESG-SHV SCA HSBP M15 и M16, поставляемых в корпусах Intel SC5100 и SR2200 соответственно. Хотелось бы получить от обладателей корзин вывод safte-info со всеми отладочными сообщениями: safte-info /dev/sg5 > M15 2>&1 . Примеры прилагаю. А также, кто не боится, проверьте safte-slot-led и сообщите реакцию. Разработчиков прошу посмотреть код и указать на типичные ошибки или дать полезный совет. Архив с первой пробной версией лежит здесь: http://www.kovgok.ru/safte-utils/safte-utils-0.1.tar.bz2 В него включены собранные с -DDEBUG бинарники, но лучше пересобрать заново. -- Григорий Баталов, группа техподдержки ОАО "Ковдорский ГОК" --Multipart_Fri__19_Dec_2003_20:26:04_+0300_0821f3a0 Content-Type: text/plain; name="M15" Content-Disposition: attachment; filename="M15" Content-Transfer-Encoding: 7bit SCSI ioctl error: scsi status: Check Condition Current, Sense key: Illegal Request Info fld=0x0, Additional sense: Invalid field in cdb Raw sense data (in hex): f0 00 05 00 00 00 00 06 00 00 00 00 24 00 plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK) SCSI ioctl error: scsi status: Check Condition Current, Sense key: Illegal Request Info fld=0x0, Additional sense: Parameter not supported Raw sense data (in hex): f0 00 05 00 00 00 00 06 00 00 00 00 26 01 plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK) /dev/sg3: read usage statistics not supported SCSI ioctl error: scsi status: Check Condition Current, Sense key: Illegal Request Info fld=0x0, Additional sense: Invalid field in cdb Raw sense data (in hex): f0 00 05 00 00 00 00 06 00 00 00 00 24 00 plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK) /dev/sg3: read global flags not supported SAF-TE device at /dev/sg3 was found Vendor: ESG-SHV Product: SCA HSBP M15 Revision: 0.10 Enclosure identifier: 0000000 Channel: 1 SAF-TE revision: 1.0A Number of fans: 2 Number of Power Supply Units: 0 Number of device Slots: 5 Doorlock is NOT present Number of Tempsensors: 1 Audible alarm is NOT present Number of Thermostats: 0 fan 0 status is 'unknown' fan 1 status is 'unknown' slot 0 has SCSI id 0, is 'disk present,active', device inserted 1 times slot 1 has SCSI id 1, is 'disk present,active', device inserted 1 times slot 2 has SCSI id 2, is 'disk present,active', device inserted 1 times slot 3 has SCSI id 3, is 'insert ready', device inserted 0 times slot 4 has SCSI id 4, is 'insert ready', device inserted 0 times doorlock is not installed speaker is not installed temperature sensor 0 is 26.7 C and okay overal temperature is okay --Multipart_Fri__19_Dec_2003_20:26:04_+0300_0821f3a0 Content-Type: text/plain; name="M16" Content-Disposition: attachment; filename="M16" Content-Transfer-Encoding: 7bit SCSI ioctl error: scsi status: Check Condition Current, Sense key: Illegal Request Info fld=0x0, Additional sense: Invalid field in cdb Raw sense data (in hex): f0 00 05 00 00 00 00 06 00 00 00 00 24 00 plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK) SCSI ioctl error: scsi status: Check Condition Current, Sense key: Illegal Request Info fld=0x0, Additional sense: Parameter not supported Raw sense data (in hex): f0 00 05 00 00 00 00 06 00 00 00 00 26 01 plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK) /dev/sg5: read usage statistics not supported SCSI ioctl error: scsi status: Check Condition Current, Sense key: Illegal Request Info fld=0x0, Additional sense: Invalid field in cdb Raw sense data (in hex): f0 00 05 00 00 00 00 06 00 00 00 00 24 00 plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK) /dev/sg5: read global flags not supported SAF-TE device at /dev/sg5 was found Vendor: ESG-SHV Product: SCA HSBP M16 Revision: 0.05 Enclosure identifier: 0000000 Channel: 1 SAF-TE revision: 1.0A Number of fans: 0 Number of Power Supply Units: 2 Number of device Slots: 7 Doorlock is NOT present Number of Tempsensors: 1 Audible alarm is NOT present Number of Thermostats: 0 power supply 0 status is 'not present' power supply 1 status is 'not present' slot 0 has SCSI id 0, is 'insert ready,no error', device inserted 0 times slot 1 has SCSI id 1, is 'disk present,active', device inserted 1 times slot 2 has SCSI id 2, is 'disk present,active', device inserted 1 times slot 3 has SCSI id 3, is 'disk present,active', device inserted 1 times slot 4 has SCSI id 4, is 'disk present,active', device inserted 1 times slot 5 has SCSI id 5, is 'disk present,active', device inserted 4 times slot 6 has SCSI id 8, is 'insert ready', device inserted 0 times doorlock is not installed speaker is not installed temperature sensor 0 is 27.8 C and okay overal temperature is okay --Multipart_Fri__19_Dec_2003_20:26:04_+0300_0821f3a0--