LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 02-25-2009, 04:19 PM   #1
kuhazor
Member
 
Registered: Jul 2005
Posts: 36

Rep: Reputation: 15
SCSI device naming


Hi there,

I have this run a way problem with RHEL5. I am mounting and unmounting volumes from SAN. Let's say I mount volume A it becomes device /dev/sda volume B becomes /dev/sdb etc... Now if I remove volumes /dev/sda and /dev/sdb and map another volume C it becomes /dev/dbc. The problem here is that /dev/sda and /dev/sdb won't get recycled and soon I will be at /dev/sdx. Is there anyway to tell the OS to discard the no longer available devices and recycle the device names?

cat /proc/partitions

shows up the devices and might be the reason why I get new device name every time i map something new to the server.

/dev/sda
/dev/sdb

I have not rebooted the system and prefer not to. Any ideas anyone?
 
Old 02-25-2009, 04:39 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Are you saying that the second time you mount volume A it isn't mapped as /dev/sda? If that is the case then you can make HAL rules to map a specific device to a specific mapping. You can use various criteria such as the UID number or a manufacturer's name.

Search this web site for more information about creating HAL rules.
 
Old 02-25-2009, 04:41 PM   #3
kuhazor
Member
 
Registered: Jul 2005
Posts: 36

Original Poster
Rep: Reputation: 15
No, if I map it the second time (i.e. every boot) this works fine i.e. it gets the same device name everytime. It is just that the old device names never expire or go away even if the volumes are long time ago removed..... I will check on the HAL rules. Thanks.
 
Old 02-25-2009, 06:41 PM   #4
kuhazor
Member
 
Registered: Jul 2005
Posts: 36

Original Poster
Rep: Reputation: 15
Well, something is getting cached including the volume sizes for these devices. I deleted one volume, created another and assigned the same LUN number, the device stayed the same this time /dev/sdc. The problem begins with the volume size, the original volume was 30GB where as the new volume is 50GB.... The information is stored somewhere and I need to be able to get rid of it somehow.

I did reboot and all volumes that no longer are available are gone. My /dev/sdc also got assigned as /dev/sda and the old /dev/sda is now assigned /dev/sdb. Volume size are correct and updated.

How do you do this without reboot?

I am using QLogic's dynamic volume scanner to refresh this information.

ql-dynamic-tgt-lun-disc.sh
 
  


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
device naming didi156 Linux - General 3 07-14-2006 06:37 AM
SATA device naming on Red Hat 3 rlinuxr Linux - Hardware 4 03-11-2006 02:33 PM
USB device naming problem brodskie Ubuntu 2 12-09-2005 03:09 AM
Naming device driver Crunch *BSD 2 02-12-2005 10:46 AM
help please naming wireless device! op_stager Linux - Software 3 09-20-2004 12:20 AM


All times are GMT -5. The time now is 09:08 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