Monthly Archives: January 2012

How To Resize /dev/shm Filesystem In Linux

By default installation, RHEL and most Linux distributions mount tmpfs (a RAM-based temporarily filesystem) to /dev/shm directory and this temporarily filesystem size is always set to be half of the installed memory.

If that default size is not something expected, you can increase or reduce the /dev/shm filesystem size at wish.

To be even extreme, you may drop or disable this temporarily RAM-based filesystem entirely, to prevent it from auto-mount during system boots up, if none of the application in that Linux server relying on shared memory function or explicitly using tmpfs (as a quick-and-dirty trick to improve execution performance).

To increase or decrease /dev/shm filesystem size

1) Open /etc/fstab with vi or any text editor of your choice,

2) Locate the line of /dev/shm and use the tmpfs size option to specify your expected size,

e.g. 512MB:
tmpfs /dev/shm tmpfs defaults,size=512m 0 0
e.g. 2GB:
tmpfs /dev/shm tmpfs defaults,size=2g 0 0

The /etc/fstab content format is documented in man fstab and the tmpfs filesystem options can be found in man mount

3) To make change effective immediately, run this mount command to remount the /dev/shm filesystem:

mount -o remount /dev/shm

in Walker News

I hope it was useful!!!
Cheers

vmount: Not owner error on Linux NFS Export

While mounting NFS filesystem from AIX node named AIX_LPAR onto Linux NFS server Linux_NFS_server, got the error:

vmount: Not owner

root [AIX_LPAR] /tmp: mount Linux_NFS_Server:/local/home/app/media /mnt
mount: giving up on:
 Linux_NFS_Server:/local/home/app/media
vmount: Not owner

Solution:

Set parameter nfs_use_reserved_ports to 1 on client AIX_LPAR

root [AIX_LPAR] /tmp: nfso -o nfs_use_reserved_ports=1
Setting nfs_use_reserved_ports to 1
root [AIX_LPAR] /tmp: mount Linux_NFS_Server:/local/home/app/media /mnt

I hope it was useful!!!
Cheers

Optimization WordPress Plugins & Solutions by W3 EDGE