View previous topic :: View next topic |
Author |
Message |
deaton n00b

Joined: 07 Aug 2002 Posts: 9 Location: mid-Atlantic, USA
|
Posted: Wed Aug 07, 2002 1:16 am Post subject: Conditional Mount? |
|
|
This might sound trivial to a sysadmin, but I'm still an ameteur.
I have an external scsi drive (/dev/sdx). I have no problem mounting if it's up and running at boot time, it shows up in /proc/scsi/scsi. However if I bring the drive up post boot, nothing shows up in /proc/scsi/scsi and I can't mount it.
I am using devfs.
Does anyone know a way to test if the external drive is up and running post boot? And how to mount it at that time.
The drive(s) are hot-swappable and I'm not running an automounter (yet).
Ultimately, I'd like to run a cron job that tests if the drive is online, and write a .tbz to it if it is, or abort if it isn't. I just don't know how or what to test for if it's online or not, or even if I can test for it. (except for /proc/scsi/scsi, which only shows up if the drive is up at boot time) |
|
Back to top |
|
 |
n0n Guru


Joined: 13 Jun 2002 Posts: 355
|
Posted: Wed Aug 07, 2002 9:06 pm Post subject: |
|
|
Are the SCSI drivers compiled into the kernel, or as modules? Perhaps you could use 'em as modules, and do a modprobe on 'em and see if they'll bring up a drive that way. That's how I can get my hot-swappable CDRom bay on my laptop to work (not using devfs, though) - I rmmod the appropriate module, swap the bay, and then modprobe the module again. Perhaps that'll work in your case? |
|
Back to top |
|
 |
deaton n00b

Joined: 07 Aug 2002 Posts: 9 Location: mid-Atlantic, USA
|
Posted: Thu Aug 08, 2002 11:35 pm Post subject: |
|
|
thanks!
I new it had to easy. I was loading the scsi modules with /etc/modules.autoload.
I just took it out, added the modprobe statement to my script and viola.
I should of thought of it myself.
Thanks again |
|
Back to top |
|
 |
deaton n00b

Joined: 07 Aug 2002 Posts: 9 Location: mid-Atlantic, USA
|
Posted: Fri Aug 09, 2002 12:27 am Post subject: |
|
|
oh yeah!
I also added a rmmod statement at the end of my script so it would work if the drive went offline between (monthly) cron jobs. |
|
Back to top |
|
 |
|