Subscribe
Accepted Solution

optimize SnapshotReserve?

I want to optimize the available snapshot space on my volumes.

Filesystem                        total         used         avail capacity  Mounted on
/vol/vol33b/                    720GB      700GB       19GB       97%  /vol/vol33b/
/vol/vol33b/.snapshot      252GB      240GB       12GB       95%  /vol/vol33b/.snapshot

To calculate the used snapshot space I tried:

Get-NaSnapshotReclaimable -Snapshots ( Get-NaSnapshot vol33b ).

But this  lasts more than five minutes for 90 snapshots (to get the value 240GB).

Is there a better way to solve this?

Re: optimize SnapshotReserve?

If you're trying to get all of the used Snapshot space as indicated by the df command, you can use the "CumulativeTotal" field on the last snapshot for the volume:

(Get-NaSnapshot vol0 | select -last 1).CumulativeTotal / 1KB

I'm not 100% sure they will always be in the right order, so you could do something like this:

(Get-NaSnapshot vol0 | sort CumulativeTotal | select -Last 1).CumulativeTotal /1KB

obviously the "/ 1KB" isn't really needed, it just gets you the same number of KB as the df command.

Hope that helps!

Re: optimize SnapshotReserve?

There's always a better way to skin the cat in PowerShell:

(Get-NaSnapshot vol0 | measure -Maximum CumulativeTotal).Maximum / 1KB

Re: optimize SnapshotReserve?

Thx, that's great!

Re: optimize SnapshotReserve?

Is the cumulative total supposed to be exact, or a close estimation?  Using either of the above examples on my larger volumes (10.5 - 11.5 TB), the cumulative total for snapshots is off by 100-200GB from the df command.

ControllerName> df -g VolName3
Filesystem                    total       used      avail capacity  Mounted on
/vol/VolName3/              11776GB     6550GB     5225GB      56%  /vol/VolName3/
/vol/VolName3/.snapshot         0GB      257GB        0GB     ---%  /vol/VolName3/.snapshot


(Get-NaSnapshot VolName3 -controller $ControllerName | sort CumulativeTotal | select -Last 1)


Name                                               Created      Total Cumulative Dependency
----                                               -------      ----- ---------- ----------
nightly.61                                        1/9/2011   440.8 MB   368.3 GB

Re: optimize SnapshotReserve?

jurphville wrote:

Is the cumulative total supposed to be exact, or a close estimation?  Using either of the above examples on my larger volumes (10.5 - 11.5 TB), the cumulative total for snapshots is off by 100-200GB from the df command.

That's curious.  Can you post the output of "Get-NaSnapshot VolName3" ?  Also do you have dedupe enabled on that volume?

Thanks!

Re: optimize SnapshotReserve?

Here's the full output...

Get-NaSnapshot VolName3 -Controller $ControllerName

Name                                               Created      Total Cumulative Dependency
----                                               -------      ----- ---------- ----------
ControllerDestName(1111111111)_VolName3.1...    3/11/2011   760.0 KB   760.0 KB snapmirror
ControllerDestName(1111111111)_VolName3.1...    3/11/2011     4.4 MB     5.1 MB
hourly.0                                         3/11/2011    41.4 MB    46.5 MB
hourly.1                                         3/11/2011   130.9 MB   177.4 MB
hourly.2                                         3/11/2011   225.3 MB   402.7 MB
hourly.3                                         3/11/2011    44.7 MB   447.4 MB
hourly.4                                         3/11/2011    96.7 MB   544.1 MB
hourly.5                                         3/11/2011    90.5 MB   634.6 MB
hourly.6                                         3/11/2011     2.2 GB     2.9 GB
hourly.7                                         3/11/2011    45.6 MB     2.9 GB
hourly.8                                         3/11/2011   167.9 MB     3.1 GB
nightly.0                                        3/11/2011   177.6 MB     3.2 GB
hourly.9                                         3/10/2011   182.7 MB     3.4 GB
hourly.10                                        3/10/2011     4.7 GB     8.1 GB
hourly.11                                        3/10/2011     3.0 GB    11.1 GB
hourly.12                                        3/10/2011   150.1 MB    11.3 GB
hourly.13                                        3/10/2011     1.6 GB    12.8 GB
hourly.14                                        3/10/2011    69.1 MB    12.9 GB
hourly.15                                        3/10/2011     1.5 GB    14.3 GB
hourly.16                                        3/10/2011    39.3 MB    14.4 GB
hourly.17                                        3/10/2011    78.2 MB    14.5 GB
hourly.18                                        3/10/2011     1.2 GB    15.7 GB
hourly.19                                        3/10/2011    51.8 MB    15.7 GB
nightly.1                                        3/10/2011    80.6 MB    15.8 GB
hourly.20                                         3/9/2011     4.8 GB    20.6 GB
hourly.21                                         3/9/2011   803.8 MB    21.4 GB
hourly.22                                         3/9/2011     1.0 GB    22.4 GB
hourly.23                                         3/9/2011   532.5 MB    22.9 GB
hourly.24                                         3/9/2011     1.9 GB    24.8 GB
hourly.25                                         3/9/2011    52.1 MB    24.9 GB
hourly.26                                         3/9/2011   530.5 MB    25.4 GB
hourly.27                                         3/9/2011     5.7 GB    31.1 GB
hourly.28                                         3/9/2011    70.9 MB    31.1 GB
hourly.29                                         3/9/2011     3.0 GB    34.1 GB
hourly.30                                         3/9/2011    48.8 MB    34.2 GB
nightly.2                                         3/9/2011   283.3 MB    34.4 GB
hourly.31                                         3/8/2011     2.0 GB    36.4 GB
hourly.32                                         3/8/2011   289.6 MB    36.7 GB
hourly.33                                         3/8/2011     3.1 GB    39.8 GB
hourly.34                                         3/8/2011     1.1 GB    40.9 GB
hourly.35                                         3/8/2011   193.9 MB    41.1 GB
hourly.36                                         3/8/2011    50.4 MB    41.2 GB
hourly.37                                         3/8/2011    77.8 MB    41.2 GB
hourly.38                                         3/8/2011   101.2 MB    41.3 GB
hourly.39                                         3/8/2011   165.8 MB    41.5 GB
hourly.40                                         3/8/2011    38.4 MB    41.5 GB
hourly.41                                         3/8/2011    92.8 MB    41.6 GB
nightly.3                                         3/8/2011    63.4 MB    41.7 GB
hourly.42                                         3/7/2011    87.1 MB    41.8 GB
hourly.43                                         3/7/2011   145.7 MB    41.9 GB
hourly.44                                         3/7/2011   140.3 MB    42.1 GB
hourly.45                                         3/7/2011    98.2 MB    42.2 GB
hourly.46                                         3/7/2011     2.0 GB    44.2 GB
hourly.47                                         3/7/2011    42.9 MB    44.2 GB
hourly.48                                         3/7/2011    22.5 MB    44.2 GB
hourly.49                                         3/7/2011    22.8 MB    44.2 GB
hourly.50                                         3/7/2011    14.5 MB    44.3 GB
hourly.51                                         3/7/2011    13.0 MB    44.3 GB
hourly.52                                         3/7/2011    19.1 MB    44.3 GB
nightly.4                                         3/7/2011    17.1 MB    44.3 GB
hourly.53                                         3/6/2011    13.8 MB    44.3 GB
hourly.54                                         3/6/2011    10.7 MB    44.3 GB
hourly.55                                         3/6/2011    34.5 MB    44.4 GB
hourly.56                                         3/6/2011    28.8 MB    44.4 GB
hourly.57                                         3/6/2011    27.6 MB    44.4 GB
hourly.58                                         3/6/2011    10.0 MB    44.4 GB
hourly.59                                         3/6/2011     9.6 MB    44.4 GB
hourly.60                                         3/6/2011    56.0 MB    44.5 GB
hourly.61                                         3/6/2011   342.1 MB    44.8 GB
hourly.62                                         3/6/2011     9.6 MB    44.8 GB
hourly.63                                         3/6/2011     2.9 GB    47.7 GB
nightly.5                                         3/6/2011    15.3 MB    47.8 GB
hourly.64                                         3/5/2011    95.1 MB    47.9 GB
hourly.65                                         3/5/2011    12.3 MB    47.9 GB
hourly.66                                         3/5/2011    10.3 MB    47.9 GB
hourly.67                                         3/5/2011     1.8 GB    49.7 GB
hourly.68                                         3/5/2011    50.5 MB    49.7 GB
hourly.69                                         3/5/2011     9.0 MB    49.7 GB
hourly.70                                         3/5/2011   148.2 MB    49.9 GB
hourly.71                                         3/5/2011    28.3 MB    49.9 GB
hourly.72                                         3/5/2011    20.9 MB    49.9 GB
hourly.73                                         3/5/2011    50.3 MB    50.0 GB
hourly.74                                         3/5/2011    23.8 MB    50.0 GB
nightly.6                                         3/5/2011    53.7 MB    50.1 GB
hourly.75                                         3/4/2011   566.7 MB    50.6 GB
hourly.76                                         3/4/2011   107.7 MB    50.7 GB
hourly.77                                         3/4/2011     1.1 GB    51.8 GB
hourly.78                                         3/4/2011     1.3 GB    53.1 GB
hourly.79                                         3/4/2011     1.4 GB    54.5 GB
hourly.80                                         3/4/2011    26.3 MB    54.5 GB
hourly.81                                         3/4/2011   615.1 MB    55.1 GB
hourly.82                                         3/4/2011    70.8 MB    55.2 GB
hourly.83                                         3/4/2011    24.4 MB    55.2 GB
hourly.84                                         3/4/2011    29.6 MB    55.2 GB
nightly.7                                         3/4/2011     1.1 GB    56.3 GB
hourly.85                                         3/3/2011     1.4 GB    57.7 GB
hourly.86                                         3/3/2011     3.0 GB    60.7 GB
hourly.87                                         3/3/2011     3.6 GB    64.2 GB
hourly.88                                         3/3/2011     1.4 GB    65.6 GB
hourly.89                                         3/3/2011     1.9 GB    67.5 GB
hourly.90                                         3/3/2011     2.0 GB    69.5 GB
hourly.91                                         3/3/2011     1.8 GB    71.3 GB
hourly.92                                         3/3/2011     3.5 GB    74.8 GB
hourly.93                                         3/3/2011     3.5 GB    78.3 GB
hourly.94                                         3/3/2011     1.4 GB    79.7 GB
hourly.95                                         3/3/2011     2.6 GB    82.3 GB
nightly.8                                         3/3/2011     1.1 GB    83.4 GB
hourly.96                                         3/2/2011     1.2 GB    84.7 GB
hourly.97                                         3/2/2011    88.1 MB    84.7 GB
hourly.98                                         3/2/2011   123.4 MB    84.9 GB
hourly.99                                         3/2/2011    90.6 MB    85.0 GB
hourly.100                                        3/2/2011     2.7 GB    87.7 GB
hourly.101                                        3/2/2011     1.4 GB    89.0 GB
hourly.102                                        3/2/2011     2.7 GB    91.8 GB
hourly.103                                        3/2/2011     1.8 GB    93.6 GB
hourly.104                                        3/2/2011     2.2 GB    95.8 GB
hourly.105                                        3/2/2011     1.4 GB    97.2 GB
hourly.106                                        3/2/2011     1.4 GB    98.5 GB
nightly.9                                         3/2/2011    83.2 MB    98.6 GB
hourly.107                                        3/1/2011   101.5 MB    98.7 GB
hourly.108                                        3/1/2011   132.0 MB    98.8 GB
hourly.109                                        3/1/2011    90.3 MB    98.9 GB
hourly.110                                        3/1/2011     1.9 GB   100.8 GB
hourly.111                                        3/1/2011     1.5 GB   102.3 GB
hourly.112                                        3/1/2011   922.9 MB   103.2 GB
hourly.113                                        3/1/2011     1.4 GB   104.6 GB
hourly.114                                        3/1/2011    20.6 GB   125.2 GB
hourly.115                                        3/1/2011     1.4 GB   126.6 GB
hourly.116                                        3/1/2011     2.8 GB   129.3 GB
hourly.117                                        3/1/2011     2.0 GB   131.3 GB
nightly.10                                        3/1/2011     1.4 GB   132.7 GB
hourly.118                                       2/28/2011   120.1 MB   132.8 GB
hourly.119                                       2/28/2011   110.2 MB   132.9 GB
hourly.120                                       2/28/2011   140.3 MB   133.1 GB
hourly.121                                       2/28/2011   100.8 MB   133.2 GB
hourly.122                                       2/28/2011     1.6 GB   134.8 GB
hourly.123                                       2/28/2011     2.2 GB   137.0 GB
hourly.124                                       2/28/2011     1.3 GB   138.3 GB
hourly.125                                       2/28/2011     2.3 GB   140.6 GB
hourly.126                                       2/28/2011     1.8 GB   142.3 GB
hourly.127                                       2/28/2011     2.6 GB   144.9 GB
hourly.128                                       2/28/2011    38.5 MB   144.9 GB
nightly.11                                       2/28/2011    25.6 MB   145.0 GB
hourly.129                                       2/27/2011    14.8 MB   145.0 GB
hourly.130                                       2/27/2011   165.0 MB   145.1 GB
hourly.131                                       2/27/2011   898.9 MB   146.0 GB
hourly.132                                       2/27/2011     2.4 GB   148.4 GB
hourly.133                                       2/27/2011     1.4 GB   149.8 GB
hourly.134                                       2/27/2011     2.6 GB   152.4 GB
hourly.135                                       2/27/2011     1.3 GB   153.8 GB
hourly.136                                       2/27/2011     3.0 GB   156.8 GB
hourly.137                                       2/27/2011     1.4 GB   158.2 GB
hourly.138                                       2/27/2011     3.1 GB   161.3 GB
hourly.139                                       2/27/2011     3.8 GB   165.1 GB
nightly.12                                       2/27/2011    22.3 MB   165.1 GB
hourly.140                                       2/26/2011     1.0 GB   166.2 GB
hourly.141                                       2/26/2011   102.5 MB   166.3 GB
hourly.142                                       2/26/2011     1.3 GB   167.5 GB
hourly.143                                       2/26/2011     2.3 GB   169.8 GB
hourly.144                                       2/26/2011    56.1 MB   169.9 GB
hourly.145                                       2/26/2011    11.8 MB   169.9 GB
hourly.146                                       2/26/2011    60.4 MB   170.0 GB
hourly.147                                       2/26/2011   107.4 MB   170.1 GB
hourly.148                                       2/26/2011     4.2 GB   174.2 GB
hourly.149                                       2/26/2011     6.7 GB   180.9 GB
hourly.150                                       2/26/2011     1.1 GB   182.1 GB
nightly.13                                       2/26/2011     3.4 GB   185.4 GB
hourly.151                                       2/25/2011   284.3 MB   185.7 GB
hourly.152                                       2/25/2011    87.8 MB   185.8 GB
hourly.153                                       2/25/2011     3.1 GB   188.9 GB
hourly.154                                       2/25/2011   150.4 MB   189.0 GB
hourly.155                                       2/25/2011   165.4 MB   189.2 GB
hourly.156                                       2/25/2011    37.6 MB   189.2 GB
hourly.157                                       2/25/2011   155.1 MB   189.4 GB
hourly.158                                       2/25/2011     3.1 GB   192.5 GB
hourly.159                                       2/25/2011   967.7 MB   193.4 GB
hourly.160                                       2/25/2011    61.6 MB   193.5 GB
hourly.161                                       2/25/2011     1.7 GB   195.2 GB
nightly.14                                       2/25/2011     1.8 GB   197.0 GB
hourly.162                                       2/24/2011    87.1 MB   197.1 GB
hourly.163                                       2/24/2011   155.7 MB   197.3 GB
hourly.164                                       2/24/2011   161.7 MB   197.4 GB
hourly.165                                       2/24/2011   160.1 MB   197.6 GB
hourly.166                                       2/24/2011   140.4 MB   197.7 GB
hourly.167                                       2/24/2011    32.2 MB   197.7 GB
nightly.15                                       2/24/2011     3.7 GB   201.5 GB
nightly.16                                       2/23/2011     2.0 GB   203.5 GB
nightly.17                                       2/22/2011     1.0 GB   204.5 GB
nightly.18                                       2/21/2011   550.3 MB   205.0 GB
nightly.19                                       2/20/2011   618.0 MB   205.6 GB
nightly.20                                       2/19/2011     3.8 GB   209.5 GB
nightly.21                                       2/18/2011     1.3 GB   210.8 GB
nightly.22                                       2/17/2011     1.8 GB   212.6 GB
nightly.23                                       2/16/2011     2.8 GB   215.3 GB
nightly.24                                       2/15/2011    18.9 GB   234.2 GB
nightly.25                                       2/14/2011   997.2 MB   235.2 GB
nightly.26                                       2/13/2011     3.0 GB   238.2 GB
nightly.27                                       2/12/2011     5.3 GB   243.5 GB
nightly.28                                       2/11/2011     1.1 GB   244.6 GB
nightly.29                                       2/10/2011     2.8 GB   247.4 GB
nightly.30                                        2/9/2011     2.1 GB   249.5 GB
nightly.31                                        2/8/2011     2.8 GB   252.2 GB
nightly.32                                        2/7/2011   757.4 MB   253.0 GB
nightly.33                                        2/6/2011     5.4 GB   258.4 GB
nightly.34                                        2/5/2011     4.7 GB   263.1 GB
nightly.35                                        2/4/2011     2.6 GB   265.7 GB
nightly.36                                        2/3/2011     1.1 GB   266.8 GB
nightly.37                                        2/2/2011     1.2 GB   267.9 GB
nightly.38                                        2/1/2011     8.2 GB   276.2 GB
nightly.39                                       1/31/2011   828.9 MB   277.0 GB
nightly.40                                       1/30/2011     5.5 GB   282.4 GB
nightly.41                                       1/29/2011     5.3 GB   287.8 GB
nightly.42                                       1/28/2011     1.4 GB   289.2 GB
nightly.43                                       1/27/2011   865.1 MB   290.0 GB
nightly.44                                       1/26/2011     1.8 GB   291.8 GB
nightly.45                                       1/25/2011     1.7 GB   293.5 GB
nightly.46                                       1/24/2011     1.1 GB   294.7 GB
nightly.47                                       1/23/2011     5.4 GB   300.1 GB
nightly.48                                       1/22/2011     4.7 GB   304.8 GB
nightly.49                                       1/21/2011     2.6 GB   307.4 GB
nightly.50                                       1/20/2011    16.9 GB   324.3 GB
nightly.51                                       1/19/2011    14.1 GB   338.4 GB
nightly.52                                       1/18/2011     5.6 GB   344.0 GB
nightly.53                                       1/17/2011     4.8 GB   348.8 GB
nightly.54                                       1/16/2011    11.1 GB   359.9 GB
nightly.55                                       1/15/2011     4.4 GB   364.4 GB
nightly.56                                       1/14/2011     1.0 GB   365.4 GB
nightly.57                                       1/13/2011     1.2 GB   366.6 GB
nightly.58                                       1/12/2011   448.2 MB   367.0 GB
nightly.59                                       1/11/2011   419.5 MB   367.4 GB
nightly.60                                       1/10/2011   434.7 MB   367.9 GB
nightly.61                                        1/9/2011   440.8 MB   368.3 GB

Re: optimize SnapshotReserve?

Thanks, for the snap list.  What about dedupe?  Can you post the output of "Get-NaSis VolName3 | fl *" (assuming it's enabled)?

Re: optimize SnapshotReserve?

Ahh, sorry.  No on dedupe.

Re: optimize SnapshotReserve?

This is a bit mysterious.  I've had a few interesting conversations about this, but can't reproduce the problem.  I do have one system that is off by a few kb, but nothing as drastic as you are seeing.

Can you give me a little more info?

  • ONTAP version (shows up as "NetApp Release" after Connect-NaController)
  • output of "snap list VolName3" on the controller (or use Invoke-NaSsh)
  • output of "df -S" on the controller (be sure to use capital "S")

Thanks again!