Thank you Stefan as usual for your time and assistance.
I have performed some test with ASM Filter Driver , and still have some doubts.
Finally after tests which i showed above , after reboot of server, partition where ASM(AFD)
disk was located disappeared.
I was able to restore partition , and data on it was not destroyed (at least everything was accessible).
So additional test was done , using parted existing partition was destroyed again "parted /dev/sdq" and rm 1. After reboot the same situation , partition has been lost.
As you know "oracleasm createdisk" worked only on top of some partition , so if we will migrate from ASMLIB to ASMFD , root still can destroy partitions.
I have backed up database , and dropped all ASM diskgroups following creation new ones
directly on devices (without partitions, they were dropped as well)
asmcmd afd_label DATA0000 /dev/sdk .
Database was restored and recovered without any issue, and the same tests were performed again.
/root # parted /dev/sdk
GNU Parted 2.3
Using /dev/sdk
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel
New disk label type? GPT
Error: Input/output error during write on /dev/sdk
Retry/Ignore/Cancel? c
(parted) q
Jun 23 04:46:39 kernel: [37657.419180] F 17218400.338/150623084639 parted[29406] afd_mkrequest_fn: write IO on ASM managed device (major=8/minor=160) not supported i=0 start=0 seccnt=8 pstart=0 pend=44040192
/root # fdisk /dev/sdk
WARNING: GPT (GUID Partition Table) detected on '/dev/sdk'! The util fdisk doesn't support GPT. Use GNU Parted.
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xdbbdd492.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): o
Building a new DOS disklabel with disk identifier 0x648291e9.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Jun 23 04:48:21 kernel: [37758.618779] F 17218501.809/150623084821 flush-8:160[29818] afd_mkrequest_fn: write IO on ASM managed device (major=8/minor=160) not supported i=0 start=0 seccnt=8 pstart=0 pend=44040192
Jun 23 04:48:21 kernel: [37758.618800] quiet_error: 6 callbacks suppressed
Jun 23 04:48:21 kernel: [37758.618804] Buffer I/O error on device sdk, logical block 0
Jun 23 04:48:21 kernel: [37758.618807] lost page write due to I/O error on sdk
Jun 23 04:48:21 kernel: [37759.122873] sd 0:0:11:0: [sdk] Cache data unavailable
Jun 23 04:48:21 kernel: [37759.122878] sd 0:0:11:0: [sdk] Assuming drive cache: write through
Jun 23 04:48:21 kernel: [37759.123913] sdk: unknown partition table
root # pvcreate /dev/sdk
/dev/sdk: write failed after 0 of 4096 at 4096: Input/output error
Failed to wipe new metadata area
/dev/sdk: Format-specific setup of physical volume failed.
Failed to setup physical volume "/dev/sdk"
root # dd if=/dev/zero of=/dev/sdk bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 10.0883 s, 10.2 MB/s
After reboot , everything is ok now.
I couldn't find any information regarding the creation of AFD disks on devices directly , is this supported and should be done in this way ?
Thanks , Sergo.