Skip to content

Commit

Permalink
turn off nfs sync for great spead
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlFK committed Dec 11, 2021
1 parent 46989df commit 3924a9e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions files/pxe/exports
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/srv/nfs/rpi/bullseye/boot/merged *(ro,sync,no_subtree_check,no_root_squash,fsid=1)
/srv/nfs/rpi/bullseye/root/merged *(ro,sync,no_subtree_check,no_root_squash,fsid=2)
/srv/nfs/rpi/bullseye/boot/merged *(ro,no_subtree_check,no_root_squash,fsid=1)
/srv/nfs/rpi/bullseye/root/merged *(ro,no_subtree_check,no_root_squash,fsid=2)
5 changes: 2 additions & 3 deletions files/rpi/setup3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
# run on the pi

apt update --allow-releaseinfo-change
apt install eatmydata
eatmydata apt upgrade --assume-yes
apt upgrade --assume-yes

eatmydata apt install --assume-yes ssh-import-id vim tmux \
apt install --assume-yes ssh-import-id vim tmux \
git etckeeper sshfs tio rsync openocd fxload

# E: Package 'sftp' has no installation candidate
Expand Down
3 changes: 2 additions & 1 deletion files/rpi/show_info.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
printf "\nRaspberry Pi FPGA gateway node.\n\n"
cat /sys/firmware/devicetree/base/model
printf "\n\nSerial Number:"
printf "\nSerial Number:"
cut -c "9-" /sys/firmware/devicetree/base/serial-number

7 changes: 6 additions & 1 deletion files/scripts/normal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ mount -o remount,ro ${p}/boot/merged
mount -o remount,ro ${p}/root/merged

# make the nfs shares ro
sed -i "/.*/s/rw,/ro,/" /etc/exports
sed -i "s/rw,/ro,/" /etc/exports
systemctl start nfs-server.service

# server enable automount the stack of pi files
# (this risks bricking the server with:
# overlayfs: failed to verify index dir 'upper' xattr
# sed -i "\@overlay\s*${p}/[br]oot/merged@s@\bnoauto\b@auto@" /etc/fstab

cat ${boot}/cmdline.txt
cat ${root}/etc/fstab
cat /etc/exports
grep ${boot} /etc/fstab
findmnt ${boot}
2 changes: 2 additions & 0 deletions notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ Community String: pib (used in netgear/poe.sh)
Access Mode: ReadWrite
Status: Enable
(Add)

raspivid -md 4 -t 0 -l -o tcp://10.21.0.226:22681 --vflip --hflip
6 changes: 3 additions & 3 deletions setup2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ dist=bullseye
# trunk of nfs things
d=/srv/nfs/rpi/${dist}

apt install unzip nfs-kernel-server iptables pwgen whois snmp
apt install -y unzip nfs-kernel-server iptables pwgen whois snmp

printf "\n[nfsd]\nhost=10.21.0.1\n" >> /etc/default/nfs-kernel-server
printf "\nhost=10.21.0.1\n" >> /etc/default/nfs-kernel-server

cd ${fdir}

Expand Down Expand Up @@ -134,7 +134,7 @@ rm etc/profile.d/wifi-check.sh
# Raspi is UK, Ubuntu and Debian are US
cp ${fdir}/rpi/keyboard etc/default/

cp ${fdir}/rpi/show_info.sh rpi/show_info.sh etc/profile.d/show_pidirs.sh
cp ${fdir}/rpi/show_info.sh etc/profile.d/

# things that maybe could be done here but it is easer to run them on the pi
cp ${fdir}/rpi/setup3.sh root
Expand Down

0 comments on commit 3924a9e

Please sign in to comment.