Oracle使用raw via lvm

为另外一个公司的一个生产库处理raw使用的问题,现场人员说要把新的lvm的空间给oracle使用,已经化好lv了,也绑定了映射,但是一

早上为另外一个公司的一个生产库处理raw使用的问题,现场人员说要把新的lvm的空间给oracle使用,,已经化好lv了,也绑定了映射,但是一直看不到raw;检查了下相关绑定规则参数,而且已经有在使用的规则绑定,他只是copy了新的规则并稍作修改,但是就是不生效。以下是测试过程。

[root@o564gtser1 ~]# fdisk -l Disk /dev/sdd

Disk /dev/sdd: 524 MB, 524288000 bytes
255 heads, 63 sectors/track, 63 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn’t contain a valid partition table
[root@o564gtser1 ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.

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

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-63, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-63, default 63):
Using default value 63

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@o564gtser1 ~]# pvcreate /dev/sdd1
Physical volume “/dev/sdd1” successfully created
[root@o564gtser1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdd1 lvm2 a- 494.16M 494.16M
[root@o564gtser1 ~]# pvdisplay
“/dev/sdd1” is a new physical volume of “494.16 MB”
— NEW Physical volume —
PV Name /dev/sdd1
VG Name
PV Size 494.16 MB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID bgfuhw-eOve-5n87-gKoV-ApCh-GDuv-0WKzJ3

[root@o564gtser1 ~]# vgcreate oravg /dev/sdd1
Volume group “oravg” successfully created
[root@o564gtser1 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
oravg 1 0 0 wz–n- 492.00M 492.00M
[root@o564gtser1 ~]# vgdisplay
— Volume group —
VG Name oravg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 492.00 MB
PE Size 4.00 MB
Total PE 123
Alloc PE / Size 0 / 0
Free PE / Size 123 / 492.00 MB
VG UUID 6KYQkB-3W81-fMAa-vBJ0-9UXk-jaRd-XRMOUQ

[root@o564gtser1 ~]# vgs oravg
VG #PV #LV #SN Attr VSize VFree
oravg 1 0 0 wz–n- 492.00M 492.00M
[root@o564gtser1 ~]# vgdisplay oravg
— Volume group —
VG Name oravg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 492.00 MB
PE Size 4.00 MB
Total PE 123
Alloc PE / Size 0 / 0
Free PE / Size 123 / 492.00 MB
VG UUID 6KYQkB-3W81-fMAa-vBJ0-9UXk-jaRd-XRMOUQ

[root@o564gtser1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdd1 oravg lvm2 a- 492.00M 492.00M
[root@o564gtser1 ~]# lvcreate -L200MB -n oralv1 oravg
Logical volume “oralv1” created
[root@o564gtser1 ~]# lvcreate -L200MB -n oralv2 oravg
Logical volume “oralv2” created
[root@o564gtser1 ~]# vgdisplay -v
Finding all volume groups
Finding volume group “oravg”
— Volume group —
VG Name oravg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 492.00 MB
PE Size 4.00 MB
Total PE 123
Alloc PE / Size 100 / 400.00 MB
Free PE / Size 23 / 92.00 MB
VG UUID 6KYQkB-3W81-fMAa-vBJ0-9UXk-jaRd-XRMOUQ

— Logical volume —
LV Name /dev/oravg/oralv1
VG Name oravg
LV UUID p5LNXk-X32Y-hAV7-sZQZ-7SId-OOPp-7QCpFK
LV Write Access read/write
LV Status available
# open 0
LV Size 200.00 MB
Current LE 50
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0

— Logical volume —
LV Name /dev/oravg/oralv2
VG Name oravg
LV UUID 7gFlM5-miH2-ARpg-1LTc-FQb5-zQX6-Hk0d5u
LV Write Access read/write
LV Status available
# open 0
LV Size 200.00 MB
Current LE 50
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:1

— Physical volumes —
PV Name /dev/sdd1
PV UUID bgfuhw-eOve-5n87-gKoV-ApCh-GDuv-0WKzJ3
PV Status allocatable
Total PE / Free PE 123 / 23

[root@o564gtser1 ~]# ls -lL /dev/oravg/oralv*
brw-rw—- 1 root disk 253, 0 04-18 12:27 /dev/oravg/oralv1
brw-rw—- 1 root disk 253, 1 04-18 12:27 /dev/oravg/oralv2
[root@o564gtser1 ~]# ls /dev/mapper/* -l
crw——- 1 root root 10, 62 04-18 12:20 /dev/mapper/control
brw-rw—- 1 root disk 253, 0 04-18 12:27 /dev/mapper/oravg-oralv1
brw-rw—- 1 root disk 253, 1 04-18 12:27 /dev/mapper/oravg-oralv2
[root@o564gtser1 ~]# vi /etc/udev/rules.d/60-raw.rules
# Enter raw device bindings here.
#
# An example would be:
# ACTION==”add”, KERNEL==”sda”, RUN+=”/bin/raw /dev/raw/raw1 %N”
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION==”add”, ENV{MAJOR}==”8″, ENV{MINOR}==”1″, RUN+=”/bin/raw /dev/raw/raw2 %M %m”
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
“/etc/udev/rules.d/60-raw.rules” 11L, 472C written

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/1893331.html

(0)
上一篇 2025年2月22日 13:31:16
下一篇 2025年2月22日 13:31:42

AD推荐 黄金广告位招租... 更多推荐

相关推荐

  • Oracle raw数据类型介绍

    在网络中的计算机之间传输 RAW 数据时,或者使用 Oracle 实用程序将 RAW 数据从一个数据库移到另一个数据库时,Oracle 服务器不执 这个类型以前没碰到过,知道昨天有人问我,我才研究了一下。后来发现原来oracle数据字典里面…

    数据库 2025年2月22日
    100

发表回复

登录后才能评论