LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 11-06-2008, 12:27 PM   #1
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Rep: Reputation: 32
udev on /dev/disk/by-path devices


Can I create udev rules for /dev/disk/by-path devices. I have done the standard rules using the file /etc/udev/rules.d/50-udev.rules

KERNEL=="sdg1", OWNER="sybase", GROUP="sybase", MODE="660"

The above works fine. The problem is /dev device names can change. /dev/sdg can be /dev/sdi after the next reboot.

We want to use the /dev/disk/by-path names because they don't change. I tried putting an entry in the 50-udev.rules file such as

KERNEL=="pci-...part3", OWNER="sybase", GROUP="sybase", MODE="660"

It did not work. The reason we want to change this is because our database sybase uses raw devices and needs both ownership and group on the device.

Thank you
 
Old 11-06-2008, 01:28 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Maybe try mounting your disks by UUID in /etc/fstab
Code:
tred@vaio:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# Refer to /dev/sda6 by its UUID
UUID=7591fe5b-8907-407f-854e-321684957104  /    ext3    relatime,errors=remount-ro   0  1
/dev/sda5       none            swap    sw    0   0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0   0
tred@vaio:~$
Might be easier than writing udev rules, which I have had only partial success with, but are sweet when they do work.

OFF-TOPIC:
Quote:
Your just jealous because the voices speak to me
"You are just jealous because the voices speak to me" =>
"You're just jealous because the voices speak to me" because the "'" represents the missing " a".
Sorry, I'm a pedant
 
Old 11-06-2008, 02:39 PM   #3
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
What I need accomplished by the udev system is changing the owner and group of the partition. These partitions will not be mounted.

BTW, several people here got a good laugh, including me at your correction of my signature. You're the first person to notice that in years. I fixed the signature BTW.

Thanks
 
Old 11-06-2008, 04:24 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
What I need accomplished by the udev system is changing the owner and group of the partition
I hope you know this link: http://www.reactivated.net/writing_udev_rules.html
It has helped me greatly in the past.

I wish you inspiration for fixing your problems, but repost if you are stuck: I'll re-re-re-read the udev_rules link, and maybe be able to help you sort it out.

I think we need to know just how you are managing these disks: Are they USB and just plugged in when you feel you need them, or are they to be mounted at boot. If so, are they USB/Firewire or "hardwired" to your ATA / SATA / SCSI interface?

Also:
Quote:
These partitions will not be mounted.
Errr, why not? If they are not mounted, you cannot use them (normally). I think I am maybe missing some vital point here.

OFF-TOPIC
Quote:
BTW, several people here got a good laugh..
Delighted you have maintained your sense of humour. No offense was implied, or it seems, perceived. Excellent
 
Old 11-06-2008, 05:20 PM   #5
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
The disks are in a large SAN. They will not be mounted because the database (Sybase) uses raw disks and Sybase will control them. Before Sybase can control them Sybase must own them.

In the past I justed edited the 50-udev.rules file and added lines for sdf and soforth. We rebooted the system after adding a new controler card and the devices moved around. What was sdf is now sdm. To prevent this in the future we are using the devices in /dev/disk/by-path becuase they do not change.

I will read the page you listed and see what it says.

Thank you
 
  


Reply



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
two devices sharing device path /dev/hdd Flailing_Novice Linux - Hardware 1 04-17-2008 01:12 PM
/dev/cdrom1,/dev/cdrw1 symlinks made at each boot by udev which i dont want deepclutch Linux - Software 2 01-04-2007 07:39 AM
Exclamation point in disk path? (i.e. /dev/cciss!c0d0p3) jchrisos Fedora 0 07-18-2006 11:04 AM
Upgrade to udev-080 > No more audio devices in /dev Yalla-One Slackware 12 01-15-2006 08:44 AM
How to add block devices in the /dev path dvs Linux - Hardware 2 01-21-2004 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration