Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
sudo du  / -h | grep "^[0-9\.]\+G"

Mounting a Volume as a Service

To automatically remount a volume after your node restarts, create a file like this:

Code Block
languagebash
core@etk2017-backup ~ $ cat /etc/systemd/system/ndslabs.mount
[Unit]
Description=Mount /dev/vdc on /ndslabs
After=local-fs.target

[Mount]
What=/dev/vdc
Where=/ndslabs
Type=ext4
Options=noatime

[Install]
WantedBy=multi-user.target

A second example:

Code Block
core@etk2017-backup ~ $ sudo cat /etc/systemd/system/var-lib-docker.mount
[Unit]
Description=Mount /dev/vdb on /var/lib/docker
After=local-fs.target

[Mount]
What=/dev/vdb
Where=/var/lib/docker
Type=ext4
Options=noatime

[Install]
WantedBy=multi-user.target

Then, you need to run the following three commands on each of your mounts:

Code Block
sudo systemctl unmask var-lib-docker.mount ndslabs.mount
sudo systemctl enable var-lib-docker.mount ndslabs.mount
sudo systemctl start var-lib-docker.mount ndslabs.mount