From: Karl Hammar <karl@kalle.csb.ki.se>
To: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Hot plugging a disk in runtime
Date: Mon, 20 May 2002 13:41:40 +0200 [thread overview]
Message-ID: <200205201141.g4KBfeI3022515@opal.aspo.lcl> (raw)
In-Reply-To: Message from Rabeeh Khoury <rabeeh@galileo.co.il> of "Mon, 20 May 2002 13:19:53 +0300." <3CE8CDC9.7070200@galileo.co.il>
I use this script:
# cat `which sdon`
#!/bin/sh
dev=/dev/sdc
num=4
case $0 in
*off)
umount ${dev}1
scsi-spin --down $dev
echo "scsi remove-single-device 0 0 $num 0" > /proc/scsi/scsi
;;
*on)
echo scsi add-single-device 0 0 $num 0 > /proc/scsi/scsi
mount ${dev}1
;;
esac
for a disk which happens to have scsi-id 4 and shows up as /dev/sdc.
Used like, sdoff, remove disk; insert disk, let it spin up, sdon.
Regards,
/Karl
-----------------------------------------------------------------------
Karl Hammar Aspö Data karl@kalle.csb.ki.se
Lilla Aspö 2340 +46 173 140 57 Networks
S-742 94 Östhammar +46 10 270 26 67 Computers
Sweden Consulting
-----------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2002-05-20 11:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <rabeeh@galileo.co.il>
2002-05-20 10:19 ` Hot plugging a disk in runtime Rabeeh Khoury
2002-05-20 11:41 ` Karl Hammar [this message]
2002-05-20 11:57 ` Alan Cox
2002-05-20 11:41 ` Kaushik Datta
2002-05-20 12:24 ` Rabeeh Khoury
2002-05-20 13:14 ` Alan Cox
2002-05-20 14:20 ` James Bottomley
2002-05-21 15:42 ` Michael Clark
2002-05-20 22:33 ` Oliver Xymoron
2002-05-20 16:34 berthiaume_wayne
2002-05-20 17:58 ` Doug Ledford
-- strict thread matches above, loose matches on Subject: below --
2002-05-20 18:11 berthiaume_wayne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200205201141.g4KBfeI3022515@opal.aspo.lcl \
--to=karl@kalle.csb.ki.se \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox