-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding mount size #48
Open
lkunjumon
wants to merge
15
commits into
Marvell-OpenNOS:master
Choose a base branch
from
lkunjumon:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4743499
Adding mount size
lkunjumon 707747d
Updating mount size
lkunjumon 8438c34
Align mount_size to next power of 2
lkunjumon d4f43e9
Updating mount_size in Gb
lkunjumon d9de9b3
updating mount size
lkunjumon 98312e7
update command to get actual size of compressed image.
lkunjumon 06c2388
updating image size check
lkunjumon da11766
Add paddig to image size
lkunjumon 538f077
Added comments for padding
lkunjumon 884b169
Updated padding
lkunjumon 3eca178
Updating coment for padding
lkunjumon 1d62e3f
update command
lkunjumon d36f8aa
update command
lkunjumon 4f36d57
Updating mount size
lkunjumon 02227f0
update mountsize in MB and added 32MB extra free space for image extr…
lkunjumon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,8 @@ export cur_wd | |
archive_path=$(realpath "$0") | ||
tmp_dir=$(mktemp -d) | ||
if [ "$(id -u)" = "0" ] ; then | ||
mount -t tmpfs tmpfs-installer $tmp_dir || exit 1 | ||
mount_size=$(df $tmp_dir | tail -1 | tr -s ' ' | cut -d' ' -f4) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mount_size is in KB |
||
mount -o size="${mount_size}K" -t tmpfs tmpfs-installer $tmp_dir || exit 1 | ||
fi | ||
cd $tmp_dir | ||
echo -n "Preparing image archive ..." | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this logic for? Are you trying to take available space from tmpfs??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antony-rheneus
yes
mktemp -d
/tmp/tmp.yWbDbATGf2
root@localhost:/home/admin# df /tmp/tmp.yWbDbATGf2
Filesystem 1K-blocks Used Available Use% Mounted on
root-overlay 12147768 3606788 7900860 32% /
root@localhost:/home/admin#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antony-rheneus Updated mount size depends on image size.