asm on lvm lv disks

Installation and support for Oracle DB on CentOS.
Post Reply
Tregarth
Posts: 3
Joined: 2012/05/18 18:24:32

asm on lvm lv disks

Post by Tregarth » 2012/05/21 07:53:03

Hello,

I would like to change permission for my lv, now I have:

[code]
[root@xxx dev]# ls -lv /dev/mapper/
total 0
crw------- 1 root root 10, 60 May 18 14:23 control
brw-rw---- 1 root disk 253, 2 May 18 14:23 vg_main-asmlvol1
brw-rw---- 1 root disk 253, 3 May 18 14:23 vg_main-asmlvol2
brw-rw---- 1 root disk 253, 4 May 18 14:23 vg_main-asmlvol3
brw-rw---- 1 root disk 253, 5 May 18 14:23 vg_main-asmlvol4
brw-rw---- 1 root disk 253, 6 May 18 14:23 vg_main-asmlvol5
brw-rw---- 1 root disk 253, 7 May 18 14:23 vg_main-asmlvol6
brw-rw---- 1 root disk 253, 8 May 18 14:23 vg_main-asmlvol7
brw-rw---- 1 root disk 253, 9 May 18 14:23 vg_main-asmlvol8
brw-rw---- 1 root disk 253, 10 May 18 14:23 vg_main-asmlvol9
brw-rw---- 1 root disk 253, 11 May 18 14:23 vg_main-asmlvol10
brw-rw---- 1 root disk 253, 12 May 18 14:23 vg_main-asmlvol11
brw-rw---- 1 root disk 253, 13 May 18 14:23 vg_main-asmlvol12
brw-rw---- 1 root disk 253, 1 May 18 14:23 vg_main-lv01_swap
brw-rw---- 1 root disk 253, 0 May 18 14:23 vg_main-lv02_root
[/code]

and I need to get to this (changed with simple chown grid:asmdba /dev/mapper/vg_main-asmlvol1):

[code]
brw-rw---- 1 grid asmdba 253, 2 May 18 14:23 vg_main-asmlvol1
[/code]

I've tried to add rules in /etc/udev/rules.d/99-oracle.rules as follows (any of below options) to preserve those permission after restart but with no luck:

[code]
KERNEL=="vg_main-asmlvol*", OWNER="grid", GROUP="asmadmin", MODE="0660"
SUBSYSTEM=="block", KERNEL=="/dev/mapper/vg_main-asmlvol1", GROUP="asmdba", MODE="0640"
ENV{DM_VG_NAME}=="vg_main", ENV{DM_LV_NAME}=="vg_main-asmlvol*", OWNER="grid", GROUP="asmdba", MODE="0660"
[/code]

In CentOS 6.2 I could get this working with getting information about devices from udevadm hierarhy output for /dev/dm-n device. In CentOS 5.8 I don't see any of /dev/dm-n devices and I haven't got any udevadm executable too. Please, advice, how to get right rules.

My system is:

[code]
[root@xxx dev]# cat /etc/issue
CentOS release 5.8 (Final)
Kernel \r on an \m

[root@xxx dev]# uname -a
Linux xxx 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:00 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[/code]

PS: for CentOS 6.2 I've created proper rule basing on this article: http://www.reactivated.net/writing_udev_rules.html

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

asm on lvm lv disks

Post by pschaff » 2012/05/21 21:08:55

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

What is the point of changing ownership of the LVM devices? Setting the ownership of files/filesystems is usually what would be needed.

Tregarth
Posts: 3
Joined: 2012/05/18 18:24:32

Re: asm on lvm lv disks

Post by Tregarth » 2012/05/22 06:03:50

Standard solution from Oracle Docs:

http://docs.oracle.com/cd/E11882_01/install.112/e24321/pre_install.htm#BABGCBBG

Despite the fact that LVM is not recommended by Oracle it is not impossible to do this on LVM. In CentOS 6.2 I couldn't get Oracle Restart work properly (11.2.0.3.0 witch should be fully compatible with 6.x) so I've downgraded to CentOS 5.

Scrapper64
Posts: 16
Joined: 2012/05/24 23:59:39
Location: Metro-Atlanta, Georgia

Re: asm on lvm lv disks

Post by Scrapper64 » 2012/05/26 21:59:52

I really can't comment on the use of ASM, but what I can comment on is the ownership/permission issue. I work at a shop that runs Oracle on Linux (mostly RHEL). The way we resolved the issue was to add the chmod and chown in the /etc/rc.local file. We've been doing this since RHEL 4 and didn't change on our RHEL 6.2 test box.

TIA
Scrapper64

Tregarth
Posts: 3
Joined: 2012/05/18 18:24:32

Re: asm on lvm lv disks

Post by Tregarth » 2012/05/28 21:26:21

@Scrapper64

Thanks for confirmation about this issue. I'll add script to /etc/rc.d/init.d/ with level 35 through chkconfig with my own "Oracle Restart"... :-?

Post Reply

Return to “CentOS 5 - Oracle Installation and Support”