LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-11-2009, 02:53 PM   #1
alirezan1
Member
 
Registered: Nov 2004
Location: Vancouver
Distribution: Ubunty, CentOS ,Mandriva, Gentoo, RedHat, Fedora, Knoppix
Posts: 147

Rep: Reputation: 15
deleting SCSI disk and forcing it to start again without hot-plugging


Hello,

I have two SAS SCSI drives on my machine. Sometimes I want to stop the disk in the system so that the system doesn't know anything about it. I first spin them down (sdparm -C stop /dev/sdb) and then I do:
echo 1 > /sys/block/sdb/device/delete

and then the disk is gone...that's fine...

The problem is, I can't get the disk to come up again by writing 1 to /sys/block/sdb/device/rescan since the entry is also gone from the /sys/block...But when I physically pull the disk and insert it back, SAS driver recognizes it and everything goes back to normal...

Is there any way I can simulate the disk pull without actually having to pull the disk every time I stop the disk? I can't pull the disk everytime since many times I'm away from the system and this is impossible...

Thanks
 
Old 02-11-2009, 03:29 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,476

Rep: Reputation: 156Reputation: 156
Do you issue a umount command for every partition on sdb before you try to simulate the disk pull? A mounted partition might be the flaw in your logic.

----------------
Steve Stites
 
Old 02-11-2009, 03:49 PM   #3
alirezan1
Member
 
Registered: Nov 2004
Location: Vancouver
Distribution: Ubunty, CentOS ,Mandriva, Gentoo, RedHat, Fedora, Knoppix
Posts: 147

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jailbait View Post
Do you issue a umount command for every partition on sdb before you try to simulate the disk pull? A mounted partition might be the flaw in your logic.

----------------
Steve Stites
Hello

I don't think I followed, but yes, everything is unmounted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detection problems when hot plugging USB devices katesfb Linux - Newbie 5 12-11-2008 01:40 PM
Storage Media Lost Hot Plugging issue evodawg Mandriva 3 08-10-2008 02:05 PM
hot/cold plugging a Belkin F5D7010 wufo Linux - Laptop and Netbook 1 12-29-2004 06:14 AM
hot plugging and mounting a USB memory disk Alf829 Fedora 9 10-07-2004 10:21 AM
Hot-plugging a SCSI Tapedrive ganninu Linux - Hardware 1 05-03-2004 11:05 AM


All times are GMT -5. The time now is 10:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration