Menu

Shrink parity size after adding data disk

Help
nemo19
2014-11-02
2014-11-02
  • nemo19

    nemo19 - 2014-11-02

    Hey,

    I just added another data disk to my array and redistributed the data among the disks, but the parity file size stayed the same as before. I read a few threads explaining why the parity file can be larger than the largest amount of data on a disk and under which conditions it can shrink, so I'm fairly clear on that part.

    From what I understood a new parity file should be smaller than an old one due to less empty internal blocks. I tried deleting the parity file and than fixing the array but it seems to rebuild the exact same parity file (I scrubed the array before deleting and checked the SMART data so I'm confident the time it takes to rebuild parity won't endanger my data).

    Since that did not work, could I reduce parity size by deleting the snapraid config, content and parity files and letting it build a completely new array?

    Before I had 3x 4TB drives, all filled equally to 3.3TiB (2x data, 1x parity). Now I have 4x 4TB drives, 3x data filled to 1.6TiB, 2.3TiB and 2.7TiB, but parity stayed at 3.3TiB.

    Thanks :)

    EDIT: I can't post a snapraid status yet since snapraid fix is still running, but it already shows the resulting parity size of 3.3TiB.

     

    Last edit: nemo19 2014-11-02
  • jwill42

    jwill42 - 2014-11-02

    Since the mapping of the files to the SnapRAID blocks is defined in the content file, it is not unexpected that doing a fix would regenerate the same parity file with "holes".

    While it is true that deleting the content file and generating parity from scratch would create a smaller parity file, why would you want to do this? Just because the SMART data looks okay does not mean that you are completely safe from a disk failure. Why throw away both your checksums and your failure protection just to reduce the parity file size?

     

    Last edit: jwill42 2014-11-02
  • nemo19

    nemo19 - 2014-11-02

    Thanks for the quick confirmation.

    The drive is filled to 90% capacity, and as far as I know a drive operates better when it has more headroom available. I don't know how important this is for a drive with a single large file such as the parity drive, but it surely can't hurt to have it not filled up to this extend. I also don't know how the size of the parity file will behave when I add more data to the array, thus I'm concerned about running out of space on the parity drive.

    Maybe you can give me some more information on this.

     
  • jwill42

    jwill42 - 2014-11-02

    No, a hard drive does not operate differently based on the data stored on it. While it is true that many filesystems will lose performance when they are nearly full, that mainly has to do with filesystem fragmentation, which is not an issue when you have only one large file on the filesystem (except possibly with copy-on-write filesystems like ZFS or btrfs, but if you are using those for parity drives then you should turn off COW on that filesystem)

    As long as you don't fill your data drives up too much, and as long as you do not add millions of small files, then your parity drive should not run out of space. The "holes" in the parity file will be filled when the space is needed.

     

    Last edit: jwill42 2014-11-02
  • nemo19

    nemo19 - 2014-11-02

    ok, thanks again for the quick and helpful reply. In that case it's not worth the risk, so I won't bother.

     

Log in to post a comment.

MongoDB Logo MongoDB