Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c68c0191
Commit
c68c0191
authored
Feb 17, 2016
by
Justin Santa Barbara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AWS: Add comments to explain the symlink logic
parent
69300c51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
format-disks.sh
cluster/aws/templates/format-disks.sh
+5
-0
No files found.
cluster/aws/templates/format-disks.sh
View file @
c68c0191
...
@@ -189,10 +189,13 @@ fi
...
@@ -189,10 +189,13 @@ fi
if
[[
-n
"
${
move_docker
}
"
]]
;
then
if
[[
-n
"
${
move_docker
}
"
]]
;
then
# Move docker to e.g. /mnt
# Move docker to e.g. /mnt
# but only if it is a directory, not a symlink left over from a previous run
if
[[
-d
/var/lib/docker
]]
;
then
if
[[
-d
/var/lib/docker
]]
;
then
mv
/var/lib/docker
${
move_docker
}
/
mv
/var/lib/docker
${
move_docker
}
/
fi
fi
mkdir
-p
${
move_docker
}
/docker
mkdir
-p
${
move_docker
}
/docker
# If /var/lib/docker doesn't exist (it will exist if it is already a symlink),
# then symlink it to the ephemeral docker area
if
[[
!
-e
/var/lib/docker
]]
;
then
if
[[
!
-e
/var/lib/docker
]]
;
then
ln
-s
${
move_docker
}
/docker /var/lib/docker
ln
-s
${
move_docker
}
/docker /var/lib/docker
fi
fi
...
@@ -203,10 +206,12 @@ fi
...
@@ -203,10 +206,12 @@ fi
if
[[
-n
"
${
move_kubelet
}
"
]]
;
then
if
[[
-n
"
${
move_kubelet
}
"
]]
;
then
# Move /var/lib/kubelet to e.g. /mnt
# Move /var/lib/kubelet to e.g. /mnt
# (the backing for empty-dir volumes can use a lot of space!)
# (the backing for empty-dir volumes can use a lot of space!)
# (As with /var/lib/docker, only if it is a directory; skip if symlink)
if
[[
-d
/var/lib/kubelet
]]
;
then
if
[[
-d
/var/lib/kubelet
]]
;
then
mv
/var/lib/kubelet
${
move_kubelet
}
/
mv
/var/lib/kubelet
${
move_kubelet
}
/
fi
fi
mkdir
-p
${
move_kubelet
}
/kubelet
mkdir
-p
${
move_kubelet
}
/kubelet
# Create symlink for /var/lib/kubelet, unless it is already a symlink
if
[[
!
-e
/var/lib/kubelet
]]
;
then
if
[[
!
-e
/var/lib/kubelet
]]
;
then
ln
-s
${
move_kubelet
}
/kubelet /var/lib/kubelet
ln
-s
${
move_kubelet
}
/kubelet /var/lib/kubelet
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment