Menu

Different disk usage seen by snapraid and by system?

Help
2020-02-29
2020-03-17
  • Thomas MacDonald

    I'm running a small array of 3x 2TB drives, with one parity disk and a union filesystem spread over the two data disks. Here's what a the top of a snapraid status looks like:

     Files Fragmented Excess  Wasted  Used    Free  Use Name
                Files  Fragments  GB      GB      GB
       24614     132     528     7.1    1615     344  82% Red
       37448     264    1188     7.6    1622     336  82% Sea0
     --------------------------------------------------------------------------
       62062     396    1716    14.7    3238     681  82%
    

    While snapraid shows 82% usage for my storage array, df shows 87% usage and the parity disk as being 98% full:

    root@openmediavault:/# df
    Filesystem      1K-blocks       Used Available Use% Mounted on
    Red:Sea0       3843546400 3162160920 486004496  87% /sharedfolders/Media-all
    /dev/sda1      1921788104 1578251740 245845128  87% /srv/dev-disk-by-label-2TBRed
    /dev/sdb1      1921758296 1583909180 240159368  87% /srv/dev-disk-by-label-2TBSea0
    /dev/sdc1      1921811316 1778025668  46109972  98% /srv/dev-disk-by-label-2TBSea1
    

    Can someone please explain this discrepancy to me? How does disk 82% usage seen by snapraid translate to 87% or 98% disk usage seen by the system?

     
  • Walter Tuppa

    Walter Tuppa - 2020-02-29

    Hi,
    check if there are any other files on the parity disk. The parity disk is not shown in status.
    for data disk, check if there are some files excluded from SnapRAID and so not counted.

    depending on file system, there may be some part of the disk reserved for root only. df shows the space available to user.

     

    Last edit: Walter Tuppa 2020-02-29
  • Thomas MacDonald

    Took a while to get back to this, but I just had a look and the only file on the parity disk is snapraid.parity as expected. This is a 1.7T file, which is again surprising because my most full drive only has 1.5T of content on it (as determined by df). I have however just noticed that the parity drive is ext3 while both data drives are ext4: is that relevant here? I can't think of why it would be...

     
  • Walter Tuppa

    Walter Tuppa - 2020-03-17

    the difference of file system should be no problem. The wasted space for the data disk is normal (can be quite high if you have a lot of very small files). What kind of files do you have stored on data disk? are there any sparse files? You can check this "du -s --apparent-size " vs. "du -s". The first should be smaller than the second one.
    can you check the following command on all disks:

    tune2fs -l /dev/sd?? | grep 'Reserved block count'
    

    This will show reserved space for root user only. maybe there is a difference to parity disk.

     
  • Thomas MacDonald

    This is a home media server. Most of the storage (~2.5T) is video files of 2 - 20 GB, with a smaller but significant (~200G) portion as music.
    The apparent sizes are very similar: 1491600341/1491658756 , 1514249832/1514380156, 1776219412/1777955704 (that last pair is the mysteriously filled parity drive). That's what, 1 GB difference at most?

    Reserved block counts are as follows. Data disks:

    tune2fs -l /dev/sdb1 | grep 'Reserved block count'
    Reserved block count:     24418341
    

    and

    tune2fs -l /dev/sda1 | grep 'Reserved block count'
    Reserved block count:     24418713
    

    Parity disk:

    tune2fs -l /dev/sdc1 | grep 'Reserved block count'
    Reserved block count:     24418919
    

    Again, all look extremely similar.

     

    Last edit: Thomas MacDonald 2020-03-17
  • Walter Tuppa

    Walter Tuppa - 2020-03-17

    one more question:
    was at any earlier time, one of the data disks almost filled?
    The parity file never shrinks, it just grows. this is no problems, because SnapRAID knows which parts of the parity file are used for which data files, so it will only grow if the size of data files is larger than the current size of the parity file.

     
  • Thomas MacDonald

    That's a good question, and a possibility I was unaware of!
    As far as I know, none of the data drives have ever been as full as the parity drive currently is. But I'll keep an eye on the parity and see if it grows any further.

     

Log in to post a comment.

MongoDB Logo MongoDB