Oracle ASM 11g: Does the ASMCMD cp Command Really Work?
Since the introduction of ASM in Oracle 10g Release 1, every ASM administrator has been dreaming of a simple command line tool to copy files between ASM diskgroups and other filesystems. Oracle ASM 10g Release 2 added the handy asmcmd utility, but even though everyone expected a copy command there, it had not been implemented.
The only way to copy files to or from an ASM diskgroup was either to use RMAN, to configure XDB for FTP access, or use the DBMS_FILE_TRANSFER package. No wonder that the cp command is the most popular addition to asmcmd tool in Oracle ASM 11g: the hardest barrier to convincing my customers to use ASM has been the inability to access the files and copy them to the OS filesystem using the command-line copy command. Customers wanted to “feel” the files and be able to easily manipulate them.
While working on a Collaborate 08 presentation on Oracle 11g new features out-of-the-box, I was verifying new commands in Oracle ASM 11g’s asmcmd utility. It turned our that copying files from or to ASM is still a problem.
First, I tried to copy a single text file to an ASM diskgroup:
ASMCMD> cp /home/oracle/.bash_profile +dg2/test.file source /home/oracle/.bash_profile target +dg2/test.file ASMCMD-08012: can not determine file type for file->'/home/oracle/.bash_profile' ORA-15056: additional error message ORA-17503: ksfdopn:DGGetFileAttr15 Failed to open file /home/oracle/.bash_profile ORA-27046: file size is not a multiple of logical block size Additional information: 1 ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 207 ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)
Hmm . . . Okay. Let’s try to do it in multiples of diskgroup blocks: Read the rest of this entry . . .
