![]() | ![]() |
Make sure you do not use the -n option to mkfile, since this causes the swap file to be incompletely allocated. If the client tries to find a swap block that should have been pre-allocated by mkfile, but doesn't exist, the client usually panics and reboots.wahoo# cd /export/swap wahoo# mkfile 64M honeymoon.tmp wahoo# ls -l honeymoon.tmp -rw------T 1 root root 67108864 Jan 9 00:38 honeymoon.tmp wahoo# share -o root=honeymoon /export/swap/honeymoon.tmp
What is interesting about this is that a regular file, and not a directory, is exported, and yet it is mounted on top of a directory mount point. Even more interesting is what happens when you do an ls -l on it:honeymoon# mkdir /tmp/swap.tmp honeymoon# mount wahoo:/export/swap/honeymoon.tmp /tmp/swap.tmp honeymoon# swap -a /tmp/swap.tmp
The /tmp/swap.tmp directory point has become a regular file after the mount.honeymoon# ls -l /tmp/swap.tmp -rw------T 1 root root 67108864 Jan 9 00:38 swap.tmp
honeymoon# swap -a /tmp/swap.tmp
honeymoon# swap -d /dev/swap
honeymoon# umount /dev/swap
wahoo# cd /export/swap wahoo# unshare /export/swap/honeymoon wahoo# rm /export/swap/honeymoon wahoo# mkfile 256M honeymoon wahoo# share -o root=honeymoon /export/swap/honeymoon
honeymoon# mount wahoo:/export/swap/honeymoon /dev/swap honeymoon# swap -a /dev/swap honeymoon# swap -d /tmp/swap.tmp honeymoon# umount /tmp/swap.tmp honeymoon# rmdir /tmp/swap.tmp
wahoo# unshare/export/swap/honeymoon wahoo# rm /export/swap/honeymoon
Note that the last bit in the world permission field of a swap file is T, indicating that "sticky-bit" access is set even though the file has no execute permissions. The mkfile utility sets these permissions by default. Enabling the sticky bit on a non-executable file has two effects:Shutdown client honeymoon wahoo# cd /export/swap wahoo# rm honeymoon wahoo# mkfile 256M honeymoon wahoo# shareall Boot client honeymoon
![]() | ![]() | ![]() |
8.3. Diskless client boot process | ![]() | 8.5. Changing a client's name |
Copyright © 2002 O'Reilly & Associates. All rights reserved.