Skip to content

Instantly share code, notes, and snippets.

@jonathanelbailey
Last active October 28, 2019 09:43
Show Gist options
  • Save jonathanelbailey/1274ad29a8cdcc9a74d9a994571afdf0 to your computer and use it in GitHub Desktop.
Save jonathanelbailey/1274ad29a8cdcc9a74d9a994571afdf0 to your computer and use it in GitHub Desktop.
a bootstrap script that configures the NFS server for storage domain management with Ovirt.
#! /bin/bash
set -e
# to run this script:
# curl -s https://gist.githubusercontent.com/jonathanelbailey/1274ad29a8cdcc9a74d9a994571afdf0/raw/ \
# | sudo bash /dev/stdin
# comment out previous rpcmountdopts key.
sed -i '/RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4/a # RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4' \
/etc/default/nfs-kernel-server
# append new key with manage-gids option removed.
sed -i /#RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4/RPCMOUNTDOPTS=--no-nfs-version 4/ /etc/default/nfs-kernel-server
# restart the server.
systemctl restart nfs-kernel-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment