Mount points

By default, attached disks are mounted here :

/srv/

The disks are automatically mounted when you attach them to your server.

You can change this mount point by editing the gandi config file on your server.

Data Management

The data you have saved to a disk is associated with that disk.

A disk on which you have put information can be detached and attached to another server without information being lost.

Debian 9 and autofs

Debian 9 images now use autofs.

The mounting is performed automatically when a read/write operation is requested by a user or application.

If you migrate your virtual machine from Debian Jessie (or an older version of Debian) to Debian Stretch, you will have to setup autofs to access your additional disks:

  1. Update your APT media : `apt-get -qq update`
  2. Install autofs: `apt-get install autofs`
  3. Check that `gandi-hosting-vm2` is up to date. You should have /etc/autofs.gandi and /etc/auto.master.d/gandi.autofs on your system.
  4. Edit /etc/udev/rules.d/86-gandi.rules and comment each line containing the name of the script `manage_data_disk.py` (add # to the beginning of each line)
  5. Stop all applications and shells using data on the additional disk
  6. Umount the additional disk if it is mounted: `umount /srv/<label_of_the_disk>`
  7. Reload udev: `udevadm control –reload-rules` or restart you virtual machine
  8. Check that the only line in /etc/auto.master.d/gandi.autofs is not commented and starts with `/srv /etc/autofs.gandi…`. If not, remove the '#' sign at the beginning of the line.
  9. Restart autofs: `service autofs restart`
  10. You now should be able to access the content of your disk with: `ls /srv/<label_of_the_disk>/`
  11. You can now restart the application that reads/stores data in your additional disk

See https://github.com/Gandi/gandi-vm-config/blob/master/README.md for additional information.

Last modified: 09/13/2017 at 19:57 by Richard M. (Gandi)