ACFS Snapshot

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

 

IMPORTANT: Before you begin any disk changes create FULL backup of your server 

[oracle@server ~]$ df -h
Файловая система               Размер Использовано  Дост Использовано% Cмонтировано в
/dev/mapper/lv_local-root         20G          14G  6,0G           70% /
devtmpfs                          16G            0   16G            0% /dev
tmpfs                             16G         7,0G  8,8G           45% /dev/shm
tmpfs                             16G         282M   16G            2% /run
tmpfs                             16G            0   16G            0% /sys/fs/cgroup
/dev/mapper/lv_local-u01         100G          13G   88G           13% /u01
/dev/sda1                        497M         124M  373M           25% /boot
/dev/asm/db-48                   3,5T         3,5T  4,8G          100% /DB/data
/dev/asm/db2-48                   50G          11G   40G           21% /SNAP/tmpredo/DB2
/dev/asm/db3-48                   50G         5,4G   45G           11% /SNAP/tmpredo/DB3
mkdir -p /DB/data
chown oracle:oinstall /DB/
chown oracle:oinstall /DB/data/
cat /etc/init.d/acfs_mount.sh
#!/bin/bash

COUNTER=0
while [  $COUNTER -lt 10 ]; do

PS_CMD=`ps -ef |grep "+ASM" |grep -c -v grep`
 if [[ $PS_CMD > 0 ]]; then
     sleep 60
     echo "mount ACFS"
     mount -t acfs -o all null null
     let COUNTER=20
 else
  sleep 60
  echo "Waiting until starting ASM"
 fi
done
mount -t acfs -o all null null
acfsutil registry
Mount Object:
  Device: /dev/asm/db-48
  Mount Point: /DB/data
  Disk Group: DATA01
  Volume: DB
  Options: none
  Nodes: all
Mount Object:
  Device: /dev/asm/db2-48
  Mount Point: /SNAP/tmpredo/DB2
  Disk Group: DATA01
  Volume: DB2
  Options: none
  Nodes: all
Mount Object:
  Device: /dev/asm/db3-48
  Mount Point: /SNAP/tmpredo/DB3
  Disk Group: DATA01
  Volume: DB3
  Options: none
  Nodes: all

unlink data/DB2/

ln -s /DB/data/.ACFS/snaps/DB2 data
ls -l /SNAP/tmpredo/DB2/
acfsutil snap delete DB2 /DB/data/
acfsutil snap create -w DB2 /DB/data/

unlink data/DB3/

acfsutil registry –h
ln -s /DB/data/.ACFS/snaps/DB3 data
ls -l /SNAP/tmpredo/DB3/
acfsutil snap delete DB3 /DB/data/
acfsutil snap create -w DB3 /DB/data/

 

Newsletter

Enter your email to join our mailing list

Quick Contact