[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c037199 2/3: Mount auxiliary storage for chro
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c037199 2/3: Mount auxiliary storage for chroots on a tiny server |
Date: |
Wed, 5 Feb 2020 10:16:08 -0500 (EST) |
branch: master
commit c0371997ed58083d1471f9349e0afbbf453fe1cb
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Mount auxiliary storage for chroots on a tiny server
---
install_redhat.sh | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/install_redhat.sh b/install_redhat.sh
index 906698c..c5af97a 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -32,10 +32,23 @@ echo "Started: $stamp0"
grep "${CHRTNAME}" /proc/mounts | cut -f2 -d" " | xargs umount || echo "None?"
rm -rf /srv/chroot/"${CHRTNAME}"
rm /etc/schroot/chroot.d/"${CHRTNAME}".conf || echo "None?"
-umount /srv
-
-mount -t tmpfs -o size=10G tmpfs /srv
-findmnt /srv
+umount /srv/chroot
+
+# On a server with tiny 4G partitions for /usr, /var, /tmp, /opt,
+# etc., no partition had room for a chroot. Using RAM:
+# mount -t tmpfs -o size=10G tmpfs /srv
+# was sufficient for a proof of concept, but for real work it's
+# necessary to obtain sufficient storage, e.g.:
+# parted --align optimal /dev/sdb -- mklabel msdos mkpart primary ext4 1MiB
-1MiB
+# e2label /dev/sdb1 lmi
+# mkdir /lmi
+# chgrp lmi /lmi
+# echo "LABEL=lmi /srv/chroot ext4 defaults 0 0" >> /etc/fstab
+# partprobe
+# mount -a
+# Here, explicitly remount /srv/chroot because it was umounted above:
+mount LABEL=lmi /srv/chroot
+findmnt /srv/chroot
# Suppress a nuisance: rh-based distributions provide a default
# zsh logout file that clears the screen.