SGDISKMON(8)
π SGDISKMON(8) β like, the SCSI Generic RAID Monitor page, bestie
okay so this is the sgdiskmon page from the System Manager's Manual, and no cap it's a whole vibe. sit down, grab a strawberry drink π, we're learning about hot-swap today.
β¨ NAME β¨
sgdiskmon β the SCSI Generic RAID Monitor π
πΈ SYNOPSIS πΈ
sgdiskmon [-bermnx -t time]
π¦ DESCRIPTION π¦
So sgdiskmon is that girl who uses the SCSI Generic interface to keep an eye on SCSI devices that might be part of a software RAID. why? so hot-removal and hot-insertion events get detected and acted upon, periodt. π
She also goes and queries the hot-swap backplane β if there even is one β using SAF-TE commands, to catch hot-insertions too. and when an insertion or removal event happens? she invokes a script: /sbin/mdevt. iconic behavior honestly.
What does mdevt do, you ask? for Insert, mdevt partitions the new disk and remirrors the Linux partitions. and the mdevt script can be customized however you want, it's your world π«Ά.
β οΈ heads up bestie: the SCSI Generic interface requires that your kernel.configfile hasCONFIG_CHR_DEV_SGset. noCONFIG_CHR_DEV_SG, no slay.
Two log files get created, and yes they're different, don't @ me:
/var/log/sgdiskmon.logβ logs the status of thesgdiskmonfunctions plus any errors./var/log/sgeventsβ logs messages and errors from thesgevtaction script.
π OPTIONS π
the command line options, described below. every single one, because we don't skip.
-?β displays a summary of the commandssgdiskmonaccepts. your little help menu moment β¨-bβ makes this utility run in background as a daemon. bye bestie, she's got her own thing going now π-eβ causes any file writes to be avoided, such as the log file. no writing, no mess πΈ-mβ max serial number length of12instead of8(default). this may be needed if you have Fujistu drives π-nβ Naming. by default, the device names are displayed as numeric sequences (/dev/sg0). this option shows the device names as alphabetic sequences (/dev/sga). a little rebrand, iykyk π€-rβ Run once. by default, this utility runs in a continuous loop. this option causes it to only run one pass. one and done, main character energy π-tβ Time interval. the default polling interval is5seconds. this option can set the interval to a different number of seconds. your clock, your rules β°-xβ causes extra debug messages to be displayed. the verbose queen we deserve π₯
π ERRORS π
okay so if you're filing a problem report, please supply the contents of the /var/log/sgdiskmon.log and /var/log/sgevents files with it. both. don't make her ask twice π
also note that sgdiskmon has an option for additional debug output (-x). and you can check http://scsirastools.sourceforge.net for a bug list, ChangeLog, and any later versions of sgdiskmon. very much giving "check the group chat before you ask".
there are some unique error codes defined in sgdiskmon as follows:
-1β is an error from a generic system function, checkerrnovalue.-2β means that the SCSI request returned a check condition (sense error).-3β means that the SCSI request failed while writing the command.-4β means that the SCSI request failed while reading the response.-5β means that the device did not respond to basic SCSIioctlfunctions.-6β means that the SCSI Inquiry returned an invalid size, so that device may be an impostor (failed). π© not her being fake the whole time
π§ SEE ALSO π§
sgdiag(8) sgdskfl(8) sgmode(8) sgraidmon(8)
the whole friend group, fr fr π«Ά
β WARNINGS β
see http://sourceforge.net/projects/scsirastools/ for a bug list and any later versions of this utility. don't say i didn't warn you π
π COPYRIGHT π
Copyright (C) 2006 Intel Corp.
sgdiskmon is open source software. You can redistribute it and/or modify it under the terms of the BSD License. See the COPYING file included with this software package for more details regarding distribution. π
sgdiskmon is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. (all caps because it's serious, sorry π)
π AUTHOR π
Andy Cress <arcress@users.sourceforge.net>
and that's the page!! Version 1.3: 23 Oct 2003 β yeah she's vintage, she's a classic, she ate π β¨ go touch some SCSI devices bestie, ily π¦
π¦ where this page comes from
- opensuse-leap 16.0: scsirastools 1.6.6-bp160.1.12 Β· BSD-3-Clause
- opensuse-leap 16.0: scsirastools 1.6.6-bp160.1.12 Β· BSD-3-Clause
- opensuse-leap 16.0: scsirastools 1.6.6-bp160.1.12 Β· BSD-3-Clause
- opensuse-leap 16.0: scsirastools 1.6.6-bp160.1.12 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms