[OpenIndiana-discuss] Disk Space Disappearing.

Timothy Coalson tsc5yc at mst.edu
Thu Jul 31 02:20:30 UTC 2014


On Wed, Jul 30, 2014 at 8:22 PM, Dormition Skete (Hotmail) <
dormitionskete at hotmail.com> wrote:

> On Jul 30, 2014, at 6:06 PM, Timothy Coalson <tsc5yc at mst.edu> wrote:
>
> >
> > No, it refers to how many total bytes are referenced by the filesystem -
> > this includes all the bytes that are also in snapshots.  So, if you make
> a
> > filesystem, put a 20GB file in it, and snapshot it, both snapshot and
> > filesystem will say 20G for referenced.
> >
> > Something that may be useful here is "zfs list -o space" - this actually
> > outputs several different kinds of "space used" measures, and one column
> to
> > pay attention to is the "USEDSNAP" column - this should help you find
> > filesystems that have a lot of data that exists only in snapshots.  I
> have
> > a pair of scripts that are useful for determining which snapshots are
> > eating this space, maybe I should host them somewhere.  However, in your
> > case, it is probably all the snapshots, so not as useful.
> >
> >
>
> Thank you, Mr. Coalson.  I appreciate it very much, although,
> unfortunately, I’m still not sure what you mean by the amount of bytes
> referenced by the file system.  But in executing your "zfs list -o space”
> command, if what they label as “USED” is what is actually on the disk, that
> is very helpful, and something I can understand.
>

USED is the sum of all the following USED* properties - USEDSNAP is the
space that would be freed by deleting all the snapshots on this filesystem,
USEDDS is amount of live data on this filesystem, USEDCHILD is amount used
(or reserved) by child filesystems, and USEDREFRESERV is amount of reserved
space for this filesystem that isn't actually used by anything (I think...).


> Like I’ve said before on this list, I’m not very good at system admin
> work.  I wish I could find someone we could hire to do all this stuff for
> us.  That’d be real nice.
>
> Is there any way to tell why the swap is so high?  This machine has loads
> of RAM.  Or is that normal for Solaris?
>

As I understand it, the swap zvol is always preallocated, and default size
appears to be roughly half the available RAM at install time.  This does
not mean any swap is in use.


> And does anything else stand out to any of you?
>
>
>
> @tryphon.ds:~# zfs list -o space
> NAME                                     AVAIL   USED  USEDSNAP  USEDDS
>  USEDREFRESERV  USEDCHILD
> rpool                                    37.1G  96.8G         0     46K
>            0      96.8G
> rpool/ROOT                               37.1G  4.16G         0     31K
>            0      4.16G
> rpool/ROOT/OpenIndiana-151a7-2014-0705A  37.1G  10.9M         0   10.9M
>            0          0
> rpool/ROOT/OpenIndiana-151a7-2014-0706A  37.1G  4.14G      263M   3.89G
>            0          0
> rpool/ROOT/openindiana                   37.1G  12.0M         0   12.0M
>            0          0
> rpool/dump                               37.1G  8.00G         0   8.00G
>            0          0
> rpool/export                             37.1G  1.68G         0     32K
>            0      1.68G
> rpool/export/home                        37.1G  1.68G         0     32K
>            0      1.68G
> rpool/export/home/                37.1G  1.68G         0   1.68G
>    0          0
> rpool/swap                               45.5G  8.50G         0    136M
>        8.37G          0
> rpool/zones                              37.1G  74.4G         0     37K
>            0      74.4G
> rpool/zones/archive                      37.1G  52.5G         0     34K
>            0      52.5G
> rpool/zones/archive/ROOT                 37.1G  52.5G         0     32K
>            0      52.5G
> rpool/zones/archive/ROOT/zbe             37.1G  3.14M         0   3.14M
>            0          0
> rpool/zones/archive/ROOT/zbe-1           37.1G  1.98M         0   1.98M
>            0          0
> rpool/zones/archive/ROOT/zbe-2           37.1G  52.4G     24.3G   28.1G
>            0          0
> rpool/zones/mysql                        37.1G  1.32G         0     33K
>            0      1.32G
> rpool/zones/mysql/ROOT                   37.1G  1.32G         0     32K
>            0      1.32G
> rpool/zones/mysql/ROOT/zbe               37.1G  1.53M         0   1.53M
>            0          0
> rpool/zones/mysql/ROOT/zbe-1             37.1G  1.91M         0   1.91M
>            0          0
> rpool/zones/mysql/ROOT/zbe-2             37.1G  1.32G      408M    940M
>            0          0
> rpool/zones/routerb2                     37.1G  16.3G         0     33K
>            0      16.3G
> rpool/zones/routerb2/ROOT                37.1G  16.3G         0     32K
>            0      16.3G
> rpool/zones/routerb2/ROOT/zbe            37.1G  2.98M         0   2.98M
>            0          0
> rpool/zones/routerb2/ROOT/zbe-1          37.1G  9.06M         0   9.06M
>            0          0
> rpool/zones/routerb2/ROOT/zbe-2          37.1G  16.3G     7.16G   9.16G
>            0          0
> rpool/zones/tomcat                       37.1G  1016M         0     33K
>            0      1015M
> rpool/zones/tomcat/ROOT                  37.1G  1015M         0     32K
>            0      1015M
> rpool/zones/tomcat/ROOT/zbe              37.1G  1.93M         0   1.93M
>            0          0
> rpool/zones/tomcat/ROOT/zbe-1            37.1G  2.02M         0   2.02M
>            0          0
> rpool/zones/tomcat/ROOT/zbe-2            37.1G  1011M      184M    827M
>            0          0
> rpool/zones/webphp4                      37.1G  3.31G         0     33K
>            0      3.31G
> rpool/zones/webphp4/ROOT                 37.1G  3.31G         0     32K
>            0      3.31G
> rpool/zones/webphp4/ROOT/zbe             37.1G  3.31G         0   3.31G
>            0          0
> @tryphon.ds:~#
>
> I see these:

