Memory File System (MemFS) 2.0 for HP-UX 11i v3
mount -F memfs -o
size=100MB,ninode=500,mode=0777,user=20,group=40 /mnt
For example, to automatically mount after system reboot, a MemFS instance of size
50MB with 1000 inodes on a mount point, /mnt with permissions set to 0777, owning
user as user with ID 20 and owning group as group with ID 40, add the following entry
to /etc/fstab file:
memfs /mnt memfs size=50MB,ninode=1000,mode=0777,user=20,group=40
0 0
The optional size argument can be used to specify the size of a MemFS instance. Append
to size, kb or KB to indicate the value is in kilobytes, mb or MB to indicate megabytes,
or gb or GB to indicate gigabytes. If size is not specified or is specified as 0, the size of
the file system is not limited and can grow based on the available swap space for
MemFS. After mounting a MemFS file system, the mounted instance can be listed using
the bdf(1)/df(1) command. For example, the above mounted instance will be listed
with bdf command, as shown below:
Filesystem kbytes used avail %used Mounted on
memfs 102400 0 102400 0% /memfs
The swap space is shared by all the MemFS instances in a system and other process
running on the system will also consume certain amount of swap space. Because of
this, the size argument does not guarantee that the specified size is available for use
by a MemFS instance always. If the size option is specified, it just ensures that the file
system does not grow beyond the specified value. There can be situations where %
used will be much less than 100% and no space left on the swap device to write data.
In such situations MemFS displays available space as 0. If size option is not specified
or specified as zero, the size of a mounted instance will be the summation of the available
free swap for MemFS and the amount of swap space consumed by that particular
instance. Depending on the swap usage, the size of a mounted MemFS instance can be
varying over time. However, if size option is specified the size of the mounted instance
is fixed to the specified value and does not change over time.
The optional ninode argument can be used to specify the maximum number of files
that can be created with in a particular instance. If ninode is 0 or the option is not
specified the number of files is not restricted, though it is limited by the available
memory for MemFS.
Only the size and ninode values can be modified by remounting the instance with the
remount option. For example, to modify the size of the MemFS file system to 100M
mounted on /tmp.
# /usr/sbin/mount –F memfs -o remount,size=100M /tmp
To modify the permissions or owners of the root of the file system, use chmod(1) and
chown(1) respectively.
An MemFS instance can be destroyed using the umount(1m) command. Only the
directory mount point is required as an argument:
16 Installing, Configuring, Tuning, and Removing HP-UX Memory File System