ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 删除ACFS系统碰到的问题

删除ACFS系统碰到的问题

原创 Linux操作系统 作者:yangtingkun 时间:2011-08-13 23:59:02 0 删除 编辑

尝试删除ACFS文件系统是碰到了错误。

 

 

首先尝试UMOUNT文件系统:

[oracle@xsh-server1 ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 435653856 192338280 220828536 47% /
/dev/sda1                       101086    16919     78948     18% /boot
tmpfs                           65968984  195784    65773200  1%  /dev/shm
/dev/asm/acfsdgvol1-57          624951296 165746644 459204652 27% /backup

[root@xsh-server1 ~]# umount -t acfs /backup

在节点2上执行同样的UMOUNT操作:

[root@xsh-server2 asm]# umount -t acfs /backup/

在节点1上取消acfs的注册信息:

[root@xsh-server1 ~]# acfsutil registry -m /dev/asm/acfsdgvol1-57
/backup
[root@xsh-server1 ~]# acfsutil registry -d /dev/asm/acfsdgvol1-57
acfsutil registry: successfully removed ACFS volume /dev/asm/acfsdgvol1-57 from Oracle Registry

但是随后删除acfs文件系统的时候出现了错误:

[root@xsh-server1 ~]# acfsutil rmfs /dev/asm/acfsdgvol1-57
acfsutil rmfs: ACFS-00511: /dev/asm/acfsdgvol1-57 is mounted on at least one node of the cluster.
acfsutil rmfs: ACFS-03014: file system not removed

由于文件系统无法删除,是的VOLUME同样无法删除:

[root@xsh-server1 ~]# su - grid
[grid@xsh-server1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Thu Aug 11 11:15:02 2011

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 Real Application Clusters and Automatic Storage Management options

SQL> SELECT GROUP_NUMBER, VOLUME_NAME, SIZE_MB, STATE, USAGE, VOLUME_DEVICE, MOUNTPATH
2 FROM V$ASM_VOLUME;

GROUP_NUMBER VOLUME_NAME SIZE_MB STATE   USAGE VOLUME_DEVICE          MOUNTPATH
------------ ----------- ------- ------- ----- ---------------------- ----------
           4 ACFSDGVOL1  610304  ENABLED ACFS  /dev/asm/acfsdgvol1-57 /backup

SQL> SELECT GROUP_NUMBER, NAME FROM V$ASM_DISKGROUP WHERE GROUP_NUMBER = 4;

GROUP_NUMBER NAME
------------ ------------------------------
           4 ACFSDG

SQL> ALTER DISKGROUP ACFSDG DISABLE VOLUME ACFSDGVOL1;
ALTER DISKGROUP ACFSDG DISABLE VOLUME ACFSDGVOL1
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15468: volume 'ACFSDGVOL1' in diskgroup 'ACFSDG' is currently being accessed

尝试在ASMCMD中操作,同样无法删除VOLUME

[grid@xsh-server1 ~]$ asmcmd
ASMCMD> volinfo -a
Diskgroup Name: ACFSDG

Volume Name: ACFSDGVOL1
Volume Device: /dev/asm/acfsdgvol1-57
State: ENABLED
Size (MB): 610304
Resize Unit (MB): 256
Redundancy: UNPROT
Stripe Columns: 4
Stripe Width (K): 128
Usage: ACFS
Mountpath: /backup

ASMCMD> voldelete -G ACFSDG ACFSDGVOL1
ORA-15032: not all alterations performed
ORA-15468: volume 'ACFSDGVOL1' in diskgroup 'ACFSDG' is currently being accessed (DBD ERROR: OCIStmtExecute)
ASMCMD> voldisable -a
ORA-15032: not all alterations performed
ORA-15468: volume 'ACFSDGVOL1' in diskgroup 'ACFSDG' is currently being accessed (DBD ERROR: OCIStmtExecute)
ASMCMD> quit
[grid@xsh-server1 ~]$ exit

尝试各种方法,都无法以常规的方法删除ACFS文件系统和ASM中创建的VOLUME,没有办法,最终只是使用强制的方法来删除:

[grid@xsh-server1 ~]$ id
uid=1300(grid) gid=1000(oinstall) groups=1000(oinstall),1200(dba) context=user_u:system_r:unconfined_t
[grid@xsh-server1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Thu Aug 11 12:59:35 2011

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 Real Application Clusters and Automatic Storage Management options

SQL> set pages 100 lines 120
SQL> SELECT GROUP_NUMBER, NAME FROM V$ASM_DISKGROUP;

GROUP_NUMBER NAME
------------ ------------------------------
           1 CRSDG
           2 DATADG
           3 FRADG
           4 ACFSDG

SQL> DROP DISKGROUP ACFSDG;
DROP DISKGROUP ACFSDG
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "ACFSDG" contains existing files


SQL> DROP DISKGROUP ACFSDG INCLUDING CONTENTS;
DROP DISKGROUP ACFSDG INCLUDING CONTENTS
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup "ACFSDG" precludes its dismount


SQL> DROP DISKGROUP ACFSDG FORCE INCLUDING CONTENTS;
DROP DISKGROUP ACFSDG FORCE INCLUDING CONTENTS
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15230: diskgroup 'ACFSDG' does not require the FORCE option


SQL> ALTER DISKGROUP ACFSDG DISMOUNT;
ALTER DISKGROUP ACFSDG DISMOUNT
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "ACFSDG" precludes its dismount


SQL> ALTER DISKGROUP ACFSDG DISMOUNT FORCE;

Diskgroup altered.

SQL> DROP DISKGROUP ACFSDG;
DROP DISKGROUP ACFSDG
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup "ACFSDG" does not exist or is not mounted


SQL> DROP DISKGROUP ACFSDG FORCE INCLUDING CONTENTS;
DROP DISKGROUP ACFSDG FORCE INCLUDING CONTENTS
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup ACFSDG is mounted by another ASM instance

利用DISMOUNT FORCE的选项,终于将磁盘组ACFSDG卸载,由于另外的ASM实例还加载这个磁盘组,因此这个磁盘组暂时还不能删除。

登录另外的实例,执行DISMOUNT操作:

[root@xsh-server2 dev]# su - grid
[grid@xsh-server2 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Thu Aug 11 13:11:55 2011

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 Real Application Clusters and Automatic Storage Management options

SQL> set pages 100 lines 120
SQL> select group_number, name, state from v$asm_diskgroup;

GROUP_NUMBER NAME STATE
------------ ------------------------------ -----------
1 CRSDG MOUNTED
2 DATADG MOUNTED
3 FRADG MOUNTED
4 ACFSDG MOUNTED

SQL> alter diskgroup acfsdg dismount;

Diskgroup altered.

下面会到第一个节点,再次执行删除操作:

SQL> DROP DISKGROUP ACFSDG;
DROP DISKGROUP ACFSDG
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup "ACFSDG" does not exist or is not mounted


SQL> DROP DISKGROUP ACFSDG FORCE INCLUDING CONTENTS;

Diskgroup dropped.

SQL> SELECT GROUP_NUMBER, NAME FROM V$ASM_DISKGROUP;

GROUP_NUMBER NAME
------------ ------------------------------
1 CRSDG
2 DATADG
3 FRADG

SQL> EXIT
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[grid@xsh-server1 ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 435653856 192353508 220813308 47% /
/dev/sda1                       101086    16919     78948     18% /boot
tmpfs                           65968984  195784    65773200  1%  /dev/shm

最后利用ORACLEASM删除对应的设备:

[grid@xsh-server1 ~]$ su -
Password:
[root@xsh-server1 ~]# oracleasm listdisks
VOL1
VOL2
VOL3
VOLACFS
[root@xsh-server1 ~]# oracleasm deletedisk VOLACFS
Clearing disk header: done
Dropping disk: done

在另外的节点执行检查ASM磁盘组和ORACLEASM设备,确认节点1上的操作在两个节点上都已经生效:

SQL> select group_number, name, state from v$asm_diskgroup;

GROUP_NUMBER NAME STATE
------------ ------------------------------ -----------
1 CRSDG MOUNTED
2 DATADG MOUNTED
3 FRADG MOUNTED

SQL> EXIT
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[grid@xsh-server2 ~]$ exit
logout

[root@xsh-server2 dev]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Cleaning disk "VOLACFS"
Scanning system for ASM disks...
[root@xsh-server2 dev]# oracleasm listdisks
VOL1
VOL2
VOL3

虽然最终通过强制的方式删除了ACFS文件系统和对应的磁盘组,但是这种强制的方式很可能在操作系统级别上还留下一下没有清除的信息。

显然ACFS这项新技术还存在很多的bug,而且在处理这个问题时也发现,即使是在metalink上,关于ACFS的信息也非常少,虽然存在一个和当前几乎完全一样的问题,但是并没有下文,Oracle也没有给出任何解决的方法。

如果打算在产品环境中使用ACFS,还是要经过大量的测试才行。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-704800/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10523148