Skip to contentSkip to conversation

RHEL: special ownership for lv devices?

linux-lvm Klaus Lichtenwalder 4 participants 5 messages Sep 13, 2011 – Sep 16, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

I just can't find any pointers. Problem is, our database guys want to use Oracle ASM (which is some kind of raw devices). To not mix things up between regular volumes and ASM devices, we decided to put them into a special vg (yes, oracle recommends against it, but you somehow has to administer the machines. And looking into their shell scripts, it seems to not being a thing of reason but more the lack of know how of handling arbitrary block devices).
Anyway, we'd like the devices to end up with owner oracle:dba. There seems to be no way, as udev does not create the devices but vgchange, to change the ownership than by using a start script somewhere between vgchange time and oracle asm start up.

Is there any other, more "canonical" way?

Klaus

Signature · 3 lines
------------------------------------------------------------------------
 Klaus Lichtenwalder, Dipl. Inform.,  http://www.lichtenwalder.name
 PGP Key fingerprint: BF52 72FA 1F5A 1E29 C0F8  498C C4C6 633C 2821 97DA
#1 lore raw

Klaus,
Have you tried to use the package oracleasm?

This package installs some binaries to manipulate ASM Disks, creating new devices (based on the originals /dev/sd*), into /dev/oracleasm/ and changing the owner of the devices.

Oracle Database does not use raw devices in RHEL anymore, by default. They recommend installing this package and administrate everything by it.

http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

I hope this helps.

Regards,

Quoted 29 lines · Klaus Lichtenwalder

Hi,

I just can't find any pointers. Problem is, our database guys want to use Oracle ASM (which is some kind of raw devices). To not mix things up between regular volumes and ASM devices, we decided to put them into a special vg (yes, oracle recommends against it, but you somehow has to administer the machines. And looking into their shell scripts, it seems to not being a thing of reason but more the lack of know how of handling arbitrary block devices).
Anyway, we'd like the devices to end up with owner oracle:dba. There seems to be no way, as udev does not create the devices but vgchange, to change the ownership than by using a start script somewhere between vgchange time and oracle asm start up.

Is there any other, more "canonical" way?

Klaus
--
------------------------------------------------------------------------
Klaus Lichtenwalder, Dipl. Inform., http://www.lichtenwalder.name
PGP Key fingerprint: BF52 72FA 1F5A 1E29 C0F8 498C C4C6 633C 2821 97DA

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 4 lines
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]
#2 lore raw

Am 14.09.2011 19:15, schrieb Carlos Eduardo Tavares Terra:

Quoted 7 lines

Klaus,
Have you tried to use the package oracleasm?

This package installs some binaries to manipulate ASM Disks, creating new devices (based on the originals /dev/sd*), into /dev/oracleasm/ and changing the owner of the devices.

Quoted 7 lines

Oracle Database does not use raw devices in RHEL anymore, by default. They recommend installing this package and administrate everything by it.

http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

I hope this helps.

Carlos,

actually, oracleasm is the reason I'm asking. Oracle recommends against using lvs, but in our domain we need to sort disks, so we want to use different vgs to avoid human error. Checking the shell scripts from oracle, it is clear why they don't like lvs. Not because probable performance problems from an additional layer of complexity, but because they use /proc/partitions to scan for disks. And vg-devices just don't show up there...
There are versions, though, that honor their ASM_SCANORDER flag and check the vg-Directory (SCANORDER="/mapper/vg_asm*/"), but different versions seem to not to do this.
I created a start script that mknods /dev/dm-X from /dev/mapper/vg_asm--* devices, but I consider this a kludge...

Thanks anyway,
Klaus

Signature · 3 lines
------------------------------------------------------------------------
 Klaus Lichtenwalder, Dipl. Inform.,  http://www.lichtenwalder.name
 PGP Key fingerprint: BF52 72FA 1F5A 1E29 C0F8  498C C4C6 633C 2821 97DA
#3 lore raw
Quoted 2 lines · Klaus Lichtenwalder

I created a start script that mknods /dev/dm-X from /dev/mapper/vg_asm--* devices, but I consider this a kludge...

Wouldn't symlinks be safer?

--

	      Stuart D. Gathman <[email protected]>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154

"Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.

#4 lore raw

Am 16.09.2011 19:19, schrieb Stuart D. Gathman:

Quoted 7 lines · Klaus Lichtenwalder
Quoted 3 lines

I created a start script that mknods /dev/dm-X from /dev/mapper/vg_asm--* devices, but I consider this a kludge...

Wouldn't symlinks be safer?

Stuart,

sorry for me being clueless, but why do you think symlinks being safer? I keep the dm-X X number consisten with the minor number of the device.

Klaus

Signature · 3 lines
------------------------------------------------------------------------
 Klaus Lichtenwalder, Dipl. Inform.,  http://www.lichtenwalder.name
 PGP Key fingerprint: BF52 72FA 1F5A 1E29 C0F8  498C C4C6 633C 2821 97DA