[CUWiN-Dev] min RAM required for upgrade?

Bill Comisky bcomisky at pobox.com
Wed Jan 4 16:34:34 CST 2006


I was trying to upgrade an older soekris board that had only 32 MB of RAM 
compared to 64 for most of our boards.  tmpfs reserves 4MB for the system, 
so if the memory use during the upgrade gets to high then $tmpdir becomes 
unwritable if it is on /mfs.  This kills the script as it attempts to 
write the fstab file to $tmpdir (looks like it would affect the signal 
handling too since $abort is written to $tmpdir).

I feel like I've upgraded this node in the past, but it could have been 
before switching to tmpfs or perhaps with an older upgrade script that 
didn't write to tmp files?

Any ideas?  Maybe:
Free memory by stopping some things before starting the 
upgrade?
Compile tmpfs to have a lower reserved memory limit? 
Unmount/remount after untar'ing the archive (see memory use below)? 
Use $tmpdir on mounted partition instead of /mfs?

This is the error message I got:

Preparing for upgrade on /dev/wd0e.
/dev/rwd0e: 61.2MB (125424 sectors) block size 8192, fragment size 1024
         using 4 cylinder groups of 15.31MB, 1960 blks, 3776 inodes.
super-block backups (for fsck -b #) at:
     32, 31392, 62752, 94112,
Installing the upgrade.
   9658 KB   96.66 KB/s
Updating etc/fstab
sed: stdout: No space left on device

If I login during the upgrade and check vmstat:

root at 10.0.17.169 # vmstat
  procs    memory      page                       disk faults      cpu
  r b w    avm    fre  flt  re  pi   po   fr   sr w0   in   sy  cs us sy id
  5 0 0  19924    404  725   0   0    0    0    0  0  151  680  67 25 43 32

After the upgrade fails:

root at 10.0.17.169 # vmstat
  procs    memory      page                       disk faults      cpu
  r b w    avm    fre  flt  re  pi   po   fr   sr w0   in   sy  cs us sy id
  1 0 0  14388   1708  726   0   0    0    0    0  0  150  676  66 25 43 32

root at 10.0.17.169 # df | egrep '(mfs$|^Filesystem)'
Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
tmpfs            2708      2708         0   100%    /mfs

Simply unmounting frees much of this:

root at 10.0.17.169 # umount /mnt
root at 10.0.17.169 # df | egrep '(mfs$|^Filesystem)'
Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
tmpfs           10104      2720      7384    26%    /mfs

root at 10.0.17.169 # vmstat
  procs    memory      page                       disk faults      cpu
  r b w    avm    fre  flt  re  pi   po   fr   sr w0   in   sy  cs us sy id
  2 0 0   9112  11448  725   0   0    0    0    0  0  150  676  66 25 43 32

If I remount manually I still have a lot of memory left.

root at 10.0.17.169 # mount /dev/wd0e /mnt
root at 10.0.17.169 # df | egrep '(mfs$|^Filesystem)'
Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
tmpfs            8792      3264      5528    37%    /mfs

root at 10.0.17.169 # vmstat
  procs    memory      page                       disk faults      cpu
  r b w    avm    fre  flt  re  pi   po   fr   sr w0   in   sy  cs us sy id
  2 0 0  10936   9588  725   0   0    0    0    0  0  150  677  67 25 43 32


Bill

--
Bill Comisky
bcomisky at pobox.com


More information about the CU-Wireless-Dev mailing list