At 11:00 2002/06/28 -0400, Javier Gostling wrote: >Hi all, >Does enyone have any experience using tmpfs on /tmp in a Redhat system? >I read there are some issues in some systems when doing this. And I >thought I'd better ask in the list before risking my system to sudden >death.
I've been using both tmpfs (on /tmp and /var/tmp) and devfs for quite a while, but I'm something of a glutton for punishment. The problems I'm aware of with tmpfs are: - Users are stupid. They put things in /tmp and expect the files to hang around (then get offended if I have to reboot and the contents of /tmp vanishes as a result). - Redhat scripts are too clever by half. In an effort to ensure compatibility with swap files Redhat's halt script turns swap off BEFORE it unmounts filesystems. If you're using tmpfs then naturally this means that the entire contents of your tmpfs mountpoints is shifted into RAM, and the machine tends to lock up if it doesn't fit. The fix is simply to unmount your tmp filesystems first. I did this by adding: # Unmount tmpfs filesystems before turning off swap: Avoid crashing. /bin/umount -a -t tmpfs to /etc/init.d/halt right before the block that turns off swap. Unfortunately my halt script was also modified from the original to suit the tastes of my UPS software (apcupsd), here is a diff from Redhat's original script: --- halt.old Fri Mar 8 12:39:20 2002 +++ halt Fri Mar 8 12:43:37 2002 @@ -117,6 +117,9 @@ runcmd $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS +# Unmount tmpfs filesystems before turning off swap: Avoid crashing. +/bin/umount -a -t tmpfs + # Turn off swap, then unmount file systems. SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` [ -n "$SWAPS" ] && runcmd $"Turning off swap: " swapoff $SWAPS @@ -186,6 +189,18 @@ mount -n -o ro,remount $line done +# See if this is a powerfail situation. # ***apcupsd*** +if [ -f /etc/apcupsd/powerfail ]; then # ***apcupsd*** + echo # ***apcupsd*** + echo "APCUPSD will now power off the UPS" # ***apcupsd*** + echo # ***apcupsd*** + /etc/apcupsd/apccontrol killpower # ***apcupsd*** + echo # ***apcupsd*** + echo "Please ensure that the UPS has powered off before rebooting" # ***apcupsd*** + echo "Otherwise, the UPS may cut the power during the reboot!!!" # ***apcupsd*** + echo # ***apcupsd*** +fi # ***apcupsd*** + # Now halt or reboot. echo $"$message" if [ -f /fastboot ]; then -- Q: What's tiny and yellow and very, very, dangerous? A: A canary with the super-user password. _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list