LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 03-11-2009, 06:28 AM   #1
knikkerr
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
iscsi: which local device (/dev/sda, /dev/sdb) is used WITHOUT dmesg?


Hi,

Running CentOS 5.2 (64bit)
kernel 2.6.27.9-smp
iscsiadm version 2.0-870

We have a backup script that uses iSCSI to attach volumes from an Equallogic. It's a script that's often busy for hours.

On the same server we have a restore-script to manually restore specific volumes.

How do you find out for _sure_ which local device (/dev/sda, /dev/sdb, ...) has just been attached to a target after an

# iscsiadm -l
?

I know you can check dmesg, but in the unfortunate event that both scripts have just logged in to (separate) volumes, the timing to automatically check dmesg might just return the wrong device.

Preferably, we'd assign a device during iscsiadm logon, but it would also be workable to check which device is used after successfully logging in. Unfortunately,

# iscsiadm -m node -r sessionid

doesn't show anything about which device is used.

Of course, we could hack an ugly mutex-alike structure using some kind of shared dir/file, but well....

Any thoughts?

regards,
Mark
 
Old 03-18-2010, 03:10 AM   #2
aimon
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
You ever figure this out?

Hi, you ever figure this out? I am trying to find the device a specific target used and/or be able to specify the device it will use. Any help you can give would be appreciated.


Aimon
 
Old 08-12-2010, 05:31 AM   #3
m.bhuvan
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by aimon View Post
Hi, you ever figure this out? I am trying to find the device a specific target used and/or be able to specify the device it will use. Any help you can give would be appreciated.


Aimon
Hi , Hopefully /dev/disk/* will you provide the results for you.

ls -l /dev/disk/*

and
ls -l /dev/disk/by-path will be more helpfull to you.

Last edited by m.bhuvan; 08-12-2010 at 05:35 AM.
 
Old 08-13-2010, 04:30 AM   #4
aimon
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by m.bhuvan View Post
Hi , Hopefully /dev/disk/* will you provide the results for you.

ls -l /dev/disk/*

and
ls -l /dev/disk/by-path will be more helpfull to you.

Good point! Not ideal.. but much better then dmesg. It does amaze me that you cant pre-specify the device name somehow.

Regards,

Aimon
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how the device will take the name as /dev/sda.../dev/sdb... ? sanjay2004 Linux - Software 1 05-27-2008 09:25 AM
/dev/sda & /dev/sdb keeps swapping name sinister1 Linux - Hardware 4 02-18-2008 01:44 AM
RHEL4U5 install changes /dev/sda to /dev/sdb bhoch Red Hat 8 12-05-2007 06:33 AM
Copying from /dev/sda to /dev/sdb fof3 Linux - Newbie 8 07-04-2006 06:19 AM
forcing the order of /dev/sda /dev/sdb etc.. jdaniel Linux - Software 5 05-23-2006 07:41 AM


All times are GMT -5. The time now is 04:48 AM.

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