你好,游客 登录 注册 搜索
背景:
阅读新闻

一次AIX 操作系统ASM添加磁盘的操作日志

[日期:2012-12-27] 来源:Linux社区  作者:eymit [字体:大 中 小]

二.删除已经不使用的VG,并把释放的PV添加至ASM

Bakvg原来用于存放备份文件,现在不需要了,决定把这个VG删除,释放磁盘加入到ASM中

 

 

1.删除VG对应的LV

 

使用lsvg –l vgname查看对应的文件系统,在删除VG之前需要先删除逻辑卷(LV),删除LV之前需要把文件系统卸载掉, 防止下次重启机器找不到相关的文件系统,一定要删除filesystem中对应的/backup启动参数

 

bash-3.00# umount /backup/

 

bash-3.00# vi /etc/filesystems

 

删除下面部分

/backup:

        dev            = /dev/bklv01

        vfs            = jfs2

        log            = /dev/loglv00

        mount          = true

        options        = rw

        account        = false

 

 

 

2.删除VG操作

 

bash-3.00# smit reducevg

 

选择  Remove a Physical Volume from a Volume Group,确认进入下一步

Move cursor to desired item and press Enter.

  Remove a Physical Volume from a Volume Group

  Remove a Volume Group

 

在各项中按F4选择 VOLUME GROUP name 和PHYSICAL VOLUME names,FORCE deallocation of all partitions on 选择为yes,也就是清除所有数据,回车后会有一些提示,全部选择yes

                              Remove a Physical Volume from a Volume Group

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

* VOLUME GROUP name                                  bkvg

* PHYSICAL VOLUME names                              [hdisk11]                                                                  +

  FORCE deallocation of all partitions on            yes                                                                        +

    this physical volume?

 

 

Before command completion, additional instructions may appear below.

 

0516-914 rmlv: Warning, all data belonging to logical volume

        bklv01 on physical volume hdisk11 will be destroyed.

rmlv: Do you wish to continue? y(es) n(o)? rmlv: Logical volume bklv01 is removed.

0516-914 rmlv: Warning, all data belonging to logical volume

        loglv00 on physical volume hdisk11 will be destroyed.

rmlv: Do you wish to continue? y(es) n(o)? rmlv: Logical volume loglv00 is removed.

ldeletepv: Volume Group deleted since it contains no physical volumes.

最后的状态为Command: OK            stdout: yes          stderr: no

 

3.清除释放的磁盘的PVID

bash-3.00# lspv|grep hdisk11

hdisk11        00c71c946e2767c5                    None           

bash-3.00#chdev -l hdisk11 -a pv=clear

hdisk11 changed

bash-3.00# lspv|grep hdisk11

hdisk11        none                                None           

 

4.建立设备链接和赋权

查看原来磁盘对应的别名,计划把新的磁盘hidisk11命名为asmdisk6

SQL> select t.PATH from v$asm_disk t where t.path like '%asmdisk%';

 

PATH

--------------------------------------------------------------------------------

/dev/asmdisk1

/dev/asmdisk2

/dev/asmdisk3

/dev/asmdisk4

/dev/asmdisk5

 

bash-3.00# ls -lrt|grep hdisk11

brw-------    1 root    system      22, 11 Jun 08 2011  hdisk11

crw-------    1 root    system      22, 11 Jul 03 15:18 rhdisk11

 

bash-3.00# mknod /dev/asmdisk6 c 22 11

bash-3.00# chown grid:asmdba  /dev/asmdisk6

bash-3.00# chmod 660 /dev/asmdisk6

查看结果

bash-3.00# ls -lrt|grep '22, 11'

brw-------    1 root    system      22, 11 Jun 08 2011  hdisk11

crw-------    1 root    system      22, 11 Jul 03 15:18 rhdisk11

crw-rw----    1 grid    asmdba      22, 11 Jul 03 15:29 asmdisk6

 

 

5.把磁盘加入到disk group中

这次要加到DATADG里面

登陆到grid用户

bash-3.00$ sqlplus "/as sysasm"

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jun 6 16:21:57 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Automatic Storage Management option

SQL> alter diskgroup DATADG  add disk '/dev/asmdisk6';

Diskgroup altered.

 

6.查看各磁盘使用情况

select group_number, name, TOTAL_MB, FREE_MB  from V$asm_disk_stat;

linux
相关资讯       AIX 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款