Monthly Archives: 七月 2014

在11gr2 Grid 上更改时区

0

Posted on by

grid 11.2.0.2 之后的版本(包含11.2.0.2),时区的配置文件是

 $GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt 这个文件中的

 

Grid Time Zone Setting

Once OS default timezone is changed, make sure:

1. For 11.2.0.1, shell environment variable TZ is set correctly for grid user and root.
2. For 11.2.0.2 and above, TZ entry in $GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt sets to correct time zone.

 

 

OS Default Timezone Setting

Linux

To change: /usr/sbin/timeconfig

To display current setting:

cat /etc/sysconfig/clock
ZONE="America/Los_Angeles"
UTC=true
ARC=false

To find out all valid setting: ls -l /usr/share/zoneinfo

Anything that appears in this directory is valid to use, for example, CST6CDT and America/Chicago. 
 
Note: the "Zone" field in /etc/sysconfig/clock could be different than what's in /usr/share/zoneinfo in OL6.3/RHEL6.3, the one from /usr/share/zoneinfo should be used in $GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt

 

hp-ux 

To display current setting:

cat /etc/default/tz
PST8PDT

To change: set_parms timezone  
 
To find out all valid setting: ls -l /usr/lib/tztab

 

Solaris

To display current setting:

grep TZ /etc/TIMEZONE
TZ=US/Pacific

To change on x64, modify TIMEZONE, also run "rtc -z US/pacific; rtc -c"

To find out all valid settings: ls -l /usr/share/lib/zoneinfo

   

AIX

To display current setting:

grep TZ /etc/environment
TZ=GMT

Refer to the following URL for more about timezone on AIX:

http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/environment.htm

 

参考:How To Change Timezone for 11gR2 Grid Infrastructure (文档 ID 1209444.1)

redhat 6用udev设置multipath盘的权限

1

Posted on by

   在操作系统redhat 6上,重启multipath服务,盘的权限就变root了,需要用udev绑定设置权限。

查看设备

[root@oradbca ~]# dmsetup ls 
data01  (253:2)
crs03   (253:3)
VG0-LV_ROOT     (253:6)
crs02   (253:1)
crs01   (253:0)
data03  (253:5)
data02  (253:4)

 

配置参数

[root@oradbca ~]# cat /etc/udev/rules.d/12-dm-permissions.rules 
ENV{DM_NAME}=="crs01", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="crs02", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="crs03", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="data01", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="data02", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="data03", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"

 

重启服务

	service multipath restart

 

查看权限

[root@oradbca ~]# ll /dev/dm-*
brw-rw---- 1 grid asmadmin 253, 0 Jul 23 14:26 /dev/dm-0
brw-rw---- 1 grid asmadmin 253, 1 Jul 23 14:26 /dev/dm-1
brw-rw---- 1 grid asmadmin 253, 2 Jul 13 03:48 /dev/dm-2
brw-rw---- 1 grid asmadmin 253, 3 Jul 23 14:26 /dev/dm-3
brw-rw---- 1 grid asmadmin 253, 4 Jul 13 03:48 /dev/dm-4
brw-rw---- 1 grid asmadmin 253, 5 Jul 23 14:26 /dev/dm-5
brw-rw---- 1 root disk     253, 6 Jul 13 03:04 /dev/dm-6

 

贴multipath配置文件:

blacklist {
        devnode "^(sda)"
#       devnode "^(ram|raw|loop|fd|md|sr|scd|st|sdh|sdq)[0-9]*"
        devnode "^cciss.*"
}

## Use user friendly names, instead of using WWIDs as names.
defaults {
        user_friendly_names yes
        max_fds             max
        queue_without_daemon no  
        flush_on_last_del yes 
        dev_loss_tmo infinity
        fast_io_fail_tmo 5
}


devices {
        device {
                vendor                  "NetAPP"
                product                 "FAS2240"
                path_grouping_policy    group_by_prio
                features                "3 queue_if_no_path pg_init_retries 50"
                prio                    "ontap"
                getuid_callout          "/lib/udev/scsi_id -g -u -d /dev/%n"
                path_checker            tur
                path_selector           "round-robin 0"
                hardware_handler        "0"
                failback                imediate
                rr_weight               uniform
                rr_min_io               128
        }
}




multipaths {
        multipath {
                wwid                    360a98000426b5953423f456e30774c61
                alias                   crs01
        }
        multipath {
                wwid                    360a98000426b5953423f456e30774c63
                alias                   crs02
        }
        multipath {
                wwid                    360a98000426b5953423f456e30774c65
                alias                   crs03
        }
                multipath {
                wwid                    360a98000426b5953423f456e30774c67
                alias                   data01
        }
                multipath {
                wwid                    360a98000426b5953423f456e30774c69
                alias                   data02
        }
                multipath {
                wwid                    360a98000426b5953423f456e30774c6b
                alias                   data03
        }
}