Skip to content

Commit

Permalink
[202012] Move /var/log to RAM for Mellanox SN2700, Nokia 7215 and Del…
Browse files Browse the repository at this point in the history
…l S6100

### Why I did it
The commit by prgeor that was merged to master had conflict with 202012 branch and needed to be manually cherrypicked.


##### Work item tracking
- Microsoft ADO **(number only)**: 25086124

#### How I did it
Manually cherrypicked changes from PR #15077 

#### How to verify it
Built image with these changes and checked the filesystem:


**Mellanox-SN2700**
```
admin@str-msn2700-02:~$ show ver | grep -i "sonic software version"
SONiC Software Version: SONiC.202012-16544.362113-6980ffe77
admin@str-msn2700-02:~$
admin@str-msn2700-02:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           793M  8.4M  785M   2% /run
root-overlay     15G  6.4G  7.9G  45% /
/dev/sda3        15G  6.4G  7.9G  45% /host
tmpfs           792M  4.7M  788M   1% /var/log
tmpfs           3.9G  104M  3.8G   3% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup

admin@str-msn2700-02:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7.7Gi       2.5Gi       3.9Gi       120Mi       1.4Gi       4.9Gi
Swap:            0B          0B          0B

```

**Nokia-M0-7215**

```
SONiC Software Version: SONiC.202012-16544.362113-6980ffe77
Platform: armhf-nokia_ixs7215_52x-r0
HwSKU: Nokia-M0-7215
ASIC: marvell

admin@str2-7215-acs-1:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.5G     0  1.5G   0% /dev
tmpfs           304M  7.3M  296M   3% /run
root-overlay     15G  5.0G  9.5G  35% /
/dev/sda2        15G  5.0G  9.5G  35% /host
tmpfs           303M  728K  303M   1% /var/log
tmpfs           1.5G     0  1.5G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup

admin@str2-7215-acs-1:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:          3.0Gi       632Mi       1.6Gi       9.0Mi       772Mi       2.3Gi
Swap:            0B          0B          0B

```

**Dell S6100**

```
SONiC Software Version: SONiC.202012-16544.362113-00aac5392
Platform: x86_64-dell_s6100_c2538-r0
HwSKU: Force10-S6100
ASIC: broadcom
ASIC Count: 1
Uptime: 19:50:04 up 2 min,  1 user,  load average: 3.38, 1.66, 0.65

admin@str-s6100-acs-4:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           797M  7.8M  789M   1% /run
root-overlay     14G  4.7G  8.8G  35% /
/dev/sda4        14G  4.7G  8.8G  35% /host
tmpfs           796M  6.7M  790M   1% /var/log
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup

admin@str-s6100-acs-4:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7.8Gi       1.6Gi       4.9Gi        14Mi       1.3Gi       5.9Gi
Swap:            0B          0B          0B
admin@str-s6100-acs-4:~$

```

### Tested branch (Please provide the tested image version)

- [x] SONiC.202012-16544.362113-6980ffe77

#### Description for the changelog
Move /var/log to RAM for Mellanox SN2700, Nokia 7215 and Dell S6100 for the 202012 image.
  • Loading branch information
assrinivasan authored Sep 15, 2023
1 parent 9f4a4bd commit f9d83c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion device/dell/x86_64-dell_s6100_c2538-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONSOLE_PORT=0x2f8
CONSOLE_DEV=1
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich nos-config-part=/dev/sda12"
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich nos-config-part=/dev/sda12 logs_inram=on"
2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax acpi=noirq"
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax acpi=noirq logs_inram=on"
1 change: 1 addition & 0 deletions device/nokia/armhf-nokia_ixs7215_52x-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VAR_LOG_SIZE=4096
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="logs_inram=on"
2 changes: 1 addition & 1 deletion platform/marvell-armhf/platform.conf
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ prepare_boot_menu() {
BORDER='echo "---------------------------------------------------";echo;'
fw_setenv ${FW_ARG} print_menu "$BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER" > /dev/null

fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null
fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4 ${ONIE_PLATFORM_EXTRA_CMDLINE_LINUX}" > /dev/null
fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null

# Set boot configs
Expand Down

0 comments on commit f9d83c6

Please sign in to comment.