(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Best of the Newsgroups: osr5 convert /tmp to memfs

Main Index

Message-ID: <4355E38B.9CA592DE@att.net> 
From: "Steve M. Fabac, Jr." <smfabac@att.net>
Subject: Re: How to convert /tmp to memfs after install
References: <4353316A.84F6D02@att.net> <zTS4f.143$8W.115@newssvr30.news.prodigy.com> <dj12ii$hq0$1@reader2.panix.com> <43547DC0.AFA10117@att.net> <dj2ob6$evg$1@reader2.panix.com> <bf85f.314$8W.269@newssvr30.news.prodigy.com> 
Date: Wed, 19 Oct 2005 06:11:24 GMT

Bob Bailin wrote:
> 
> <third@whasup.com> wrote in message news:dj2ob6$evg$1@reader2.panix.com...
> 
> [...]
> 
> > Try this one:
> >
> > mount -F memfs -o swapmax=SIZE_IN_BYTES /dev/mem MOUNT_POINT
> 
> "/dev/mem": a crucial bit of info left out of the man page.
> 
> After first mistyping the 'swapmax' option as 'swapmem', I see that
> /etc/mount is a script that calls the appropriate mount binary, in this case
> for memfs it's 'mount.svr5':
> 
> # mount -F memfs -o swapmem=64000 /dev/mem /tmp
> UX:memfs mount.svr5: ERROR: illegal option: swapmem=64000
> UX:memfs mount.svr5: TO FIX: Usage:
> mount.svr5 [-F memfs] [generic_options] [-r] [-o {swapmax=xx | global_swapmax=xx
> }, rootmode=xx] special mount_point
> 
> Does 'special' have to be /dev/mem, or is this parameter ignored?
> According to this test:
> 
> # mount -F memfs -o swapmax=64000 /dev/tty /tmp
> # df -v
> Mount Dir  Filesystem              blocks      used      free   %used
> /          /dev/root              5426356   3993352   1433004    74%
> /stand     /dev/boot                81918     12806     69112    16%
> /proc      /proc                        0         0         0     -
> /dev/fd    /dev/fd                      0         0         0     -
> /dev/_tcp  /dev/_tcp                    0         0         0     -
> /system/pr /processorfs                 0         0         0     -
> /tmp       /dev/tty                   128         0       128     0%
> 
> it seems to be ignored. Therefore, the /etc/mount script should be
> modified to supply a dummy '/dev/mem' argument when -F is memfs,
> if only to avoid bogus filesystem entries in df -v listings.
> 
> Bob

With the above items as examples, I added the following to /etc/default/filesys:-


bdev=/dev/mem mountdir=/tmp mount=yes fstyp=memfs \
        rcmount=yes fsck=no rcfsck=no mntopts=global_swapmax=120000000
bdev=/dev/mem mountdir=/var/tmp mount=yes fstyp=memfs \
        rcmount=yes fsck=no rcfsck=no mntopts=


And after rebooting I see:
# dfspace
/         : Disk space:  1344.51 MB of  3000.99 MB available (44.80%).
/stand    : Disk space:    30.99 MB of    39.99 MB available (77.49%).
/u        : Disk space:  5797.17 MB of  6000.99 MB available (96.60%).
/app1     : Disk space:  7641.63 MB of  8137.82 MB available (93.90%).
/tmp      : Disk space:   114.43 MB of   114.44 MB available (100.00%).
/var/tmp  : Disk space:   114.43 MB of   114.44 MB available (100.00%).

Total Disk Space: 15043.19 MB of 17408.70 MB available (86.41%).
# df -i
Mount Dir  Filesystem               iused     ifree    itotal  %iused
/          /dev/root               180123    177565    357688    51%
/stand     /dev/boot                   22     10218     10240     1%
/proc      /proc                       71      9830      9901     1%
/dev/fd    /dev/fd                      9         0         9   100%
/dev/_tcp  /dev/_tcp                    0         0         0     -
/u         /dev/u                       4    765972    765976     1%
/app1      /dev/app1                   89   1009671   1009760     1%
/system/pr /processorfs                 3         0         3   100%
/tmp       /dev/mem                     4     32764     32768     1%
/var/tmp   /dev/mem                     2     32766     32768     1%

So, 120M memfs for /tmp is probably excessive but, Hey, I got 1G 
total RAM on a test system.  The next time I have to install a 
6.0 Enterprise system, I will record the settings from 
/etc/default/filesys after enabling /tmp memfs in the ISL 
configuration screen. 
--

                                      Steve Fabac
                                       S.M. Fabac & Associates
                                        816/765-1670
 



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/Bofcusm/2624.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress