This discussion is archived
4 Replies Latest reply: Dec 6, 2012 11:12 PM by P.Forstmann RSS

Deleting Virtual Raw Disk

928943 Newbie
Currently Being Moderated
My understanding says that asmtool fake OS files as hard disk and get Oracle to recognise them as usable storage, as though they were hard disks? am i right ? as i have created the OS files using OS command in windows 7 and Mimicked these files using asmtool. After creating these file when i try to delete it using asmtool it says.
C:\Windows\system32>asmtool -delete ORCLDISKRAW1
ASM-00204: Ignoring ORCLDISKRAW1: not a valid ASM partition
How can i achieve the above using asmtool? What i understand asmtool could be used diffrent partition disk to make one unit and hence the different partition should be raw one not an OS formatted like NTFS , FAT etc. Asmtool is not only for creating the fake disk it could be used for production environment SAN disks to make one ASM formatted chunk isnt?

Sumon
  • 1. Re: Deleting Virtual Raw Disk
    P.Forstmann Guru
    Currently Being Moderated
    925940 wrote:
    My understanding says that asmtool fake OS files as hard disk and get Oracle to recognise them as usable storage, as though they were hard disks?
    asmtool can work with hard disk, partition or file but files are not supported for production environments.

    What is the output of:
    asmtool -list
    It looks like you cannot use asmtool to remove a stamp created on a file (tested with 10.2.0.5 on Windows7):
    C:\Windows\system32>asmtool -create c:\tmp\disk1.asm 10m
    
    C:\Windows\system32>asmtool -list
    NTFS                             \Device\Harddisk0\Partition1            14000M
    NTFS                             \Device\Harddisk0\Partition2              100M
    NTFS                             \Device\Harddisk0\Partition3            97663M
    NTFS                             \Device\Harddisk0\Partition4           842102M
    FAT32                            \Device\Harddisk1\Partition1           152625M
    NTFS                             \Device\Harddisk2\Partition1           476937M
    
    C:\Windows\system32>asmtool -delete c:\tmp\disk1.asm
    ASM-00204: Ignoring ORCLDISKC:\TMP\DISK1.ASM: not a valid ASM partition
    
    C:\Windows\system32>asmtool -delete ORCLDISKC
    ASM-00204: Ignoring ORCLDISKC: not a valid ASM partition
    Edited by: P. Forstmann on 6 déc. 2012 08:53
  • 2. Re: Deleting Virtual Raw Disk
    LaserSoft Journeyer
    Currently Being Moderated
    Hi

    We can delete using asmtool in windows.

    MS Windows platforms using 'asmtool' (command line) or 'asmtoolg' (GUI)

    Step 1 : C:\>asmtool -delete \\.\ORCLDISKASM1
    Step 2 : SQL> select header_status,path from v$asm_disk; (After Connecting ASM Instance)

    Note : You should see the header_status for the cleared disks as " CANDIDATE " which means that disk's metadata erased and it can be used again.

    Step 3 : SQL> select GROUP_NUMBER,NAME,HEADER_STATUS,TOTAL_MB,FREE_MB from V$ASM_DISK;

    If you dropped all diskgroup member disks, you should not see the diskgroup any more because all its member disks were cleared.

    Step 4 : SQL> select name,STATE from v$asm_diskgroup;

    Thanks
    LaserSoft
  • 3. Re: Deleting Virtual Raw Disk
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,

    Oracle allow for test purpose you to use "cooked files" (as disk) to test ASM feature.

    On *NIX platform we have "dd" command that create  "cooked files" which will server as "disk". Each "disk" from cooked files should be initialized with binary "zero". (i.e using /dev/zero)

    On Windows platform we don't have "dd" command or "/dev/zero", so to solve this problem Oracle added flag "create" on utility "asmtool" that allow to create a cooked file to be used as "disk".

    The purpose of "create" flag is to supply lack of resource (i.e dd and /dev/zero) in the platform that does not have the feature necessary to create the "cooked file."

    For this reason you don't need "delete" this file using "asmtool". If you don't want to use this file anymore just delete using "del" command from your Windows.

    Although "delete" and "create" flag are antonyms, has nothing to do with one to another, I mean yours task.

    Note: When ASMTOOL did not have flag "create" we used "dd" command from cygwin. Also works well.

    Regards,
    Levi Pereira
  • 4. Re: Deleting Virtual Raw Disk
    P.Forstmann Guru
    Currently Being Moderated
    My previous test case is wrong: once -create has created the virtual ASM disk, it is not possible to stamp it with -add:
    c:\tmp>asmtool -create c:\tmp\disk1.asm 10
    
    c:\tmp>asmtool -add c:\tmp\disk1.asm ORCLDISKASM0
    ASM-00202: Invalid device string C:\TMP\DISK1.ASM
    
    c:\tmp>asmtool -list
    NTFS                             \Device\Harddisk0\Partition1            14000M
    NTFS                             \Device\Harddisk0\Partition2              100M
    NTFS                             \Device\Harddisk0\Partition3            97663M
    NTFS                             \Device\Harddisk0\Partition4           842102M
    FAT32                            \Device\Harddisk1\Partition1           152625M
    NTFS                             \Device\Harddisk2\Partition1           476937M
    
    c:\tmp>
    -add requires a device name like \Device\Harddisk1\Partition1 and you cannot use a file name. And you cannot use -delete to remove stamp.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points