vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 ? |
| ||||
| 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 |