Click to See Complete Forum and Search --> : Sharing swap and /tmp


sajchurchey
12-27-2002, 08:13 PM
What do i have to do to enable to distros to share the same swap space?

I am also wondering whether or not I can share a /tmp mountpoint, and I hear it's faster to format it it tmpfs. However, this is not an option w/ RH 8 and I was wondering if there was a third party software that will allow me to format it like this.

Thanx in advance

slapNUT
12-27-2002, 09:39 PM
For sharing swap just copy the line in /etc/fstab that mounts the swap partition so each distro has the same line in /etc/fstab. The same goes for sharing /home or /tmp.

I've never heard of tmpfs, so I can't help you there.

Syntaxis
12-27-2002, 10:02 PM
Tmpfs is essentially a ramdisk that will resize itself or even swap out to disk as needed. It has to be enabled when you compile the kernel. It's one of the options that comes up under config (or menuconfig, or xconfig).

Once you've compiled it into the kernel, you mount it by adding a new line to your /etc/fstab (minus the quotes):

"tmpfs /dev/shm tmpfs defaults 0 0"

Once done, you no longer have to worry about a /tmp partition, merely a /tmp dir.

sajchurchey
12-28-2002, 01:18 AM
Originally posted by Syntaxis
Tmpfs is essentially a ramdisk that will resize itself or even swap out to disk as needed. It has to be enabled when you compile the kernel. It's one of the options that comes up under config (or menuconfig, or xconfig).

Once you've compiled it into the kernel, you mount it by adding a new line to your /etc/fstab (minus the quotes):

"tmpfs /dev/shm tmpfs defaults 0 0"

Once done, you no longer have to worry about a /tmp partition, merely a /tmp dir.

This is one heck of a newbie question here. What will i have to do w/ the kernel once I specifiy the tmpfs options? Will I have to recompile, and if so, how would I go about doing that?

Thanx a lot for ur help :-D

mdwatts
12-28-2002, 12:04 PM
If you really feel it necessary to use tmpfs, then yes you will need to recompile the kernel.

LNO has a couple of NHF's on compiling the kernel and you can find documentation on Redhat's site on the same subject.

slapNUT
12-28-2002, 08:03 PM
Actually you may not need to recompile the kernel. You can see if tmpfs is enabled like this:


cat /proc/filesystems
nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev tmpfs
nodev shm
nodev pipefs
ext2
nodev ramfs
nodev devfs
nodev devpts
reiserfs
nodev usbdevfs
nodev usbfs
vfat
qnx4
nodev supermount
udf
iso9660


If you don't have it then when you configure your kernel it's is in the "Filesystem support" and it is called:
Virtual memory filesystem support (former shm fs)