Udev label removes corresponding fdisk, sfdisk or lsvdev entry


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Udev label removes corresponding fdisk, sfdisk or lsvdev entry
# 1  
Old 03-02-2009
Udev label removes corresponding fdisk, sfdisk or lsvdev entry

I'm curious about the behavior where any udev labeled device causes that corresponding listing to disappear from fdisk, sfdisk, or in the case of RDAC, lsvdev.

I have seen this on both EMC clariion and Sun Storagetek/Engenio 6540 arrays.

We use RHEL5.1 and udev to create persistent labels for Oracle devices.

Example udev rule:
Code:
# cat /etc/udev/rules.d/55-oracle-naming.rules
# Configure persistent, user-defined Oracle Clusterware device file names
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="3600a0b8000476694000004704974f509", NAME="ocr1", OWNER="root", GROUP="oinstall", MODE="0640"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="3600a0b80004793a2000004ae4974e92d", NAME="ocr2", OWNER="root", GROUP="oinstall", MODE="0640"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="3600a0b8000478034000003e04974f6f0", NAME="ocr3", OWNER="root", GROUP="oinstall", MODE="0640"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="3600a0b80004793da000004904974e9b1", NAME="vot1", OWNER="oracle", GROUP="oinstall", MODE="0640"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="3600a0b8000476694000004734974f778", NAME="vot2", OWNER="oracle", GROUP="oinstall", MODE="0640"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="3600a0b80004793a2000004b14974ea59", NAME="vot3", OWNER="oracle", GROUP="oinstall", MODE="0640"

I'm comfortable that we can always reference the /dev/ocr* or /dev/vot* devices, I'm just looking for how to explain this behavior. Is there some mechanism under the hood causing it? Is it so someone doesn't do things with those fdisk listed devices and inadvertently wipe out udev labeled ones?

Thx
# 2  
Old 03-06-2009
I cannot give you a 100% certainty that this will not fail, but I'm 98% certain that the scsi_id is unique and will always return the correct result and will faithfully identify the disk, even if the disks are move or renumbered.

Quote:
I'm just looking for how to explain this behavior.
redhat.com | Red Hat Magazine - Configuring Devices with udev
# 3  
Old 03-06-2009
Quote:
Originally Posted by otheus
I cannot give you a 100% certainty that this will not fail, but I'm 98% certain that the scsi_id is unique and will always return the correct result and will faithfully identify the disk, even if the disks are move or renumbered.
You are correct. That's the method I use to verify that that block device is indeed still there, but just being referenced by the new label.

Interestingly, /proc/partitions will always show those six missing devices that udev labels, but reading from them via dd by that sd device name will fail.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Fdisk and grep command not working in udev trigger

Hi Guys, Can someone take a look at my scripts what missing, plugin usb drive the script is running can log all my echo but cannot execute command. Is there any configuration in linux or to my scripts need to add?. What i want to achieve is every time I plugin the usbdisk automatic mount to... (21 Replies)
Discussion started by: lxdorney
21 Replies

2. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

3. UNIX for Dummies Questions & Answers

Question about udev Rules File?

Hello All, I found this site here: AndDiSa Android Blog: Nexus 7 MTP automount on OpenSuse 11.4 That sites explains how to mount an Android device that can only connect to a computer using MTP or PTP instead of what it used to get treated as, which was a Mass Storage Device. In my Rules... (0 Replies)
Discussion started by: mrm5102
0 Replies

4. BSD

OpenBSD fdisk - Linux fdisk compatibility ?

Hello, MBR partition table made by linux fdisk looks certainly not correct when printed by openbsd fdisk: Partition table created on linux (centos 6.3): # fdisk -l /dev/sdc Disk /dev/sdc: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 *... (2 Replies)
Discussion started by: vilius
2 Replies

5. Shell Programming and Scripting

Pass params with Udev

Hello! I'm sorry if this is the false Forum, didn't really knew where to put it... My question: I have serveral USB-Sticks and wrote several Udev-Rules for theme, each Sticks needs to do something else, but all are using the same script (they have common tasks to do) and only some parts are... (2 Replies)
Discussion started by: al0x
2 Replies

6. Solaris

Help:"Bad checksum in disk label" and "Can't open disk label package"?

Hello, I'm brand new to Sun/Solaris. I have a Sun Blade 150, with SunOS 5.8. I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Discussion started by: Resadija
6 Replies

7. Filesystems, Disks and Memory

Understanding sfdisk and df results

Hi, Using fdisk I created a partition of 15.7 GB. I entered +15700M Using sfdisk there is a heading called blocks and there is a number which is approximatly 400 BM less. When I mount the partition and use df -l the 1K block column displays only 15GB! I need to understand these numbers if... (2 Replies)
Discussion started by: mojoman
2 Replies

8. Shell Programming and Scripting

sfdisk for automated partitioning?

Hi guys, I want to write a script to automate partitioning for some project that I'm working on. I tried using fdisk but it was too painful... so, turned to sfdisk but now I'm getting strange results...or at least I think so. What I want to do is, to get the disk size to be created from... (0 Replies)
Discussion started by: alirezan
0 Replies

9. Shell Programming and Scripting

Script removes itself

I have a script that reads from a file and deletes all files in tha path specified in the file.The problem,however, is the script also deletes itself from the home directory where I run it :-( #!/bin/ksh while read DAYS PURGE_PATH do cd $PURGE_PATH find . \( -type d ! -name . -prune \)... (5 Replies)
Discussion started by: kayarsenal
5 Replies

10. Linux

udev core 5

installed fedora core 5 on a pc with USB and some usual things. in boot up it is stopped at "Starting udev:". Its harddisk light is busy. is it reconfiguring the kernel?. what do to solve this problem?. (0 Replies)
Discussion started by: GJ2
0 Replies
Login or Register to Ask a Question