Hello, I want to put my /tmp partition in RAM and I got the following example from the fstab's man page: swap /tmp mfs rw,nodev,nosuid,-s=153600 0 0 The problem is that I don't want to have any swap in RAM, only my /tmp partition so I'm wondering if I simply remove the "swap" entry from that line if that would work? Sorry for asking here before trying it but I only have remote access to the server so if I take off that swap entry from the line and it doesn't work then I have no way of accessing my server so I just want to make sure that I can do this and when I reboot my system everything will come up just fine. Thanks, - Jake
No, that first entry has to be there. But it does not mean what you think it means, it has nothing to do with swap in (to?) RAM. Read mount_mfs(8) for details.
technically, swap is never on memory. swap is memory written to the disk (when data is in memory it is either used or cache) what you wrote is the correct way to create a partition in memory (i do the same for my swap, the difference is my disk is one 1 gb / and 95 Gb cgd disk but it is just for the fun of doing it, i am not yet that paranoid...) i suggest you to keep the swap entry. on bsd systems it wont be used that much, and when it does you have usually trouble on your hands (your mileage and size of flames coming from the server might vary). if you are worried and paranoid, you can create a partition, mounted on each boot with a random key for your swap and tmp and that key will be forgotten on each reboot and a new random one used. keep the swap entry. the /tmp one is good and that's how you create one to put your /tmp in memory. -- unzip ; strip ; touch ; grep ; find ; finger ; mount ; fsck ; more ; yes ; fsck ; umount ; sleep
Ok so I added that entry and it worked fine except for one problem and that is root only had permissions to write to that directory so some services did not start up properly. I then gave the /tmp directory 0777 with chmod and rebooted my machine but it set it back to rwxr-xr- x... How do I have it so that anyone can write to the directory when the computer starts up? Thanks, - Jake
The answer to your question is in "man mount_mfs":
"If the -P file option is not used,
the owner and mode of the created mfs file system will be
the same as the owner and mode of the mount point."
In other words, there is an entry for /tmp on the / filesystem, and
when the new swap filesystem is mounted, it inherits the permissions
of the original base /tmp entry.
So you need to chmod the underlying /tmp entry in the root filesystem,
then the change will stick. Simplest way to do this is boot single
user, do the chmod, and then reboot.
KevinTo the reader: if you feel confused after reading this, this is not your fault. It's just a lot of bad and confusing advice. -Otto
| Matthew Wilcox | [PATCH] Fix boot-time hang on G31/G33 PC |
| Vu Pham | Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Rafael J. Wysocki | [Bug #11799] xorg can not start up with stolen memory |
git: | |
| Li Frank-B20596 | why not TortoiseGit |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Junio C Hamano | Re: If you would write git from scratch now, what would you change? |
| Wincent Colaiuta | Possible to make a totally empty repository for remote access? |
| Richard Stallman | Real men don't attack straw men |
| Chris | Prolific USB-Serial Controller |
| Douglas A. Tutty | OBSD's perspective on SELinux |
| Nick Guenther | Re: how to clear dmesg outpout |
| Volker Armin Hemmann | build error with 2.6.27.6+reiser4+ehci-hub patch. ERROR: "mii_ethtool_gset" [drive... |
| Wenji Wu | A Linux TCP SACK Question |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
| YOSHIFUJI Hideaki / | [GIT PULL] [IPV6] COMPAT: Fix SSM applications on 64bit kernels. |
