Re: swap
From: Tony Walton (tony.walton_at_s-u-n.com)
Date: 07/29/03
- Next message: cljlk: "SunOS 4.1.4"
- Previous message: Paul Eggert: "Re: What's the Big Deal in Solaris Version Being Identified?"
- In reply to: newbie: "swap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jul 2003 10:07:32 +0100
newbie wrote:
>
> I am currently confused on how Solaris is able to map the swap device to
> the swap mount point.
>
> Of course, swap -a lets you specify that the device / slice is for swap.
>
> But in /etc/vfstab:
>
> swap - /tmp tmpfs - yes -
>
>
> You do not actually say that /tmp will use /dev/dsk/c0t0d0s1.
> Where is the mapping of /dev/dsk/c0t0d0s1 <----> /tmp stored ?
You've completely misunderstood the effect of that line. The line that
sets up your swap is
/dev/dsk/c0t0d0s1 - - swap - no -
or similar. A swapfile (as opposed to a partition) would read something
like:
/export/swap - - swap - no -
What tells the startup scripts that this partition or file is to be used
as swap is the word "swap" in field 4. The script
/etc/init.d/standardmounts calls /sbin/swapadd (also a script, take a
look and see what it does) to parse /etc/vfstab and add swap
files/partitions if they're tagged as "swap" in field 4 of vfstab.
What the line you quote
> swap - /tmp tmpfs - yes -
does is different, and has absolutely nothing at all to do with adding
swap. It says "mount /tmp as a tmpfs". This means that /tmp will be
mounted in such a way that it uses swap (or more precisely uses
available VM) rather than a physical partition. See the manpages for
tmpfs, mount_tmpfs(1m) and tmpfs(7fs) to see what tmpfs is all about.
HTH
-- Tony
- Next message: cljlk: "SunOS 4.1.4"
- Previous message: Paul Eggert: "Re: What's the Big Deal in Solaris Version Being Identified?"
- In reply to: newbie: "swap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|