NetAPP snapclone actual space allocated in storage
NetAPP provide huge advantage of administrate Oracle databases and advantages are even more if You’re using Snap Manager for Oracle. Only thing that I don’t like as DBA is that we usually don’t have access to filer and we have to ask some things to storage specialists.
When we’re managing volumes directly mounted from NetAPP they act pretty the same as NFS and we can use standard OS commands like du, df against volume to find out space usage, file sizes, etc. But still be very careful about results and always keep in mind if snapshots are taken to this volume then under hidden directory .snapshot you’ll see files snapped and they can be easy managed as read only filesystem.
-- source volume -bash-4.1$ ls -l /u01/ar121/ENV drwxr-xr-x 4 applenv dba 4096 Apr 20 09:00 apps drwxr-xr-x 3 applenv dba 4096 Apr 20 08:59 inst -- snaps crated to souce volume -bash-4.1$ ls -l /u01/ar121/ENV/.snapshot/ drwxrwxrwx 11 applenv dba 4096 Jul 1 19:54 nightly.0 drwxrwxrwx 11 applenv dba 4096 Jul 1 19:54 nightly.1 -- files/dirs inside snaps are the ones when snap is taken and You can easy copy them from here and do df/du commands on them. -bash-4.1$ ls -l /u01/ar121/ENV/.snapshot/nightly.0 drwxr-xr-x 4 applenv dba 4096 Apr 20 09:00 apps drwxr-xr-x 3 applenv dba 4096 Apr 20 08:59 inst
If we can so easy access snaps then question is where is the problem?
The problem is in fact that still if You’ll try to do df or du command into snap it will still give You full volume size, not the actual size how much snap takes storage space. In fact from client side (machine who mounted volume) is not possible to get this information. Only solution to find this information is on filer level with command aggr show_space, and in example below 1876360KB is actually space allocated by snapclone SnapManager_demo_data.
Example demo database and clone for it:
[root@oraclevm2 ~]# ssh site-mc aggr show_space |grep demo_data root@site-mc's password: demo_data 214480700KB 213074712KB none SnapManager_demo_data 1876360KB 128912KB none [root@oraclevm2 ~]# smo_server stop
This mean if You don’t have access to filer you still can ask storage administrator to do command for You and ask for result, and now You will not get feedback like I don’t know how to find this information as it was in my case.
In face people in NetAPP community has gone even further and developed a plug-in to tool which usually used when they calculate used space cause by default this information is not there. More information http://communities.netapp.com/message/54087.