oracle在linux上使用裸设备,Oracle11gR2在Oracle linux6.3上使用裸设备

增加了1块1G的盘

[root@OEL63 u01]# fdisk -l

Disk /dev/sdb: 1073 MB, 1073741824 bytes

255 heads, 63 sectors/track, 130 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Sector size (logical/physical): 512 bytes /512 bytes

I/O size (minimum/optimal): 512 bytes / 512bytes

Disk identifier: 0x00000000

分区

[root@OEL63 u01]# fdisk /dev/sdb

Device contains neither a valid DOSpartition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with diskidentifier 0x3d49ddef.

Changes will remain in memory only, untilyou decide to write them.

After that, of course, the previous contentwon't be recoverable.

Warning: invalid flag 0x0000 of partitiontable 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated.It's strongly recommended to

switch off the mode (command 'c') and change display units to

sectors (command 'u').

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-130, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G}(1-130, default 130):

Using default value 130

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@OEL63 u01]#

配置裸设备

Linux5之后管理裸设备的方法有变化。

[root@OEL63 rules.d]# vi/etc/udev/rules.d/60-raw.rules

ACTION=="add",KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"

KERNEL=="raw*",OWNER="oracle", GROUP="oinstall", MODE="740"

然后重启机器

使用裸设备

[oracle@OEL63 qing]$ ls /dev/raw/raw*

/dev/raw/raw1  /dev/raw/rawctl

[oracle@OEL63 qing]$ ln -s /dev/raw/raw1redo04.raw

[oracle@OEL63 qing]$ pwd

/u01/oracle/oradata/qing

[oracle@OEL63 qing]$ ls -l/u01/oracle/oradata/qing/redo04.raw

lrwxrwxrwx 1 oracle oinstall 13 Sep 1604:49 /u01/oracle/oradata/qing/redo04.raw -> /dev/raw/raw1

SQL> alter database add logfile group 4('/u01/oracle/oradata/qing/redo04.raw') size 50m;

Database altered.

切换试试:

SQL> alter system switch logfile;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值