mfshdd.cfg(5)

NAME
mfshdd.cfg - list of MooseFS storage directories for mfschunkserver

DESCRIPTION
The file mfshdd.cfg contains list of directories (mountpoints) used for MooseFS storage.

  SYNTAX

Syntax is:

[*|<|>|~]PATH [SPACE OPTIONS]

Lines starting with # character are ignored as comments.

Path can be prefixed with one or more special characters. These characters work as additional options.

    *   means this directory (hard drive) is "marked for removal" and all data will be replicated to other hard drives, usually on other chunkservers

    <   means that all data from this hard drive should be moved to other local hard drives

    >   means that all data from other local hard drives should be moved to this hard drive

    ~   means that significant (more than 10% in less than a minute) change of total blocks count will not mark this drive as damaged (useful for compressed filesystems)

PATH is path to the mounting point of storage directory, usually a single hard drive.

SPACE OPTIONS allow to define limits in used space and alter disk usage reporting. A SPACE OPTION can be:

    a positive space limit, indicating a space limit definition (i.e. only this amount of space on the indicated path should be used for chunk storage)

    a negative space limit, indicating a reserved space definition (i.e. at least this amount of space should always be left free on the indicated path)

    an equals '=' sign, optionally followed by a space limit indicator

Space limit can be either a defined amount of space (format: [0-9]*(.[0-9]*)?([kMGTPE]|[KMGTPE]i)?B?) or a percent of total device size.

An equals sign indicates, that a disk is "shared" with another process (either another chunk server process or an unrelated process) and the amount of space used on the disk is not necessarily indicative of the amount of space used by chunks. Additionally, an indicator of a space limit can be defined. Percent says how many percent of the available disk space should be considered as available for the chunkserver. Size says how much exact space should be considered available for the chunkserver. If the percent or space are negative, then we define the unavailable amount of space instead.

The presence or absence of SPACE OPTION changes the way chunk server calculates available and used space on a given path.

Let's define 3 base values:
total_hdd - total device size, as returned by statvfs
avail_hdd - total available space, as returned by statvfs
calc_size - used space (sum of chunk's disk usage)

When there is no SPACE OPTION defined then total and available space are reported as follows:

- reported total = total_hdd
- reported avail = avail_hdd

Otherwise available space is calculated using formulas:

1. With constant reserved space (negative space limit -X)
- reported avail = total_hdd - X - calc_size (or zero if X + calc_size > total_hdd)

2. With perecent of reserved space (negative space limit -X%)
- reported avail = total_hdd - total_hdd*X/100 - calc_size (or zero if total_hdd*X/100 + calc_size > total_hdd)

3. With constant space limit (positive space limit X)
- reported avail = X - calc_size (or zero if calc_size > X)

4. With percent space limit (positive space limit X%)
- reported avail = total_hdd*X/100 - calc_size (or zero if calc_size > total_hdd*X/100)

5. With shared space indicator (= sign)
- reported avail = avail_hdd

6. With shared space indicator and space indicator (=X)
- reported avail = X (or avail_hdd if avail_hdd < X)

7. With shared space indicator and percent indicator (=X%)
- reported avail = avail_hdd*X/100

8. With shared space indicator and negative space indicator (=-X)
- reported avail = avail_hdd - X (or 0, if X>avail_hdd)

9. With shared space indicator and negative percent indicator (=-X%)
- reported avail = avail_hdd - avail_hdd*X/100

In all those cases total space is calculated as:
- reported total = reported avail + calc_size

COPYRIGHT
Copyright (C) 2026 Jakub Kruszona-Zawadzki, Saglabs SA

This file is part of MooseFS.

MooseFS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (only).

MooseFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/>.

SEE ALSO
mfschunkserver(8), mfschunkserver.cfg(5)