文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

10G ORACLE RAC 搭建实战之LINUX LVM划分

2024-04-02 19:55

关注

 LVM划分

  1. 1.划分说明

服务器对存储设备的访问采用多路径技术    (Linux Device Mapper Multipathing),多路径设备配置完毕后,会在/dev/mapper/ 发现mpthX的多路径设备,可以使用lvcreate将其中一个设备划分为一个物理卷。

本次扩容的日立裸存储设备共有900G*10空间,做RAID1+0后,实际可用存储为约为3T分6个pv (一个pv 500G),分6个卷组--oravg01-06,一个卷组下分一个PV。

Oracle 各主要数据文件分配大小:

temp:80G        undo:60G       SAP:819G        SMS:999G

BCA_YW:100G    BCA_GW:100G   APP:200G       indx:200G    

 

备注:划分时发现,对一台服务器划分到LV后,另一台也能识别相同的LV,但是VG处于不活动状态,需要进行激活。

  1. 2.创建PV

pvcreate /dev/mapper/mpath2

pvcreate/dev/mapper/mpath3

pvcreate/dev/mapper/mpath4

pvcreate/dev/mapper/mpath5

pvcreate/dev/mapper/mpath6

pvcreate/dev/mapper/mpath7

 

查看PV属性

[root@rac1 ~]#pvdisplay

  "/dev/mpath/mpath2" is a newphysical volume of "500.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/mpath/mpath2

  VG Name              

  PV Size               500.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE               0

  Allocated PE          0

  PV UUID              TtAWwc-5hZF-0ZLt-TVuP-Jn9f-n2FQ-oaLCDh

  

  "/dev/mpath/mpath3" is a newphysical volume of "500.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/mpath/mpath3

  VG Name              

  PV Size               500.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE               0

  Allocated PE          0

  PV UUID              GiUA3r-cHfQ-LF0m-FBQt-K0yK-0jbH-GayMhX

  

  "/dev/mpath/mpath4" is a newphysical volume of "500.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/mpath/mpath4

  VG Name              

  PV Size               500.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE               0

  Allocated PE          0

  PV UUID              HjaH7y-Zoy9-xl1N-m2QU-JeUI-QyzN-ZWutNq

  

  "/dev/mpath/mpath5" is a newphysical volume of "500.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/mpath/mpath5

  VG Name              

  PV Size               500.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE               0

  Allocated PE          0

  PV UUID              zJbntF-iZae-BTn6-fleK-PGKn-jvIr-GHLT0D

  

  "/dev/mpath/mpath6" is a newphysical volume of "500.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/mpath/mpath6

  VG Name              

  PV Size               500.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE              0

  Allocated PE          0

  PV UUID              KAt3j4-NnAP-C018-BUM1-Xfhv-UYY6-Zdy3PD

  

  "/dev/mpath/mpath7" is a newphysical volume of "500.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/mpath/mpath7

  VG Name              

  PV Size               500.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE               0

  Allocated PE          0

  PV UUID              q1I884-vCgj-EMb8-FwI3-1Oqn-CuGo-wjF7nW

 

  1. 3.     创建VG

创建6个VG,一个VG下分一个PV,默认PE=4M,一个VG 500G

[root@rac1 ~]# vgcreate oravg01 /dev/mpath/mpath2

  Volume group"oravg01" successfully created

[root@rac1 ~]# vgcreate oravg02 /dev/mpath/mpath3

  Volume group"oravg02" successfully created

[root@rac1 ~]# vgcreate oravg03 /dev/mpath/mpath4

  Volume group"oravg03" successfully created

[root@rac1 ~]# vgcreate oravg04 /dev/mpath/mpath5

  Volume group"oravg04" successfully created

[root@rac1 ~]# vgcreate oravg05 /dev/mpath/mpath6

  Volume group"oravg05" successfully created

[root@rac1 ~]# vgcreate oravg06 /dev/mpath/mpath7

  Volume group"oravg06" successfully created


查看VG

[root@rac1 ~]# vgdisplay

  --- Volume group ---

  VG Name               oravg06

  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               500.00 GB

  PE Size               4.00 MB

  Total PE              127999

  Alloc PE / Size       0 / 0  

  Free  PE / Size       127999 / 500.00 GB

  VG UUID              wevGwC-kmhe-3ho9-4CRk-GVnt-hOvE-2qq93g


  --- Volume group ---

  VG Name               oravg05

  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               500.00 GB

  PE Size               4.00 MB

  Total PE              127999

  Alloc PE / Size       0 / 0  

  Free  PE / Size       127999 / 500.00 GB

  VG UUID              P6pEjs-SHzZ-Rxql-XIwR-uOff-euw5-kPJpQg


  --- Volume group ---

  VG Name               oravg04

  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               500.00 GB

  PE Size               4.00 MB

  Total PE              127999

  Alloc PE / Size       0 / 0  

  Free  PE / Size       127999 / 500.00 GB

  VG UUID              K9yT9I-21Wg-48Ye-k1TY-ge3F-354N-EGYuPc


  --- Volume group ---

  VG Name               oravg03

  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               500.00 GB

  PE Size               4.00 MB

  Total PE              127999

  Alloc PE / Size       0 / 0  

  Free  PE / Size       127999 / 500.00 GB

  VG UUID              B4Nmcz-CEQK-yIL7-tn9j-SB03-e0GU-WUSlic


  --- Volume group ---

  VG Name               oravg02

  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               500.00 GB

  PE Size               4.00 MB

  Total PE              127999

  Alloc PE / Size       0 / 0  

  Free  PE / Size       127999 / 500.00 GB

  VG UUID              3ydc98-DgkI-P8F5-HlGd-B2xO-mX0o-eE3zsn


  --- Volume group ---

  VG Name               oravg01

  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               500.00 GB

  PE Size               4.00 MB

  Total PE              127999

  Alloc PE / Size       0 / 0  

  Free  PE / Size       127999 / 500.00 GB

  VG UUID              Ei6ZDe-29bP-XARY-qpCe-Qsve-y9Py-YtaKUw


  1. 4.     创建LV

注:这里创建lv大小时,最好分配得比预先设计的大一些

依次创建LV(省略)

[root@rac1 ~]# lvcreate -L 512M oravg01

Logical volume "lvol0" created

 

扫描系统存在的LV

[root@rac1 ~]# lvscan

  ACTIVE            '/dev/oravg01/lvol0' [512.00 MB]inherit

 

查看VG属性

[root@rac1 ~]# vgdisplay -P oravg01

 Partial mode. Incomplete logical volumes will be processed.

  ---Volume group ---

  VGName               oravg01

 System ID            

 Format                lvm2

 Metadata Areas        1

 Metadata Sequence No  39

  VGAccess             read/write

  VGStatus             resizable

  MAXLV                0

  CurLV                38

 Open LV               0

  MaxPV                0

  CurPV                1

  ActPV                1

  VGSize               500.00 GB

  PESize               4.00 MB

 Total PE              127999

  AllocPE / Size       121216 / 473.50 GB

 Free  PE / Size       6783 / 26.50 GB

  VGUUID              Ei6ZDe-29bP-XARY-qpCe-Qsve-y9Py-YtaKUw

 


阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-人工智能
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