All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 721568af authored by David Johnson's avatar David Johnson

Preserve an already-moved (to /vms) /var/lib/docker across reloads.

parent 2baa00bb
......@@ -2168,16 +2168,18 @@ sub rootPreConfig($;$)
TBScriptUnlock();
return -1;
}
mkdir("$EXTRAFS/var.lib.docker");
#
# We need this stuff to be sticky across reloads, so move it
# into an lvm. If we lose the lvm, well then we are screwed.
#
my @files = glob("/var/lib/docker/*");
foreach my $file (@files) {
my $base = basename($file);
mysystem("/bin/mv $file $EXTRAFS/var.lib.docker")
if (! -e "$EXTRAFS/var.lib.docker/$base");
if (! -d "$EXTRAFS/var.lib.docker") {
mkdir("$EXTRAFS/var.lib.docker");
#
# We need this stuff to be sticky across reloads, so move it
# into an lvm. If we lose the lvm, well then we are screwed.
#
my @files = glob("/var/lib/docker/*");
foreach my $file (@files) {
my $base = basename($file);
mysystem("/bin/mv $file $EXTRAFS/var.lib.docker")
if (! -e "$EXTRAFS/var.lib.docker/$base");
}
}
mysystem("/bin/rm -rf /var/lib/docker");
mysystem("/bin/ln -s $EXTRAFS/var.lib.docker /var/lib/docker");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment