<<Back to Oracle ASM Main Page
How to Create Snapshots of an Oracle ACFS File System
$ /sbin/acfsutil snap create mysnapshot_20180926 /acfsmounts/acfs1acfsutil snap create: Snapshot operation is complete.
$ ls -lrt /acfsmounts/acfs1/.ACFS/snaps/mysnapshot_20180926
How to Rename Snapshots of an Oracle ACFS File System
$ /sbin/acfsutil snap rename mysnapshot_20180926 mysnapshot_20180926_L0 /acfsmounts/acfs1acfsutil snap rename: Snapshot operation is complete.
How to Find Oracle ACFS File System Snapshot Information
$ /sbin/acfsutil snap info -t mysnapshot_20180926_L0 /acfsmounts/acfs1mysnapshot_20180926_L0 RO<= read only
How to Convert Oracle ACFS Snapshot from RO to RW
$ /sbin/acfsutil snap convert -w mysnapshot_20180926_L0 /acfsmounts/acfs1acfsutil snap convert: Snapshot operation is complete.
$ /sbin/acfsutil snap info -t mysnapshot_20180926_L0 /acfsmounts/acfs1
mysnapshot_20180926_L0 RW
How to Restore ACFS File System from Snapshot
The current master and all other snapshots will be deleted.WARNING: This operation cannot be reversed. Admin privileges
$ ls -lrt
total 80
drwx------ 2 oragrid oinstall 65536 Sep 26 13:37 lost+found
-rw-r--r-- 1 oragrid oinstall 0 Sep 26 14:19 a
-rw-r--r-- 1 oragrid oinstall 0 Sep 26 14:19 test
drwxr-xr-x 2 oragrid oinstall 8192 Sep 26 14:19 test_backup
Run the query as root user
File system must be unmounted
# umount /acfsmounts/acfs1
# /sbin/acfsutil snap remaster mysnapshot_20180926_L0 /dev/asm/vol3-69
fsck from util-linux 2.23.2
version = 12.2.0.1.0
Oracle ASM Cluster File System (ACFS) On-Disk Structure Version: 43.0
ACFS file system created at: Wed Sep 26 13:31:01 2018
Remastering snapshot 'mysnapshot_20180926_L0' as the master file system,
deleting the current master file system,
and deleting all the other snapshots.
If you continue, 'snap remaster' must run to completion.
fsck.acfs: Do you want to continue? [0=no,1=yes]:
1
'snap remaster' phase: 0
'snap remaster' phase: 1
'snap remaster' phase: 2
'snap remaster' phase: 3
'snap remaster' phase: 4
'snap remaster' phase: 5
'snap remaster' phase: 6
'snap remaster' phase: 7
'snap remaster' phase: 8
'snap remaster' phase: 9
invoking ACFS Checker, which will check the remastered snapshot file system, and ACFS Fixer, which will reclaim released storage
*****************************
********** Pass: 1 **********
*****************************
checking primary file system
Files checked in primary file system: 100%
reclaiming snap remaster released storage
*****************************
********** Pass: 2 **********
*****************************
checking primary file system
Files checked in primary file system: 100%
*****************************
********** Pass: 3 **********
*****************************
checking primary file system
Files checked in primary file system: 100%
Checking if any files are orphaned...
0 orphans found
Snapshot 'mysnapshot_20180926_L0' has been remastered as the master file system.
Yes I can see the snapshot has been restored to L0 and as expected all the snapshots has been deleted
#mount -t acfs /dev/asm/vol3-69 /acfsmounts/acfs1
cd /acfsmounts/acfs1
# ls -lrt
total 64
drwx------ 2 oragrid oinstall 4096 Sep 26 13:37 lost+found
# /sbin/acfsutil snap info /acfsmounts/acfs1
number of snapshots: 0
snapshot space usage: 0 ( 0.00 )
Comments
Post a Comment