ASMCMD [+] > lsdsk -p
Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path
4 0 3915930866 CACHED MEMBER ONLINE NORMAL /dev/raw/raw1
3 0 3915930863 CACHED MEMBER ONLINE NORMAL /dev/raw/raw10
5 0 3915930867 CACHED MEMBER ONLINE NORMAL /dev/raw/raw11
4 1 3915930865 CACHED MEMBER ONLINE NORMAL /dev/raw/raw2
4 2 3915930864 CACHED MEMBER ONLINE NORMAL /dev/raw/raw3
1 0 3915930860 CACHED MEMBER ONLINE NORMAL /dev/raw/raw4
1 1 3915930859 CACHED MEMBER ONLINE NORMAL /dev/raw/raw5
1 2 3915930858 CACHED MEMBER ONLINE NORMAL /dev/raw/raw6
1 3 3915930857 CACHED MEMBER ONLINE NORMAL /dev/raw/raw7
2 0 3915930862 CACHED MEMBER ONLINE NORMAL /dev/raw/raw8
2 1 3915930861 CACHED MEMBER ONLINE NORMAL /dev/raw/raw9
ASMCMD [+] > lsdsk -t
Create_Date Mount_Date Repair_Timer Path
2011-12-08 15:28:48 2013-07-14 00:23:34 0 /dev/raw/raw1
2013-07-10 06:51:58 2013-07-14 00:23:33 0 /dev/raw/raw10
2011-12-28 18:57:13 2013-07-14 00:23:35 0 /dev/raw/raw11
2011-12-08 15:28:48 2013-07-14 00:23:34 0 /dev/raw/raw2
2011-12-08 15:28:48 2013-07-14 00:23:34 0 /dev/raw/raw3
2011-12-08 19:44:34 2013-07-14 00:23:32 0 /dev/raw/raw4
2011-12-08 19:44:34 2013-07-14 00:23:32 0 /dev/raw/raw5
2011-12-08 19:44:34 2013-07-14 00:23:32 0 /dev/raw/raw6
2011-12-08 19:44:34 2013-07-14 00:23:32 0 /dev/raw/raw7
2013-07-10 06:08:09 2013-07-14 00:23:33 0 /dev/raw/raw8
2013-07-10 06:08:09 2013-07-14 00:23:33 0 /dev/raw/raw9
这里顺便想提一下,V$ASM_DISK和V$ASM_DISK_STAT两个视图之间的区别在于查询V$ASM_DISK视图每次都会扫描磁盘头获取相关信息,而查询V$ASM_DISK_STAT视图相关信息是从内存中获取,这两个视图之间是有时间差,所以比较两个视图之间的数据差异可以获得ASM磁盘的IO性能等指标。其它的视图也有类似功能。
4.可以使用cp命令在ASM和本地、远程操作系统文件系统之间直接拷贝数据。下面是该命令的用法:
cp [-i][-f][connect_str:]src_file [connect_str:]tgt_file
ASMCMD [+data1/orcl/datafile] > cp USERS.276.816871609 /tmp/users01.dbf
copying +data1/orcl/datafile/USERS.276.816871609 -> /tmp/users01.dbf
ASMCMD [+data1/orcl/datafile] > cp /tmp/users01.dbf +DATA/users01.dbf
copying /tmp/users01.dbf -> +DATA/users01.dbf
cp只能拷贝Oracle自身的文件类型,例如:数据文件、日志文件等。
ASMCMD [+data1/orcl/datafile] > cd +DATA
ASMCMD [+DATA] > ls
ASM/
rhel-cluster/
users01.dbf
ASMCMD [+DATA] > ls -l
Type Redund Striped Time Sys Name
Y ASM/
Y rhel-cluster/
N users01.dbf => +DATA/ASM/DATAFILE/users01.dbf.256.820716625