NAME                                     AVAIL   USED  USEDSNAP  USEDDS
 USEDREFRESERV  USEDCHILD
...
rpool/zones/archive/ROOT/zbe-2           37.1G  52.4G     24.3G   28.1G
         0          0
...
rpool/zones/routerb2/ROOT/zbe-2          37.1G  16.3G     7.16G   9.16G
         0          0


>
>
> > I see "10M", not "10G", so I'm going to say no, it won't free that much
> > space.
>
>
> I was saying 10 G because if you look at the output for “zfs list -t
> snapshot”, it seems like if we add up the snapshots  that have
> "@2014-07-05”, we would get something like this:
>
> rpool/ROOT/OpenIndiana-151a7-2014-0706A at 2014-07-05-23:13:53   157M      -
>  3.48G  -
> rpool/zones/archive/ROOT/zbe-2 at 2014-07-05-23:13:59           8.08G      -
>  27.9G  -
> rpool/zones/mysql/ROOT/zbe-2 at 2014-07-05-23:13:57              118M      -
>   814M  -
> rpool/zones/routerb2/ROOT/zbe-2 at 2014-07-05-23:13:55          2.35G      -
>  8.60G  -
> rpool/zones/tomcat/ROOT/zbe-2 at 2014-07-05-23:14:02            46.0M      -
>   830M  -
>
> That would add up to 10 G.  So, given that, would destroying that boot
> environment free up 10G?
>

I hadn't looked at that, but I think most of it is unrelated to the boot
environment (only the first line is obviously a snapshot on the boot
environment).  A shot in the dark here- is "2014-07-05-23:13:59" the format
of the snapshot names your backup script uses?  If so, and that date/time
matches up with a backup you did, you probably made those snapshots
yourself.


> And MOST IMPORTANTLY, could I SAFELY do that with the “beadm destroy -s
> OpenIndiana-151a7-2014-0705A” command?
>

I don't think I have destroyed boot environments, but I still suspect that
it won't return that amount of space.  I don't think it is unsafe, but I
would rather not make a guarantee, especially if it isn't what you really
want to do.


>
> My “beadm list" is here:
>
> @tryphon.ds:~# beadm list
> BE                           Active Mountpoint Space Policy Created
> OpenIndiana-151a7-2014-0705A -      -          10.9M static 2014-07-05
> 17:13
> OpenIndiana-151a7-2014-0706A NR     /          4.39G static 2014-07-06
> 22:05
> openindiana                  -      -          12.0M static 2014-07-04
> 17:39
> @tryphon.ds:~#
>
>
> My complete "zfs list -t snapshot” is here:
>
> @tryphon.ds:~# zfs list -t snapshot
> NAME                                                          USED  AVAIL
>  REFER  MOUNTPOINT
> rpool/ROOT/OpenIndiana-151a7-2014-0706A at install              60.0M      -
>  2.78G  -
> rpool/ROOT/OpenIndiana-151a7-2014-0706A at 2014-07-05-23:13:53   157M      -
>  3.48G  -
> rpool/ROOT/OpenIndiana-151a7-2014-0706A at 2014-07-07-04:05:55  34.3M      -
>  3.87G  -
> rpool/zones/archive/ROOT/zbe-2 at 2014-07-05-23:13:59           8.08G      -
>  27.9G  -
> rpool/zones/archive/ROOT/zbe-2 at 2014-07-07-04:06:00           8.09G      -
>  28.0G  -
> rpool/zones/mysql/ROOT/zbe-2 at 2014-07-05-23:13:57              118M      -
>   814M  -
> rpool/zones/mysql/ROOT/zbe-2 at 2014-07-07-04:05:58              118M      -
>   814M  -
> rpool/zones/routerb2/ROOT/zbe-2 at 2014-07-05-23:13:55          2.35G      -
>  8.60G  -
> rpool/zones/routerb2/ROOT/zbe-2 at 2014-07-07-04:05:57          2.38G      -
>  8.63G  -
> rpool/zones/tomcat/ROOT/zbe-2 at 2014-07-05-23:14:02            46.0M      -
>   830M  -
> rpool/zones/tomcat/ROOT/zbe-2 at 2014-07-07-04:06:04            43.7M      -
>   827M  -
> @tryphon.ds:~#
>
>
NAME                                                          USED  AVAIL
 REFER  MOUNTPOINT
...
rpool/zones/archive/ROOT/zbe-2 at 2014-07-05-23:13:59           8.08G      -
 27.9G  -
rpool/zones/archive/ROOT/zbe-2 at 2014-07-07-04:06:00           8.09G      -
 28.0G  -
...
rpool/zones/routerb2/ROOT/zbe-2 at 2014-07-05-23:13:55          2.35G      -
 8.60G  -
rpool/zones/routerb2/ROOT/zbe-2 at 2014-07-07-04:05:57          2.38G      -
 8.63G  -

"USED" on a snapshot is the amount of data in the snapshot that does not
occur in any other snapshot, and is not on the active filesystem.  Deleting
these snapshots is probably your goal - you know better than I do where
they came from and if they are still needed.

I hope these columns of data show up nice for you all.  They look fine
> here...
>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>


More information about the openindiana-discuss mailing list