[rhelv6-list] Problems resizing tmpfs under RHEL6

Udo rhelv6-list at open-pla.net
Wed Feb 23 10:28:45 UTC 2011


Am Mittwoch, den 23.02.2011, 10:13 +0100 schrieb carlopmart:
> >
> > Hi,
> >
> > it is a freshly installed RHEL6-x86_64 from iso without updates.
> > The changes are only in /etc/fstab, as you can see above, and a remount command.
> >
> > Udo
> >
> >
> 
> Do you need to execute remount command after host is up?? I need to run every time 
> when laptop is up.
> 
> Thanks.
> 

Oh sorry,

I didn't realized that you only have the problem after a reboot.
After a reboot I have the same effect.

But the following patch correct it.
The backshlashes marks the linebreak.

--- /etc/rc.d/rc.sysinit.orig   2010-09-01 18:15:50.000000000 +0200
+++ /etc/rc.d/rc.sysinit        2011-02-23 11:07:12.544475820 +0100
@@ -487,7 +487,7 @@
        mount -f /proc >/dev/null 2>&1
        mount -f /sys >/dev/null 2>&1
        mount -f /dev/pts >/dev/null 2>&1
-       mount -f /dev/shm >/dev/null 2>&1
+       #mount -f /dev/shm >/dev/null 2>&1
        mount -f /proc/bus/usb >/dev/null 2>&1
 fi
 
@@ -495,7 +495,7 @@
 # mounted). Contrary to standard usage,
 # filesystems are NOT unmounted in single user mode.
 if [ "$READONLY" != "yes" ] ; then
-       action $"Mounting local filesystems: " mount -a -t \
nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
+       action $"Mounting local filesystems: " mount -a -t \
tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 else
        action $"Mounting local filesystems: " mount -a -n -t \
nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 fi


If the mount point is different, it works as expected after a reboot
(unpatched rc.sysinit).

cat /etc/fstab |grep tmpfs
tmpfs    /dev/shm    tmpfs   defaults,size=66%        0 0
tmpfs    /mnt/tmpfs  tmpfs   defaults,size=33%        0 0

df -h | grep tmpfs
tmpfs        1,5G   26M  1,5G   2% /dev/shm
tmpfs        984M     0  984M   0% /mnt/tmpfs


It's a bug or a feature?


The command /bin/mount -o remount /dev/shm
in /etc/rc.d/rc.local solve your problem.


Udo






More information about the rhelv6-list mailing list