-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Reduce SONiC migration partition from 8G to 1G. #1343
Changes from 1 commit
9989e32
f8bde0e
bd8903d
6958898
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,12 @@ for x in "$@"; do | |
case "$x" in | ||
varlog_size=*) | ||
varlog_size="${x#varlog_size=}" | ||
;; | ||
resize2fs-host) | ||
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. where do you pass this data into /proc/cmdline? 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. the resize2fs-host is pass in the bootline in the grub config file that is used for migration : nos_to_sonic_grub.cfg. e.g: linux /image-master.0-dirty-20180129.024732/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda8 rw console=tty0 console=ttyS1,9600n8 quiet loop=image-master.0-dirty-20180129.024732/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor varlog_size=4096 fast-reboot resize2fs-host |
||
resize_dev=`cat /proc/mounts | ${rootmnt}/bin/grep "/root/host" | ${rootmnt}/usr/bin/cut -d' ' -f1` | ||
[ -z "$resize_dev" ] && exit 0 | ||
${rootmnt}/sbin/resize2fs $resize_dev | ||
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. do not use rootmnt, please follow mke2fs example to copy resize2fs into the initrd ramdisk. 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. follow arista-convertfs example to resize the rootfs in init-premount stage |
||
;; | ||
esac | ||
done | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,10 @@ OUTPUT_ONIE_IMAGE=target/sonic-$TARGET_MACHINE.bin | |
OUTPUT_RAW_IMAGE=target/sonic-$TARGET_MACHINE.raw | ||
|
||
### Raw image size in MB | ||
RAW_IMAGE_DISK_SIZE=8192 | ||
RAW_IMAGE_DISK_SIZE=1024 | ||
|
||
### Chunk size in MB (0 => single chunk) | ||
CHUNK_SIZE=8 | ||
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. default to 0 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. If CHUNK_SIZE=0, the sonic-broadcom.raw will be a 1GB ext4 compressed to ~ 360MB. 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. keep CHUNK_SIZE as an option, I think default to 0 is better. |
||
|
||
## Output file name for aboot installer | ||
OUTPUT_ABOOT_IMAGE=target/sonic-aboot-$TARGET_MACHINE.swi | ||
|
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.
why do we need to install dosfstools, parted in the base image?
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.
separate PR due to different purpose.
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.
These tools are needed in order to use a script (post migration) to revive free blocks and restore the OS9 partitions. I can remove them here since these can be installed on need basis on relevant units.