namespace nfs mounts

This commit is contained in:
ducoterra
2020-08-16 22:23:50 -04:00
parent 1b65a94246
commit 01482788ff

View File

@@ -6,6 +6,8 @@
```bash
cat <<EOF >> /etc/hosts
3.14.3.100 mainframe
3.14.3.101 freenas
3.14.3.102 red
3.14.3.103 grey
3.14.3.107 purple
@@ -181,7 +183,7 @@ After=network.target
User=etcd
Type=notify
Environment=ETCD_UNSUPPORTED_ARCH=arm64
Environment=ETCD_DATA_DIR=/var/lib/etcd
Environment=ETCD_DATA_DIR=/var/lib/etcd/$ETCD_NAME
Environment=ETCD_NAME=$ETCD_NAME
Environment=ETCD_INITIAL_ADVERTISE_PEER_URLS=https://$ETCD_IP:2380
Environment=ETCD_LISTEN_PEER_URLS=https://$ETCD_IP:2380
@@ -213,8 +215,7 @@ journalctl -u etcd -f
## Use NFS
```bash
export SERVER=red
echo "freenas:/mnt/enc0/pi/$SERVER /var/lib/etcd nfs noexec,nosuid,nofail 0 0" >> /etc/fstab
echo "freenas:/mnt/enc0/pi /var/lib/etcd nfs noexec,nosuid,nofail 0 0" >> /etc/fstab
service etcd stop
mount -t nfs freenas:/mnt/enc0/pi /media
rsync -a /var/lib/etcd/ /media/$SERVER/
@@ -235,4 +236,5 @@ export ETCDCTL_ENDPOINTS=https://3.14.3.102:2379,https://3.14.3.107:2379,https:/
etcdctl put foo bar
etcdctl get foo
while true; do etcdctl put foo $(( ( RANDOM % 1000 ) + 1 )) && etcdctl get foo; done;
etcdctl del "" --from-key=true
```