Unix Technical Forum

swap

This is a discussion on swap within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> I am currently confused on how Solaris is able to map the swap device to the swap mount point. ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-12-2008, 06:13 AM
newbie
 
Posts: n/a
Default swap


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 ?

.... or is it that you tell it what devices / slices you want to use for
swap, and Solaris will use whatever devices / slices are available for
swap when you use tmpfs ? In this case, where does Solaris store its
list of swap devices / slices ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-12-2008, 06:14 AM
Tony Walton
 
Posts: n/a
Default Re: swap

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:25 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com