Recover instance from NFS

From Wikitech

Note: This procedure disables NFS, which means the contents of /home, /data/project, /public/dumps and /data/scratch will disappear. We can recover them later if you would like, once NFS is back up.

Disable NFS via hiera for your project

This only prevents puppet from attempting to mount them, doesn't unmount them

  1. Go to Hiera:project-name page on wikitech, e.g. Hiera:Editor-engagement. The Projects dropdown in Special:NovaProject shows the names of the projects to which you belong.
  2. Add the following to it (create the page if it doesn't exist):
    nfs_mounts:    
        project: false    
        home: false    
        scratch: false    
        dumps: false
when you save, the content handler may add some dashes and change indent if the page didn't exist, don't worry.

And then for each instance:

  1. reboot instance from wikitech, e.g. on the Special:NovaInstance page find the instance and click "reboot" in the Actions column of the table.
  2. (it will take a long time before this is available) ssh into the instance. On precise, this will take even longer as you need a successful puppet run before you can login
  3. export LC_ALL="C"; sudo perl -i'' -pe 's/^labstore/#labstore/' /etc/fstab
  4. umount /data/project; umount /home; umount /public/dumps; umount /public/keys; umount /data/scratch
This may report "umount: /data/project is not mounted (according to mtab)", etc. If it does report that a filesystem is mounted, repeat the command prefixed with sudo , e.g. sudo umount /data/project.
  1. sudo reboot (reboot from OS not Wikitech)