{
    "content": [
        {
            "type": "text",
            "text": "# SYSTEMD.MOUNT (info)\n\n## NAME\n\nsystemd.mount - Mount unit configuration\n\n## SYNOPSIS\n\nmount.mount\n\n## DESCRIPTION\n\nA unit configuration file whose name ends in \".mount\" encodes\ninformation about a file system mount point controlled and supervised\nby systemd.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **AUTOMATIC DEPENDENCIES**\n- **FSTAB**\n- **OPTIONS**\n- **SEE ALSO**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SYSTEMD.MOUNT",
        "section": "",
        "mode": "info",
        "summary": "systemd.mount - Mount unit configuration",
        "synopsis": "mount.mount",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemctl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemctl/1/json"
            },
            {
                "name": "systemd-system.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-system.conf/5/json"
            },
            {
                "name": "systemd.unit",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
            },
            {
                "name": "systemd.exec",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/5/json"
            },
            {
                "name": "systemd.kill",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.kill/5/json"
            },
            {
                "name": "systemd.resource-control",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.resource-control/5/json"
            },
            {
                "name": "systemd.service",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
            },
            {
                "name": "systemd.device",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.device/5/json"
            },
            {
                "name": "proc",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
            },
            {
                "name": "mount",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mount/8/json"
            },
            {
                "name": "fstab-generator",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/fstab-generator/8/json"
            },
            {
                "name": "systemd.directives",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
            },
            {
                "name": "systemd-mount",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-mount/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 43,
                "subsections": []
            },
            {
                "name": "AUTOMATIC DEPENDENCIES",
                "lines": 42,
                "subsections": []
            },
            {
                "name": "FSTAB",
                "lines": 170,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 77,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "systemd.mount - Mount unit configuration\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "mount.mount\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "A unit configuration file whose name ends in \".mount\" encodes\ninformation about a file system mount point controlled and supervised\nby systemd.\n\nThis man page lists the configuration options specific to this unit\ntype. See systemd.unit(5) for the common options of all unit\nconfiguration files. The common configuration items are configured in\nthe generic [Unit] and [Install] sections. The mount specific\nconfiguration options are configured in the [Mount] section.\n\nAdditional options are listed in systemd.exec(5), which define the\nexecution environment the mount(8) program is executed in, and in\nsystemd.kill(5), which define the way the processes are terminated, and\nin systemd.resource-control(5), which configure resource control\nsettings for the processes of the service.\n\nNote that the options User= and Group= are not useful for mount units.\nsystemd passes two parameters to mount(8); the values of What= and\nWhere=. When invoked in this way, mount(8) does not read any options\nfrom /etc/fstab, and must be run as UID 0.\n\nMount units must be named after the mount point directories they\ncontrol. Example: the mount point /home/lennart must be configured in a\nunit file home-lennart.mount. For details about the escaping logic used\nto convert a file system path to a unit name, see systemd.unit(5). Note\nthat mount units cannot be templated, nor is possible to add multiple\nnames to a mount unit by creating additional symlinks to it.\n\nOptionally, a mount unit may be accompanied by an automount unit, to\nallow on-demand or parallelized mounting. See systemd.automount(5).\n\nMount points created at runtime (independently of unit files or\n/etc/fstab) will be monitored by systemd and appear like any other\nmount unit in systemd. See /proc/self/mountinfo description in proc(5).\n\nSome file systems have special semantics as API file systems for\nkernel-to-userspace and userspace-to-userspace interfaces. Some of them\nmay not be changed via mount units, and cannot be disabled. For a\nlonger discussion see API File Systems[1].\n\nThe systemd-mount(1) command allows creating .mount and .automount\nunits dynamically and transiently from the command line.\n",
                "subsections": []
            },
            "AUTOMATIC DEPENDENCIES": {
                "content": "Implicit Dependencies\nThe following dependencies are implicitly added:\n\no   If a mount unit is beneath another mount unit in the file system\nhierarchy, both a requirement dependency and an ordering dependency\nbetween both units are created automatically.\n\no   Block device backed file systems automatically gain BindsTo= and\nAfter= type dependencies on the device unit encapsulating the block\ndevice (see below).\n\no   If traditional file system quota is enabled for a mount unit,\nautomatic Wants= and Before= dependencies on\nsystemd-quotacheck.service and quotaon.service are added.\n\no   Additional implicit dependencies may be added as result of\nexecution and resource control parameters as documented in\nsystemd.exec(5) and systemd.resource-control(5).\n\nDefault Dependencies\nThe following dependencies are added unless DefaultDependencies=no is\nset:\n\no   All mount units acquire automatic Before= and Conflicts= on\numount.target in order to be stopped during shutdown.\n\no   Mount units referring to local file systems automatically gain an\nAfter= dependency on local-fs-pre.target, and a Before= dependency\non local-fs.target unless nofail mount option is set.\n\no   Network mount units automatically acquire After= dependencies on\nremote-fs-pre.target, network.target and network-online.target, and\ngain a Before= dependency on remote-fs.target unless nofail mount\noption is set. Towards the latter a Wants= unit is added as well.\n\nMount units referring to local and network file systems are\ndistinguished by their file system type specification. In some cases\nthis is not sufficient (for example network block device based mounts,\nsuch as iSCSI), in which case netdev may be added to the mount option\nstring of the unit, which forces systemd to consider the mount unit a\nnetwork mount.\n",
                "subsections": []
            },
            "FSTAB": {
                "content": "Mount units may either be configured via unit files, or via /etc/fstab\n(see fstab(5) for details). Mounts listed in /etc/fstab will be\nconverted into native units dynamically at boot and when the\nconfiguration of the system manager is reloaded. In general,\nconfiguring mount points through /etc/fstab is the preferred approach.\nSee systemd-fstab-generator(8) for details about the conversion.\n\nThe NFS mount option bg for NFS background mounts as documented in\nnfs(5) is detected by systemd-fstab-generator and the options are\ntransformed so that systemd fulfills the job-control implications of\nthat option. Specifically systemd-fstab-generator acts as though\n\"x-systemd.mount-timeout=infinity,retry=10000\" was prepended to the\noption list, and \"fg,nofail\" was appended. Depending on specific\nrequirements, it may be appropriate to provide some of these options\nexplicitly, or to make use of the \"x-systemd.automount\" option\ndescribed below instead of using \"bg\".\n\nWhen reading /etc/fstab a few special mount options are understood by\nsystemd which influence how dependencies are created for mount points.\nsystemd will create a dependency of type Wants= or Requires= (see\noption nofail below), from either local-fs.target or remote-fs.target,\ndepending whether the file system is local or remote.\n\nx-systemd.requires=\nConfigures a Requires= and an After= dependency between the created\nmount unit and another systemd unit, such as a device or mount\nunit. The argument should be a unit name, or an absolute path to a\ndevice node or mount point. This option may be specified more than\nonce. This option is particularly useful for mount point\ndeclarations that need an additional device to be around (such as\nan external journal device for journal file systems) or an\nadditional mount to be in place (such as an overlay file system\nthat merges multiple mount points). See After= and Requires= in\nsystemd.unit(5) for details.\n\nNote that this option always applies to the created mount unit only\nregardless whether x-systemd.automount has been specified.\n\nx-systemd.before=, x-systemd.after=\nIn the created mount unit, configures a Before= or After=\ndependency on another systemd unit, such as a mount unit. The\nargument should be a unit name or an absolute path to a mount\npoint. This option may be specified more than once. This option is\nparticularly useful for mount point declarations with nofail option\nthat are mounted asynchronously but need to be mounted before or\nafter some unit start, for example, before local-fs.target unit.\nSee Before= and After= in systemd.unit(5) for details.\n\nNote that these options always apply to the created mount unit only\nregardless whether x-systemd.automount has been specified.\n\nx-systemd.wanted-by=, x-systemd.required-by=\nIn the created mount unit, configures a WantedBy= or RequiredBy=\ndependency on another unit. This option may be specified more than\nonce. If this is specified, the normal automatic dependencies on\nthe created mount unit, e.g., local-fs.target, are not\nautomatically created. See WantedBy= and RequiredBy= in\nsystemd.unit(5) for details.\n\nx-systemd.requires-mounts-for=\nConfigures a RequiresMountsFor= dependency between the created\nmount unit and other mount units. The argument must be an absolute\npath. This option may be specified more than once. See\nRequiresMountsFor= in systemd.unit(5) for details.\n\nx-systemd.device-bound\nThe block device backed file system will be upgraded to BindsTo=\ndependency. This option is only useful when mounting file systems\nmanually with mount(8) as the default dependency in this case is\nRequires=. This option is already implied by entries in /etc/fstab\nor by mount units.\n\nx-systemd.automount\nAn automount unit will be created for the file system. See\nsystemd.automount(5) for details.\n\nx-systemd.idle-timeout=\nConfigures the idle timeout of the automount unit. See\nTimeoutIdleSec= in systemd.automount(5) for details.\n\nx-systemd.device-timeout=\nConfigure how long systemd should wait for a device to show up\nbefore giving up on an entry from /etc/fstab. Specify a time in\nseconds or explicitly append a unit such as \"s\", \"min\", \"h\", \"ms\".\n\nNote that this option can only be used in /etc/fstab, and will be\nignored when part of the Options= setting in a unit file.\n\nx-systemd.mount-timeout=\nConfigure how long systemd should wait for the mount command to\nfinish before giving up on an entry from /etc/fstab. Specify a time\nin seconds or explicitly append a unit such as \"s\", \"min\", \"h\",\n\"ms\".\n\nNote that this option can only be used in /etc/fstab, and will be\nignored when part of the Options= setting in a unit file.\n\nSee TimeoutSec= below for details.\n\nx-systemd.makefs\nThe file system will be initialized on the device. If the device is\nnot \"empty\", i.e. it contains any signature, the operation will be\nskipped. It is hence expected that this option remains set even\nafter the device has been initialized.\n\nNote that this option can only be used in /etc/fstab, and will be\nignored when part of the Options= setting in a unit file.\n\nSee systemd-makefs@.service(8).\n\nwipefs(8) may be used to remove any signatures from a block device\nto force x-systemd.makefs to reinitialize the device.\n\nx-systemd.growfs\nThe file system will be grown to occupy the full block device. If\nthe file system is already at maximum size, no action will be\nperformed. It is hence expected that this option remains set even\nafter the file system has been grown. Only certain file system\ntypes are supported, see systemd-makefs@.service(8) for details.\n\nNote that this option can only be used in /etc/fstab, and will be\nignored when part of the Options= setting in a unit file.\n\nx-systemd.rw-only\nIf a mount operation fails to mount the file system read-write, it\nnormally tries mounting the file system read-only instead. This\noption disables that behaviour, and causes the mount to fail\nimmediately instead. This option is translated into the\nReadWriteOnly= setting in a unit file.\n\nnetdev\nNormally the file system type is used to determine if a mount is a\n\"network mount\", i.e. if it should only be started after the\nnetwork is available. Using this option overrides this detection\nand specifies that the mount requires network.\n\nNetwork mount units are ordered between remote-fs-pre.target and\nremote-fs.target, instead of local-fs-pre.target and\nlocal-fs.target. They also pull in network-online.target and are\nordered after it and network.target.\n\nnoauto, auto\nWith noauto, the mount unit will not be added as a dependency for\nlocal-fs.target or remote-fs.target. This means that it will not be\nmounted automatically during boot, unless it is pulled in by some\nother unit. The auto option has the opposite meaning and is the\ndefault.\n\nNote that if x-systemd.automount (see above) is used, neither auto\nnor noauto have any effect. The matching automount unit will be\nadded as a dependency to the appropriate target.\n\nnofail\nWith nofail, this mount will be only wanted, not required, by\nlocal-fs.target or remote-fs.target. Moreover the mount unit is not\nordered before these target units. This means that the boot will\ncontinue without waiting for the mount unit and regardless whether\nthe mount point can be mounted successfully.\n\nx-initrd.mount\nAn additional filesystem to be mounted in the initramfs. See\ninitrd-fs.target description in systemd.special(7).\n\nIf a mount point is configured in both /etc/fstab and a unit file that\nis stored below /usr/, the former will take precedence. If the unit\nfile is stored below /etc/, it will take precedence. This means: native\nunit files take precedence over traditional configuration files, but\nthis is superseded by the rule that configuration in /etc/ will always\ntake precedence over configuration in /usr/.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Mount files must include a [Mount] section, which carries information\nabout the file system mount points it supervises. A number of options\nthat may be used in this section are shared with other unit types.\nThese options are documented in systemd.exec(5) and systemd.kill(5).\nThe options specific to the [Mount] section of mount units are the\nfollowing:\n\nWhat=\nTakes an absolute path of a device node, file or other resource to\nmount. See mount(8) for details. If this refers to a device node, a\ndependency on the respective device unit is automatically created.\n(See systemd.device(5) for more information.) This option is\nmandatory. Note that the usual specifier expansion is applied to\nthis setting, literal percent characters should hence be written as\n\"%%\". If this mount is a bind mount and the specified path does not\nexist yet it is created as directory.\n\nWhere=\nTakes an absolute path of a file or directory for the mount point;\nin particular, the destination cannot be a symbolic link. If the\nmount point does not exist at the time of mounting, it is created\nas directory. This string must be reflected in the unit filename.\n(See above.) This option is mandatory.\n\nType=\nTakes a string for the file system type. See mount(8) for details.\nThis setting is optional.\n\nOptions=\nMount options to use when mounting. This takes a comma-separated\nlist of options. This setting is optional. Note that the usual\nspecifier expansion is applied to this setting, literal percent\ncharacters should hence be written as \"%%\".\n\nSloppyOptions=\nTakes a boolean argument. If true, parsing of the options specified\nin Options= is relaxed, and unknown mount options are tolerated.\nThis corresponds with mount(8)'s -s switch. Defaults to off.\n\nLazyUnmount=\nTakes a boolean argument. If true, detach the filesystem from the\nfilesystem hierarchy at time of the unmount operation, and clean up\nall references to the filesystem as soon as they are not busy\nanymore. This corresponds with umount(8)'s -l switch. Defaults to\noff.\n\nReadWriteOnly=\nTakes a boolean argument. If false, a mount point that shall be\nmounted read-write but cannot be mounted so is retried to be\nmounted read-only. If true the operation will fail immediately\nafter the read-write mount attempt did not succeed. This\ncorresponds with mount(8)'s -w switch. Defaults to off.\n\nForceUnmount=\nTakes a boolean argument. If true, force an unmount (in case of an\nunreachable NFS system). This corresponds with umount(8)'s -f\nswitch. Defaults to off.\n\nDirectoryMode=\nDirectories of mount points (and any parent directories) are\nautomatically created if needed. This option specifies the file\nsystem access mode used when creating these directories. Takes an\naccess mode in octal notation. Defaults to 0755.\n\nTimeoutSec=\nConfigures the time to wait for the mount command to finish. If a\ncommand does not exit within the configured time, the mount will be\nconsidered failed and be shut down again. All commands still\nrunning will be terminated forcibly via SIGTERM, and after another\ndelay of this time with SIGKILL. (See KillMode= in\nsystemd.kill(5).) Takes a unit-less value in seconds, or a time\nspan value such as \"5min 20s\". Pass 0 to disable the timeout logic.\nThe default value is set from DefaultTimeoutStartSec= option in\nsystemd-system.conf(5).\n\nCheck systemd.exec(5) and systemd.kill(5) for more settings.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "systemd(1), systemctl(1), systemd-system.conf(5), systemd.unit(5),\nsystemd.exec(5), systemd.kill(5), systemd.resource-control(5),\nsystemd.service(5), systemd.device(5), proc(5), mount(8), systemd-\nfstab-generator(8), systemd.directives(7), systemd-mount(1)\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. API File Systems\nhttps://www.freedesktop.org/wiki/Software/systemd/APIFileSystems\n\nsystemd 249                                                   SYSTEMD.MOUNT(5)",
                "subsections": []
            }
        }
    }
}