Tuesday, November 18, 2008

Solaris ZFS and Containers: Overview

Tim Graves & Joost Pronk, Solaris Marketing
HOW to MANAGE SYSTEMS with
ZFS IN SOLARISTM CONTAINERS
> Solaris™ 10 How To Guides
Contents
Solaris ZFS and Containers: Overview Page 1
ZFS and Containers: An Example Page 2 > 8
Creating a zpool Page 2
Creating a Zone Page 2
Allocating a ZFS File System to a Zone Page 4
Creating New File Systems Page 5
Applying Quota to the File Systems Page 6
Changing the Mountpoint of a File System Page 6
Setting the Compression Property Page 7
Taking a Snapshot Page 8
Summary Page 8
For More Information Page 9
About This ZFS How To Guide
This guide is intended to show a new user the capabilities of ZFS when coupled with Solaris Containers. It describes
the assignment of a ZFS file system to a zone, and some of the ZFS administrative tasks possible in such a
configuration. Assigning a file system to a zone gives a zone administrator full delegated control of the ZFS file
system, enabling them to take snapshots, create sub file systems and perform other tasks without requiring the
global zone administrator's intervention.
After reading this guide, the user will have an understanding of how to delegate a ZFS file system to a container and
to manage it from within the container.
Contributors: Paul Steeves and Solaris ZFS Engineering team
Solaris ZFS and Containers: Overview
ZFS is a new file system from Sun provided in the Solaris 10
OS. It provides very high levels of data integrity and
performance, and improves the ease of file system
management by eliminating the need for a volume
manager. Also, because it is 128-bit based, it opens the
door to virtually unlimited data scalability.
Traditional file systems have a model of a single device or
volume for each file system. This makes administration
complex and potentially prone to administrative errors
which could result in the destruction of data or lack of
access to the data. ZFS uses a pooled storage model in
which storage capacity is held within an expandable pool
called a zpool. Multiple file systems can exist within a
zpool and they can share the capacity and IO resources of
the pool. This new architectural approach, the storage
version of virtual memory, permits easier administration of
file systems and enables performance breakthroughs.
Figure 1—ZFS automatically grows shared storage
Solaris Containers is Sun's operating system virtualization
technique. It consists of several technologies that work
together to foster improved resource management and
isolate the environment from the underlying OS. With
Solaris Containers, you can determine how to allocate
resources among applications and services, and ensure
they do not interfere with one another.
ZFS and Containers are tightly integrated to allow the zone
administrator delegated rights to control the ZFS file
systems. By using ZFS and Containers in combination you
can assign a portion of the storage pool to a container.
This means that the administrator for that container has
the authority to manage that portion of the storage pool,
but it is isolated from the rest of the system. (See the figure
below.) This lets you benefit from both the data integrity of
ZFS, as well as the high availability and resource control of
containers.
Figure 2—Containers let you isolate ZFS file systems
Note that while Containers technology has several aspects,
the example in this guide will focus solely on the zones
aspect.
ZFS How To Guide
1
Solaris 10 Operating System sun.com/solaris
scalable
STORAGE POOL
APPLICATION1 APPLICATION2 APPLICATION 3
ZFS
GLOBAL ZONE
NON-GLOBAL ZONE
ZFS Storage
Delegated
File
System
ZFS and Containers: An Example
This section is a step-by-step guide that shows how to perform certain ZFS file system tasks inside of Solaris Containers; for
example, taking snapshots and managing data compression. It does this by going through the following steps:
• Creating a zpool
• Creating a Zone
• Allocating a ZFS File System to a Zone
• Creating New File Systems
• Applying Quota to the File Systems
• Changing the Mountpoint of a File System
• Setting the Compression Property
• Taking a Snapshot
Each of these steps is described in detail below.
Creating a zpool
ZFS uses device names or partition names when dealing with pools and devices. For a device, this will be something like
c1t0d0 (for a SCSI device) or c1d1 (for an IDE device). For a partition, it will be something like c1t0d0s0 (for a SCSI device)
or c1d1s0 (for an IDE device). This example creates a pool that is mirrored using two disks.
1. To create a zpool in the global zone, use the zpool create command. Typically, you use two devices to provide
redundancy.
Note that the zpool create command may fail if the devices are in use or contain some types of existing data (e.g. UFS
file system). If they are in use, you will need to unmount them or otherwise stop using them. If they contain existing
data you can use the -f (force) flag to override the safety check, but be sure that you are not destroying any data you
want to retain.
2. Examine the pool properties using the zpool list command.
This shows you that there is one zpool, named mypool, with a capacity of 199GBytes.
Creating a Zone
To show ZFS working in an environment that is isolated from other applications on the system, you need to create a zone.
To create a zone:
1. Create a directory where the zone file system will reside, using the mkdir command. Be sure to chose a location where
the file system has at least 80MBytes of available space.
Note that in this example, for the sake of brevity, the root file system of the zone is a UFS file system.
Global# mkdir /zones
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
mypool 199G 164K 199G 0% ONLINE -
Global# zpool list
Global# zpool create mypool mirror c2t5d0 c2t6d0
Solaris 10 Operating System sun.com/solaris
2
3
Solaris 10 Operating System sun.com/solaris
2. Configure the zone (myzone), using the zonecfg command, and specify the location of the zone's files
(/zones/myzone). Use the following series of commands.
Again, for the purpose of streamlining, this example uses a very minimal zone. For more details on creating zones see
the Solaris Containers How To Do Stuff guide at:
www.sun.com/software/solaris/howtoguides/containersLowRes.jsp
3. Install the zone by using the zoneadm.
4. Boot the zone to complete the installation, using the zoneadm command.
5. Use the zlogin command to connect to the zone console.
It may take a short while for the first boot to configure everything, load all the service descriptors, and so on. You will
need to answer the system configuration details. Some suggestions are:
The zone will reboot after you have provided the configuration information.
6. Before you can proceed to the next stage, the configured zone needs to be shutdown (configuration changes are only
applied when the zone boots).
Global# zlogin myzone init 5
Terminal=(12)X Terminal Emulator (xterms)
Not Networked
No Kerberos
Name service = None
Time Zone = your-time-zone
root passwd = (Your choice – remember it though!)
Global# zlogin -C myzone
[Connected to zone 'myzone' console]
[Initial zone boot output, service descriptions are loaded etc.]
Global# zoneadm -z myzone boot
Global# zoneadm -z myzone install
Preparing to install zone
[Output from zoneadm, this may take a few mins]
Global# zonecfg -z myzone
myzone: No such zone configured
Use 'create' to begin configuring a new zone
zonecfg:myzone> create
zonecfg:myzone> set zonepath=/zones/myzone
zonecfg:myzone> verify
zonecfg:myzone> commit
zonecfg:myzone> exit
Allocating a ZFS File System to a Zone
Now that you have a zpool (mypool) and a zone (myzone) you are ready to allocate a ZFS file system to the zone.
1. To create a ZFS file system, use the zfs create command.
2. To apply a quota to the file system, use the zfs set quota command.
The file system and all of its child file systems can be no larger than the designated quota. Note that both these steps
must be performed in the global zone. Also notice that creating the file system in ZFS is much simpler than with a
traditional file system/volume manager combination.
To illustrate the isolation/security properties of containers with ZFS this example now creates a ZFS file system that will
remain outside the container. There is no need to apply a quota to this outside file system.
3. To create this other file system, again use the zfs create command.
4. To show the properties of all the pool and the file systems, use the ZFS list command.
To make the file system (myzonefs) available in the zone (myzone), the zone configuration needs to be updated.
5. To update the zone configuration, use the zonecfg command.
The mypool/myzonefs file system is now added to the zone configuration. Note that these steps must be performed with
the zone shut down, otherwise the zone configuration changes would not be visible until the next reboot. To check that
the zone is shut down try logging into it using zlogin myzone. If the zone is shut down the login will fail; if the zone is
running you will see a login prompt—login as root and shut the zone down with init 5. These steps are performed in the
global zone.
Global# zonecfg -z myzone
zonecfg:myzone> add dataset
zonecfg:myzone:dataset> set name=mypool/myzonefs
zonecfg:myzone:dataset> end
zonecfg:myzone> commit
zonecfg:myzone> exit
NAME USED AVAIL REFER MOUNTPOINT
mypool 396G 197G 99.5K /mypool
mypool/myfs 98.5K 197G 98.5K /mypool/myfs
mypool/myzonefs 98.5K 5G 98.5K /mypool/myzonefs
Global# zfs list
Global# zfs create mypool/myfs
Global# zfs set quota=5G mypool/myzonefs
Global# zfs create mypool/myzonefs
Solaris 10 Operating System sun.com/solaris
4
6. Now boot the zone.
7. Log in to the zone. (Leave a few seconds for the zone to boot.)
8. List the ZFS file systems in the zone.
Note the 5GByte maximum available from the external quota and that the other file systems in the pool
(mypool/myfs) are not visible. This demonstrates the isolation property that Containers provide.
Creating New File Systems
Administering ZFS file systems from the non-global zone is done just like it is in the global zone, although you are limited
to operating within the file system that is allocated to the zone (mypool/myzonefs). New ZFS file systems are always
created as a child of this file system because this is the only ZFS file system the non-global zone can see. The administrator
in the non-global zone can create these file systems. There is no need to involve administrator of the global zone, though
the administer could do so if it were necessary.
1. To create a new file system, use the zfs create command.
The non-global zone administrator can create as many child file systems as s/he wants and each child file system can have
its own file systems, and in that way form a hierarchy.
As a demonstration that the non-global zone administrator is limited to the assigned file systems, this example
demonstrates trying to break security by creating a file system outside the container's "space".
2. Try to create another file system outside of mypool/myzonefs, using the zfs create command.
As you can see, ZFS and zones security denies permission for the non-global zone to access resources it has not been
allocated and the operation fails.
MyZone# zfs create mypool/myzonefs1
cannot create 'mypool/myzonefs1': permission denied
NAME USED AVAIL REFER MOUNTPOINT
mypool 504M 197G 99K /mypool
mypool/myzonefs 197K 5.00G 98.5K /mypool/myzonefs
mypool/myzonefs/tim 98.5K 5.00G 98.5K /mypool/myzonefs/tim
MyZone# zfs create mypool/myzonefs/tim
MyZone# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 0M 200B - /mypool
mypool/myzonefs 8K 5G 8K /mypool/myzonefs
Global# zlogin -C myzone
[Connected to zone 'myzone' pts/3]
[Usual Solaris login sequence]
Global# zoneadm -z myzone boot
5
Solaris 10 Operating System sun.com/solaris
Applying Quota to the File Systems
Typically, to prevent the user consuming all of the space, a non-global zone administrator will want to apply a quota to the
new file system. Of course, the child's quota can't be more than 5GByte as that's the quota specified by the global zone
administrator to all of the file systems below mypool/myzonefs.
1. To set a quota on our new file system, use the zfs set quota command.
The administrator of the non-global zone has set the quota of the child file system to be 1G. They have full authority to do
this because they are operating on their delegated resources and do not need to involve the global zone administrator.
The ZFS property inheritance mechanism applies across zone boundaries, so the non-global zone administrator can specify
his/her own property values should s/he wish to do so. As with normal ZFS property inheritance, these override inherited
values.
Changing the Mountpoint of a File System
Now that the file system is set up and has the correct quota assigned to it, it is ready for use. However, the place where
the file system appears (the mountpoint) is partially dictated by what the global zone administrator initially chose as the
pool name (in this example, mypool/myzonefs). But typically, a non-global zone administrator would want to change it.
1. To change the mountpoint, use the zfs set mountpoint command.
Note that the mountpoint can be changed for any file system independently.
NAME USED AVAIL REFER MOUNTPOINT
mypool 508M 197G 99K /mypool
mypool/myzonefs 198k 5.00G 99K /mypool/myzonefs
mypool/myzonefs/tim 98.5K 1024M 98.5K /export/home/tim
MyZone# zfs set mountpoint=/export/home/tim mypool/myzonefs/tim
MyZone# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 508M 197G 99K /mypool
mypool/myzonefs 198k 5.00G 99K /mypool/myzonefs
mypool/myzonefs/tim 98.5K 1024M 98.5K /mypool/myzonefs/tim
MyZone# zfs set quota=1G mypool/myzonefs/tim
MyZone# zfs list
Solaris 10 Operating System sun.com/solaris
6
Setting the Compression Property
The next example demonstrates the compression property. If compression is enabled, ZFS will transparently compress all of
the data before it is written to disk.
The benefits of compression are both saved disk space and possible write speed improvements.
1. To see what the current compression setting is, use the zfs get command.
Be aware that the compression property on the pool is inherited by the file system and child file system. So if the nonglobal
zone administrator sets the compression property for the delegated file system, it will set it for everything below, as
well.
2. To set the compression for the file system, use the zfs set command.
3. Examine the compression property again in the non-global zone.
Note the compression property has been inherited by mypool/myzonefs/tim as with normal ZFS administration.
NAME PROPERTY VALUE SOURCE
mypool compression off default
mypool/myzonefs compression on local
mypool/myzonefs/tim compression on Inherited from
mypool/myzonefs
MyZone# zfs get compression mypool mypool/myzonefs mypool/myzonefs/tim
MyZone# zfs set compression=on mypool/myzonefs
NAME PROPERTY VALUE SOURCE
mypool compression off default
mypool/myzonefs compression off default
mypool/myzonefs/tim compression off default
MyZone# zfs get compression mypool mypool/myzonefs mypool/myzonefs/tim
7
Solaris 10 Operating System sun.com/solaris
Taking a Snapshot
One of the major advantages of ZFS is the ability to create an instant snapshot of any file system. By delegating a file
system to a non-global zone this feature becomes available as an option for the non-global zone administrator.
1. To take a snapshot named “1st “ of the file system, use the zfs snapshot command.
As with ZFS file systems in the global zone, this snapshot is now accessible from the root of the file system in
.zfs/snapshot/1st.
Summary
Once a zone has been created and a ZFS file system has been allocated to it, the administrator for that (non-global) zone
can create file systems, take snapshots, create clones, and perform all the other functions of an administrator—within that
zone. Yet the global zone, and any other zones, are fully isolated from whatever happens in that zone.
The integration of Solaris Containers and Solaris ZFS is just another way that the Solaris 10 OS is providing cost benefits to
customers by allowing them to safely consolidate applications and more easily manage the data those applications use.
NAME USED AVAIL REFER MOUNTPOINT
mypool 512K 197G 99K /mypool
mypool/myzonefs 198K 5.00G 99K /mypool/myzonefs
mypool/myzonefs@1st 0K - 99K -
mypool/myzonefs/tim 98.5K 1024M 98.5K /export/home/tim
MyZone# zfs snapshot mypool/myzonefs@1st
MyZone# zfs list
Solaris 10 Operating System sun.com/solaris
8
For More information
While this Solaris How To Guide provides the rudimentary steps needed to get Solaris Container technology and the Solaris
ZFS file system working in collaboration with each other, more sophisticated configurations are possible. For more
information regarding Solaris Containers and Solaris ZFS, visit sun.com/solaris.
9
Solaris 10 Operating System sun.com/solaris
Manuals
Frequently Asked Questions (FAQ)
Web-Based Training
Solaris ZFS Administration Guide
ZFS FAQ
Additional Q&A
sun.com/solaris/zfs/faq
opensolaris.org/os/community/zfs/faq
Solaris ZFS Learning Center
(Including video presentations and demos)
Solaris Containers Learning Center
Solaris Containers How to Guide
sun.com/solaris/zfs
sun.com/solaris/containers
sun.com/solaris/howtoguides/containers
opensolaris.org/os/community/zfs/docs/zfsadmin_0417.pdf
Community Resources
OpenSolaris ZFS Community
Sun ZFS Blogs
opensolaris.org/os/community/zfs
opensolaris.org/os/community/zfs/blogs
sun.com/solaris
©2005 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 USA Phone 1-650-960-1300 or 1-800-555-9SUN Web sun.com

Solaris Security or Unix Security?

1
1
Solaris Security: Step-by-Step
Hal Pomeranz
Deer Run Associates
All material in this course Copyright © Hal Pomeranz and Deer Run Associates,
2002. All rights reserved.
Hal Pomeranz * Founder/CEO * hal@deer-run.com
Deer Run Associates * PO Box 20370 * Oakland, CA 94620-0370
+1 510-339-7740 (voice) * +1 510-339-3941 (fax)
http://www.deer-run.com/
2
Solaris Security: Step-by-Step 2
Solaris Security or Unix Security?
• For this talk, we'll be using Solaris syntax
• However, the same steps can (and should)
be applied to any Unix-like OS
• Pointers to specific instructions for many
different OS types at the end of the course
While this talk will be looking primarily at the Solaris operating system, the 10
basic steps we'll be covering can be applied to any Unix-like operating system. The
trick is finding out the correct syntax for each vendor's operating system. At the
end of the talk, there are two pages of URLs which point to various Internet sites
that either have automated tools for hardening systems, or white papers and other
documentation on system hardening.
3
Solaris Security: Step-by-Step 3
Step 1: Minimize OS Image
• Choose the smallest OS install cluster
that's appropriate for your application
– Less that can go wrong (security & reliability)
– Less disk space consumed, faster reboots
• For Internet servers, use Core System
Support cluster
• Even smaller, customized package sets
can be used
The first step is to pick the smallest operating system image you can get away with
for your application. Extra features like Windowing systems and GUI-based
management tools, volume managers, etc. are convenient but can provide extra
avenues for attackers to break into your systems. We want to tend towards the
"security" end of the "security vs. ease-of-use" spectrum.
Internet servers– like Web servers, FTP servers, firewall devices, etc.– really only
need a bare minimum OS install. For Solaris, this is the Core System Support
cluster (SUNWCreq). This image does not include the Windowing system,
programming tools (/usr/ccs/bin, header files in /usr/include, etc.), or
even the system manual pages. You may want to customize the package list further
for your particular application. Sun has published a white paper on further
minimizing the Solaris operating system as part of their Blueprints™ series (URL at
the end of the talk).
One of the advantages to this kind of stripped-down OS install is size. The full
Solaris install requires at least a gigabyte of space just for the OS files themselves
(not counting swap space, space for logging, user and application data, etc). The
Core cluster can fit in a couple of hundred megabytes. Also, with less installed on
the system, there's less that can go wrong to cause the system to crash or lock up,
and rebooting or restarting the system happens much faster.
4
Solaris Security: Step-by-Step 4
Step 2: Apply Patches
• At least download and install Sun's
"Recommended Patch Cluster"
• Also check Patch Report file for additional
security patches
• Patches must be maintained on an
ongoing basis!
Once you've decided exactly which pieces of the operating system you wish to
install, download and install the Recommended Patch Cluster for your OS version.
It's important that you install all of the OS packages that you'll need before you
apply patches. If you install OS software after your patch install, you may end up
with unpatched software that has security issues.
Patches can be found at ftp://sunsolve.sun.com/pub/patches: the
cluster files are named _Recommended.zip (or .tar.Z for Solaris 2.6
and earlier). Note that not all security patches are necessarily included in the
recommended patch set, so you'll also want to check out the
Solaris.PatchReport files in the same directory.
New patches are coming out all the time, so figure out some mechanism for keeping
your machines up-to-date. If you're running a big farm of identical Internet servers,
you may just want to rebuild your machines in rotation (a few at a time) and install
up-to-date patches at that point.
5
Solaris Security: Step-by-Step 5
Step 3: Minimize Boot Services
• Disable everything not absolutely needed
• Big offenders:
– NFS, NIS, and other RPC-based services
– Sendmail, httpd, and other Internet servers
– SNMP, printer daemons, GUI logins, etc.
• Also remove related configuration files to
make system easier to audit
Patches cover security vulnerabilities that we're aware of, but new exploits are
being discovered every day. The best way to protect yourself from problems that
we don't know about yet is to turn off all of the services that you're not using.
There's an unbeatable smug feeling of satisfaction you get reading the latest
BUGTRAQ posting a knowing that you're not vulnerable because you elected not to
run a given service in the first place.
The basic principal here is:
If you don't need it, turn it off.
If you're not sure whether you need it or not, turn it off and see what breaks!
Prior to the distributed denial-of-service attacks in early Y2K, thousands of
Internet-connected machines were compromised via the well-known
rpc.ttdbserverd and rpc.cmsd holes. These machines later became the
"zombie" or "daemon" servers used in the attacks. You have to wonder why Web
servers need to be running Sun's calendar manager daemon– the answer being, of
course, that they don't!
Certain utilities are fine inside of a strongly firewalled environment– NFS, NIS,
print daemons, GUIs, etc.– but should never be used on machines that are
essentially connected directly to the Internet (Web servers, mail relays, etc.). Given
the rash of SNMP vulnerabilities in the last few months, definitely disable the
Solaris SNMP daemon if you're not currently using SNMP for network
management. Also, unless your system is a mail server, turn off the Sendmail
daemon or at least don't listen for incoming mail on port 25 (disable the –bd
switch).
6
Solaris Security: Step-by-Step 6
Step 4: Disable inetd Services
• Remote admin requires login shell access
and file transfer– SSH does both securely
• Consider running SSH and turning off
inetd completely
• If you must run inetd:
– Remove unused entries from inetd.conf
– Use TCP Wrappers on remaining entries
– Use inetd –t for extra logging
In addition to the other services started at boot time, inetd will start up a number
of other network-related services on demand. Everything that is run out of inetd
has probably had at least one security vulnerability reported against it in recent
memory. inetd enables clear-text login and file transfer protocols (like telnet,
FTP, and rlogin/rcp) which can be sniffed, spoofed, and hijacked. Other
services (like echo, chargen, etc.) can be used as denial-of-service attacks.
From a networking perspective, all you really need is the ability to administer your
systems remotely (and perhaps not even that if you're willing to do all your work at
the system console). This means you need the ability to log into the system over the
network and transfer files back and forth. SSH provides both of these services (and
more) and is encrypted to prevent eavesdropping and hijacking. It may be that all
you need is SSH– in which case you can turn off inetd completely.
If you must run inetd for some reason, make sure to eliminate all services that are
not absolutely required and use TCP Wrappers to protect the rest. Solaris also
supports "connection tracing" in inetd (start inetd with the –t flag) which
provides additional logging about each connection.
7
Solaris Security: Step-by-Step 7
Step 5: Tweak Kernel
Network configuration:
– Disable IP forwarding, drop source routed
– Protect against SYN floods, Smurf attacks
– Drop ICMP redirects, reduce ARP timeouts
– Help stop remote network mapping efforts
Other kernel parameters:
– Enable stack protection
– Prevent core dumps
– Set limits on processes
There are a number of parameters in the Solaris kernel which can be tweaked to enhance security. Network
parameters are generally set using the ndd command (you'll need to add a script to your boot directories
which sets these parameters automatically), and other parameters can be set in /etc/system.
On the network side of things, Solaris systems by default have IP forwarding enabled (the system will act as
a router if it has multiple network interfaces) and source routed packets will be accepted. Neither of these
is a good idea. The default Solaris ARP timeout (20 minutes) makes ARP spoofing attacks much easier, so
tuning this value down can help. Increasing the values for number of half-open connections and reducing
the half-open connection timeout can help your system handle SYN flood type attacks more easily.
Disabling various types of ICMP messages can help you prevent attackers from mapping your networks
remotely, and even prevent your systems from being used as an amplifier network for a Smurf-style attack.
Similarly, you can prevent the machine from obeying ICMP redirects (which could be used to maliciously
change your routing table on the fly).
You should definitely add the following two lines to your /etc/system file:
set noexec_user_stack = 1
set noexec_user_stack_log = 1
This turns on "stack protection" (available for Solaris 2.6 and later only) which will help protect you from
many buffer overflow attacks. You may also want to disable core dumps in /etc/system on your
production servers (core dumps are world-readable and can contain sensitive information), but remember
that your developers will probably want the ability to get core files on their development workstations.
/etc/system can also allow you to set other limits (like the maximum number of processes per user,
etc.) that can help prevent local denial-of-service attacks.
8
Solaris Security: Step-by-Step 8
Step 6: Increase Logging
• Definitely tweak syslog.conf to capture
auth.info and daemon.notice msgs
• Create /var/adm/loginlog
• Additional levels of logging:
– System accounting (sar and friends)
– Process accounting
– Kernel level auditing (BSM)
The more information you log about your systems, the more likely you are to log something which
enables you to detect an attacker. Think about Cliff Stoll noticing an intruder on his system
because of a 75 cent accounting discrepancy (read The Cuckoo's Egg for more information).
At a minimum, tweak your syslog.conf file so that you at least log auth.info (and higher)
to a local log file and/or to some other machine. By default Solaris throws messages sent to
LOG_AUTH away, which is unfortunate since this is where all of the interesting security
information about the system goes. If you're using inetd connection tracing (inetd –t), then
you also need to log daemon.notice in order to get the connection logs from inetd.
If you create /var/adm/loginlog, then bad login messages will be logged to this file (and to
LOG_AUTH). Starting with Solaris 8, you can also set SYSLOG_FAILED_LOGINS in
/etc/default/login to control how many failed logins must occur before a message is
logged. If set to zero, then all failed logins are logged (hint: this is what you want).
There are several other options beyond these sorts of standard logging facilities. System accounting
keeps track of system usage information (CPU load, memory usage, disk usage, etc.)– by defining a
baseline for your system's performance, you can detect unexpected or illicit usage by detecting
departures from the baseline. Process accounting keeps track of which commands users are running
on your system, but can be a performance drag on the machine. Kernel level auditing (aka BSM)
keeps track of even more information, but generates huge audit logs and can also be a performance
drag.
9
Solaris Security: Step-by-Step 9
Step 7: Protect File Systems
• File systems should either be mounted
"nosuid" or "ro" (read-only)
• Set "logging" option on root file system
if you're running Solaris 8 or later
• Don't forget removable media devices:
– Turn off vold if possible
– Make sure rmmount.conf sets "nosuid"
From a file system perspective, you want to make it harder for attackers to replace OS programs with
their rootkits and other tools. You also want to prevent people from bringing unauthorized set-UID
binaries on your system. The simplest bit of wisdom here is the basic rule:
File systems should either be mounted "nosuid" or "ro".
In particular, the /usr file system contains all of the critical OS programs and set-UID binaries but is
relatively static, so you should mount /usr "ro" (read-only). When you need to install patches, you
can make the file system read-write again with the command "mount –o remount,rw /usr", but
you'll need to reboot the system to make it read-only again. You may be able to mount /opt,
/usr/local, and other file systems containing third-party software tools "ro" as well.
All other file systems should be mounted "nosuid". Unfortunately, Sun has decided that setting
"nosuid" also implies "nodev" (device files don't work), which means you can't mount the root file
system (which contains /devices) "nosuid"– and you can't make it read-only either. You also need
to be careful about the whole "nosuid"/"nodev" thing on file systems where you're running
chroot()ed daemons (FTP servers, BIND, etc.) since the "nosuid" will interfere with the device
files required in your chroot() directory structure.
Removable media is a great way for attackers to compromise your systems if they have physical access–
just bring in a CD-ROM with a set-UID copy of the shell on it. If your users don't need the ability to
mount CDs and floppies, turn off the system volume manager (you can use sudo to give your users this
ability without having to run the volume manager). Also, be sure to set the "nosuid" option for all
removable media devices in the volume manager configuration file, /etc/rmmount.conf (this is the
default for Solaris 8 and later).
10
Solaris Security: Step-by-Step 10
Step 8: Set Warning Banners
Authorized uses only.
All activity may be monitored and reported.
• Places to set warning banners:
– /etc/motd and /etc/issue
– /etc/default/{telnetd,ftpd}
– EEPROM
– GUI Login
While the legal precedents for various system warning messages are unclear, security experts
generally believe it's a good idea to inform users (authorized and otherwise) that the system is for
authorized users/uses only and that all activity may be monitored and the results of that monitoring
reported to the appropriate authorities as necessary. This message should definitely appear in the
/etc/motd file (displayed after login). Ideally, though, you'd like to present the message before
login. However, there are lots of different places you'll need to set the message because logins can
occur over a variety of channels including the standard system login (put message in
/etc/issue), telnet and FTP (use the BANNER variable in
/etc/default/{telnetd,ftpd}), and GUI logins
(/etc/dt/config/*/Xresources).
Here's a longer warning banner that was developed by the US Department of Justice:
This system is for the use of authorized users only. Individuals using this computer system
without authority, or in excess of their authority, are subject to having all of their activities on
this system monitored and recorded by system personnel.
In the course of monitoring individuals improperly using this system, or in the course of system
maintenance, the activities of authorized users may also be monitored.
Anyone using this system expressly consents to such monitoring and is advised that if such
monitoring reveals possible evidence of criminal activity, system personnel may provide the
evidence of such monitoring to law enforcement officials.
11
Solaris Security: Step-by-Step 11
Step 9: Tighten Access Control
• Root logins only on system console
• Disable or remove unused accounts
• Create /etc/ftpusers
• Disable .rhosts support
• Restrict cron/at access
• Set EEPROM security-mode
• Restrict XDMCP, set locking screen saver
• Make sure that CONSOLE=/dev/console is set in /etc/default/login so that root logins are
only allowed on the system console device. Normally users should be forced to log in and then su to
become root.
• Audit your password file and remove accounts that are not being used (like the uucp, nuucp, and smtp
users). All other "system" accounts (like adm, daemon, bin, etc.) should have their shells set to
/dev/null to block access.
• Create an /etc/ftpusers file (even if you don't have FTP enabled). Remember that
/etc/ftpusers is the list of users who are not allowed to FTP into the system– root belongs here, as do
all of the "system" accounts from /etc/password.
• If you're using SSH, then make sure your sshd_config file does not allow .rhosts functionality
("IgnoreRhosts yes", etc.). Also edit /etc/pam_conf and remove any lines containing
rhosts_auth, even if you've disabled rlogin/rcp.
• cron.allow and at.allow list the users who are allowed to run the crontab and at commands to
submit/modify/delete cron jobs. On production systems, it is often the case that only the root user needs
this functionality. Note that cron jobs will run as other users even if root is the only user listed in
cron.allow.
• Setting "eeprom security-mode=command" will cause the machine to prompt for a password
before boot-level commands are accepted. This prevents attackers with physical access from booting from
alternate media (like a CD-ROM) and bypassing your system security.
• If you're running X Windows on the machine, make sure to disable remote XDMCP access in
/etc/dt/config/Xaccess. You may also want to set a default locking screensaver timeout for your
users in /etc/dt/config/*/sys.resources.
12
Solaris Security: Step-by-Step 12
Step 10: Install Security Tools
Bare minimum required tools:
– SSH
– TCP Wrappers
– NTP
– fix-modes
Extra credit:
– Tripwire, AIDE, etc.
– Logsentry (formerly Logcheck) or Swatch
– Host-based firewall, Portsentry, etc.
It's pretty much impossible to completely secure a Solaris machine without adding some
freely-available security software from the Internet. fix-modes sets appropriate
permissions on various OS files and directories (get fix-modes from
ftp://ftp.science.uva.nl/pub/solaris/). SSH and TCP Wrappers are
critical for network security. NTP (the Network Time Protocol for keeping system
clocks in synch) doesn't necessarily seem like security software, but how are you
planning on investigating security incidents at your site if the time on your hosts doesn't
agree with the time on your routers, firewalls, and intrusion detection systems? SSH
and TCP Wrappers are bundled with the OS starting with Solaris 9. NTP has been
available in the Solaris OS since Solaris 2.6.
Beyond these tools, there are many other useful security tools out there. Tripwire,
AIDE, et al are all integrity checking tools which will tell you when files on your
machine have been modified (like after a successful break-in). Logsentry (formerly
Logcheck) and Swatch are tools which will automatically monitor your log files and
report "interesting" events to the administrator. You can also deploy host-based
firewalls (IPFilter is the free tool for Solaris and other Unix systems, but Sun making
their SunScreen product available for free as of Solaris 8) and monitoring tools like
Portsentry.
www.sunfreeware.com provides pre-compiled binaries for many of these tools in
Solaris pkgadd format.
13
Solaris Security: Step-by-Step 13
Looking Ahead to Solaris 9
• SSH and TCP Wrappers bundled in
• Sendmail upgraded to 8.12.x
• X server now supports –nolisten option
• Bundled log rotation service (logadm)
• Kernel /dev/random device
• Disk Suite (now "Solaris Volume Mgr ")
• UFS snapshots feature (fssnap)
Solaris 9 is now available and includes many, many useful new features (for more
detail, check out http://docs.sun.com/?p=/doc/806-5202/):
• Solaris 9 now ships with SSH and TCP Wrappers (as well as many other "Open
Source" tools like bash, zsh, GNU grep, GNU tar, etc).
• Solaris 9 ships with Sendmail 8.12.x by default. This is significant because it means
that /usr/lib/sendmail is no longer set-UID to root.
• The X server that ships with Solaris 9 now has a –nolisten option that enables
the admin or user to prevent their X server for listening for X events over the network.
Since local clients are still OK, users can still tunnel remote X events via SSH.
• Solaris 9 finally includes a generic log rotation/archiving tool called logadm. This
means you don't have to worry about /var/log/authlog et al growing without
bound and consuming /var.
• Solaris 9 finally includes a kernel /dev/random device for SSH, SSL, etc.
• Lot's of features have been added to the file system. Most interestingly, Solaris' UFS
file system now supports "snapshots"– temporary, copy-on-write style, static read-only
copies of the file system for easy backups, etc (Network Appliance users will be
familiar with this concept). An updated version of Sun's Disk Suite product (now
called the Solaris Volume Manager) is also bundled into the OS.
14
Solaris Security: Step-by-Step 14
Automated Hardening Tools
• JASS
http://www.sun.com/blueprints/tools/
• TITAN (Solaris and Linux)
http://www.fish.com/titan/
• YASSP
http://www.yassp.org/
• Hal's "configurator"
http://www.deer-run.com/~hal/jumpstart/
• Bastille (Linux and HP-UX)
http://www.bastille-linux.org/
The first four tools listed here are all automated tools for hardening Solaris systems
in similar ways to the material I've covered in this talk. Bastille does a similar job
for Linux systems (and for HP-UX as of the most recent beta release). TITAN now
supports both Solaris and Linux systems. YASSP development may be "dead in the
water" because the author of the tool no longer has time to maintain it.
My own home page (http://www.deer-run.com/~hal/) has a bunch of
other security-related information and useful tricks.
15
Solaris Security: Step-by-Step 15
Other Hardening Procedures
• Solaris, HP-UX, RedHat/Mandrake, IOS, Windows:
http://www.CISecurity.org/
• Solaris, RedHat/Mandrake, BIND, Apache:
http://www.boran.com/security/sp/
• Solaris, HP-UX, Tru64, Windows NT:
http://www.sabernet.net/papers/
• Sun Blueprints™ On-Line
http://www.sun.com/blueprints/browsesubject.html
Here are some additional URLs which point to hardening guidelines for a variety of
operating systems and applications.
In addition to free guidelines for various operating systems, the Center for Internet
Security is also providing free auditing tools to test your systems for compliance.
Unlike the automated "hardening" tools on the previous slide, the Center's tools are
strictly "read-only" and don't change any settings on the machine.
Sun's Blueprints™ series has contains lots of interesting documents. In particular
there are several documents by Alex Noordergraaf and others on topics ranging
from OS minimization, to network security settings in the kernel, to the JASS
toolkit.
16
Solaris Security: Step-by-Step 16
That's It!
• Thanks for listening!
• Any final questions?
This space intentionally left blank.

Solaris™ 10 Zones

A sneak preview into a feature of the block buster Operating System of Sun Microsystems Inc.
Solaris™ 10 Zones
Document Stage Name Date
Created R Rajesh 11/December/2005
Updated
Approved Gary Riseborough 23/December/2005
Delivered
Change Log
The following is a script that was run on Solaris™ 10 Operating System to
create a zone by name apple-store. The exercise mentioned in this document
was conducted during the Sun courses on New Features of Solaris™ 10
Operating System delivered by Mr. Gary Riseborough (Employee of Sun
Microsystems Inc., Sydney, Australia). Author of this journal has included the
errors that were encountered, during the zone creation process, as well. Some
part of the output are omitted/modified for brevity. This is a simple zone
creation process. For insight into the complex zone creation process, please
visit the following web-location:
http://www.brendangregg.com/zones.html
[Brendan Gregg is an Instructor for Sun in Australia]
Author: R Rajesh 1
Caution: Due care has been taken to make this
document error-free. But the fact that the
contents of this document is copied from a text
file produced as a result of the “script -a”
command run on a Solaris box and that several
modifications had to be done on the same for
proper presentation makes it a candidate for
potential typographical errors. Kindly report the
errors spotted to the author at info@rajeshr.net
A sneak preview into a feature of the block buster Operating System of Sun Microsystems Inc.
Script started on Mon Nov 07 19:02:16 2005
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 5063150 3096633 1915886 62% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /
system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 703864 968 702896 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
fd 0 0 0 0% /dev/fd
swap 702944 48 702896 1% /tmp
swap 702944 48 702896 1% /var/run
/dev/dsk/c0t0d0s7 14027418 13937 13873207 1% /export/home
# mkdir /export/home/zones
# zonecfg -z apple-store
apple-store: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:apple-store> create
zonecfg:apple-store> set autoboot=true
zonecfg:apple-store> set zonepath=/export/home/zones/apple-store
zonecfg:apple-store> add net
zonecfg:apple-store:net> #### You need to set 2 variables for this:
zonecfg:apple-store:net> set physical=hme0
zonecfg:apple-store:net> set address=192.168.1.45.216
zonecfg:apple-store:net> end
zonecfg:apple-store> ### All this what have dones is in the memory
zonecfg:apple-store> verify
zonecfg:apple-store> commit
zonecfg:apple-store> exit
# #### Zone creation completed
# cd /etc/zones
# ls
SUNWblank.xml SUNWdefault.xml apple-store.xml index
# #### The file "apple-store.xml" is a newly created file
# more apple-store.xml

"file:///usr/shar
e/lib/xml/dtd/zonecfg.dtd.1">

autoboot="tru
e">



Author: R Rajesh 2
A sneak preview into a feature of the block buster Operating System of Sun Microsystems Inc.



# ### lib, platform, sbin, usr are the directories that are shared
# ifconfig -a
lo0: flags=2001000849 mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500
index 2
inet 192.168.1.216 netmask ffffff00 broadcast 192.168.1.255
ether 0:3:ba:10:2d:a7
# zoneadm -z apple-store install
could not verify net address=192.168.1.45.216 physical=hme0: Neither
an IPv4 nor an IPv6 address nor a host name
zoneadm: zone apple-store failed to verify
# ls
SUNWblank.xml SUNWdefault.xml apple-store.xml index
# vi apple-store.xml

"file:///usr/shar
e/lib/xml/dtd/zonecfg.dtd.1">

autoboot="true">






"apple-store.xml" 12 lines, 525 characters#
wq!"apple-store.xml" 12 lines, 523 characters
## zoneadm -z t apple-store install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2578> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <914> packages on the zone.
Initializing package <0> of <914>: percent complete: 0%
Initializing package <1> of <914>: percent complete: 0%
Initializing package <2> of <914>: percent complete: 0%
Initializing package <3> of <914>: percent complete: 0%
Initializing package <4> of <914>: percent complete: 0%
Initializing package <5> of <914>: percent complete: 0%
Initializing package <6> of <914>: percent complete: 0%
Initializing package <7> of <914>: percent complete: 0%
Initializing package <8> of <914>: percent complete: 0%
Author: R Rajesh 3
A sneak preview into a feature of the block buster Operating System of Sun Microsystems Inc.
Initializing package <9> of <914>: percent complete: 0%
Initializing package <10> of <914>: percent complete: 1%
<------------------ Output Truncated for Brevity------------->
Initializing package <912> of <914>: percent complete: 99%
Initializing package <913> of <914>: percent complete: 99%
Initialized <914> packages on zone.
Zone is initialized.
The file root/var/sadm/system/logs/install_log> contains a log of the
zone installation.
# #### I had made a mistake while creating zones (IP address that I
gave was invalid). I edited the file, the one that is found in the /
etc/zones and changed the IP address and it worked fine.
# ifconfig -a
lo0: flags=2001000849 mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000803 mtu 1500 index 2
inet 192.168.1.216 netmask ffffff00 broadcast 192.168.1.255
ether 0:3:ba:10:2d:a7
# cd /export/home
# ls
lost+found zones
# cd zones
# ls
apple-store
# cd apple-store
# ls
root
# cd root
# ls
bin etc home mnt platform sbin tmp
var
dev export lib opt proc system usr
# zoneadm -list -cv
ID NAME STATUS PATH
0 global running /
- apple-store installed /export/home/zones/apple-store
# zoneadm -z apple-store boot
zoneadm: zone 'apple-store': "/usr/lib/fs/lofs/mount -o
ro,nosub,nodevices /sbin /export/home/zones/apple-store/root/sbin"
failed with exit code 33
zoneadm: zone 'apple-store': failed to loopback mount /sbin: Error 0
zoneadm: zone 'apple-store': call to zoneadmd failed
# zoneadm -z apple-store boot
zoneadm: zone 'apple-store': "/usr/lib/fs/lofs/mount -o
ro,nosub,nodevices /sbin /export/home/zones/apple-store/root/sbin"
failed with exit code 33
zoneadm: zone 'apple-store': failed to loopback mount /sbin: Error 0
zoneadm: zone 'apple-store': call to zoneadmd failed
#
### The booting process was failing on zone apple-store
Author: R Rajesh 4
A sneak preview into a feature of the block buster Operating System of Sun Microsystems Inc.
### Under the instruction from Gary I uninstalled it
#
# zoneadm -z apple-store uninstall
Are you sure you want to uninstall zone apple-store (y/[n])? y
#
### Reinstalling the zone
#
# zoneadm -z apple-store install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2578> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <914> packages on the zone.
Initializing package <0> of <914>: percent complete: 0%
Initializing package <1> of <914>: percent complete: 0%
Initializing package <2> of <914>: percent complete: 0%
Initializing package <3> of <914>: percent complete: 0%
Initializing package <4> of <914>: percent complete: 0%
Initializing package <5> of <914>: percent complete: 0%
Initializing package <6> of <914>: percent complete: 0%
Initializing package <7> of <914>: percent complete: 0%
Initializing package <8> of <914>: percent complete: 0%
Initializing package <9> of <914>: percent complete: 0%
Initializing package <10> of <914>: percent complete: 1%
Initializing package <11> of <914>: percent complete: 1%
Initializing package <12> of <914>: percent complete: 1%
Initializing package <13> of <914>: percent complete: 1%
Initializing package <14> of <914>: percent complete: 1%
Initializing package <15> of <914>: percent complete: 1%
Initializing package <16> of <914>: percent complete: 1%
Initializing package <17> of <914>: percent complete: 1%
Initializing package <18> of <914>: percent complete: 1%
Initializing package <19> of <914>: percent complete: 2%
Initializing package <20> of <914>: percent complete: 2%
Initializing package <21> of <914>: percent complete: 2%
Initializing package <22> of <914>: percent complete: 2%
Initializing package <23> of <914>: percent complete: 2%
Initializing package <24> of <914>: percent complete: 2%
Initializing package <25> of <914>: percent complete: 2%
<---------------- Output omitted for Brevity ---------------->
Initializing package <913> of <914>: percent complete: 99%
Initialized <914> packages on zone.
Zone is initialized.
The file root/var/sadm/system/logs/install_log> contains a log of the
zone installation.
# zoneadm -z apple-store boot
zoneadm: zone 'apple-store': WARNING: hme0:1: no matching subnet
found in netmasks(4) for 192.168.45.216; using default of
255.255.255.0.
#
Author: R Rajesh 5
A sneak preview into a feature of the block buster Operating System of Sun Microsystems Inc.
#
#
#
#
#
#
# ####zone creation over successuflly. There was some error
initially. Under the advice from Gary I uninstalled and re-installed
the zones.
#
#
# exit
script done on Tue Nov 08 13:12:57 2005
Author: R Rajesh 6

solaris 10 zone

Tim Graves & Joost Pronk, Solaris Marketing
HOW to MANAGE SYSTEMS with
ZFS IN SOLARISTM CONTAINERS
> Solaris™ 10 How To Guides
Contents
Solaris ZFS and Containers: Overview Page 1
ZFS and Containers: An Example Page 2 > 8
Creating a zpool Page 2
Creating a Zone Page 2
Allocating a ZFS File System to a Zone Page 4
Creating New File Systems Page 5
Applying Quota to the File Systems Page 6
Changing the Mountpoint of a File System Page 6
Setting the Compression Property Page 7
Taking a Snapshot Page 8
Summary Page 8
For More Information Page 9
About This ZFS How To Guide
This guide is intended to show a new user the capabilities of ZFS when coupled with Solaris Containers. It describes
the assignment of a ZFS file system to a zone, and some of the ZFS administrative tasks possible in such a
configuration. Assigning a file system to a zone gives a zone administrator full delegated control of the ZFS file
system, enabling them to take snapshots, create sub file systems and perform other tasks without requiring the
global zone administrator's intervention.
After reading this guide, the user will have an understanding of how to delegate a ZFS file system to a container and
to manage it from within the container.
Contributors: Paul Steeves and Solaris ZFS Engineering team
Solaris ZFS and Containers: Overview
ZFS is a new file system from Sun provided in the Solaris 10
OS. It provides very high levels of data integrity and
performance, and improves the ease of file system
management by eliminating the need for a volume
manager. Also, because it is 128-bit based, it opens the
door to virtually unlimited data scalability.
Traditional file systems have a model of a single device or
volume for each file system. This makes administration
complex and potentially prone to administrative errors
which could result in the destruction of data or lack of
access to the data. ZFS uses a pooled storage model in
which storage capacity is held within an expandable pool
called a zpool. Multiple file systems can exist within a
zpool and they can share the capacity and IO resources of
the pool. This new architectural approach, the storage
version of virtual memory, permits easier administration of
file systems and enables performance breakthroughs.
Figure 1—ZFS automatically grows shared storage
Solaris Containers is Sun's operating system virtualization
technique. It consists of several technologies that work
together to foster improved resource management and
isolate the environment from the underlying OS. With
Solaris Containers, you can determine how to allocate
resources among applications and services, and ensure
they do not interfere with one another.
ZFS and Containers are tightly integrated to allow the zone
administrator delegated rights to control the ZFS file
systems. By using ZFS and Containers in combination you
can assign a portion of the storage pool to a container.
This means that the administrator for that container has
the authority to manage that portion of the storage pool,
but it is isolated from the rest of the system. (See the figure
below.) This lets you benefit from both the data integrity of
ZFS, as well as the high availability and resource control of
containers.
Figure 2—Containers let you isolate ZFS file systems
Note that while Containers technology has several aspects,
the example in this guide will focus solely on the zones
aspect.
ZFS How To Guide
1
Solaris 10 Operating System sun.com/solaris
scalable
STORAGE POOL
APPLICATION1 APPLICATION2 APPLICATION 3
ZFS
GLOBAL ZONE
NON-GLOBAL ZONE
ZFS Storage
Delegated
File
System
ZFS and Containers: An Example
This section is a step-by-step guide that shows how to perform certain ZFS file system tasks inside of Solaris Containers; for
example, taking snapshots and managing data compression. It does this by going through the following steps:
• Creating a zpool
• Creating a Zone
• Allocating a ZFS File System to a Zone
• Creating New File Systems
• Applying Quota to the File Systems
• Changing the Mountpoint of a File System
• Setting the Compression Property
• Taking a Snapshot
Each of these steps is described in detail below.
Creating a zpool
ZFS uses device names or partition names when dealing with pools and devices. For a device, this will be something like
c1t0d0 (for a SCSI device) or c1d1 (for an IDE device). For a partition, it will be something like c1t0d0s0 (for a SCSI device)
or c1d1s0 (for an IDE device). This example creates a pool that is mirrored using two disks.
1. To create a zpool in the global zone, use the zpool create command. Typically, you use two devices to provide
redundancy.
Note that the zpool create command may fail if the devices are in use or contain some types of existing data (e.g. UFS
file system). If they are in use, you will need to unmount them or otherwise stop using them. If they contain existing
data you can use the -f (force) flag to override the safety check, but be sure that you are not destroying any data you
want to retain.
2. Examine the pool properties using the zpool list command.
This shows you that there is one zpool, named mypool, with a capacity of 199GBytes.
Creating a Zone
To show ZFS working in an environment that is isolated from other applications on the system, you need to create a zone.
To create a zone:
1. Create a directory where the zone file system will reside, using the mkdir command. Be sure to chose a location where
the file system has at least 80MBytes of available space.
Note that in this example, for the sake of brevity, the root file system of the zone is a UFS file system.
Global# mkdir /zones
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
mypool 199G 164K 199G 0% ONLINE -
Global# zpool list
Global# zpool create mypool mirror c2t5d0 c2t6d0
Solaris 10 Operating System sun.com/solaris
2
3
Solaris 10 Operating System sun.com/solaris
2. Configure the zone (myzone), using the zonecfg command, and specify the location of the zone's files
(/zones/myzone). Use the following series of commands.
Again, for the purpose of streamlining, this example uses a very minimal zone. For more details on creating zones see
the Solaris Containers How To Do Stuff guide at:
www.sun.com/software/solaris/howtoguides/containersLowRes.jsp
3. Install the zone by using the zoneadm.
4. Boot the zone to complete the installation, using the zoneadm command.
5. Use the zlogin command to connect to the zone console.
It may take a short while for the first boot to configure everything, load all the service descriptors, and so on. You will
need to answer the system configuration details. Some suggestions are:
The zone will reboot after you have provided the configuration information.
6. Before you can proceed to the next stage, the configured zone needs to be shutdown (configuration changes are only
applied when the zone boots).
Global# zlogin myzone init 5
Terminal=(12)X Terminal Emulator (xterms)
Not Networked
No Kerberos
Name service = None
Time Zone = your-time-zone
root passwd = (Your choice – remember it though!)
Global# zlogin -C myzone
[Connected to zone 'myzone' console]
[Initial zone boot output, service descriptions are loaded etc.]
Global# zoneadm -z myzone boot
Global# zoneadm -z myzone install
Preparing to install zone
[Output from zoneadm, this may take a few mins]
Global# zonecfg -z myzone
myzone: No such zone configured
Use 'create' to begin configuring a new zone
zonecfg:myzone> create
zonecfg:myzone> set zonepath=/zones/myzone
zonecfg:myzone> verify
zonecfg:myzone> commit
zonecfg:myzone> exit
Allocating a ZFS File System to a Zone
Now that you have a zpool (mypool) and a zone (myzone) you are ready to allocate a ZFS file system to the zone.
1. To create a ZFS file system, use the zfs create command.
2. To apply a quota to the file system, use the zfs set quota command.
The file system and all of its child file systems can be no larger than the designated quota. Note that both these steps
must be performed in the global zone. Also notice that creating the file system in ZFS is much simpler than with a
traditional file system/volume manager combination.
To illustrate the isolation/security properties of containers with ZFS this example now creates a ZFS file system that will
remain outside the container. There is no need to apply a quota to this outside file system.
3. To create this other file system, again use the zfs create command.
4. To show the properties of all the pool and the file systems, use the ZFS list command.
To make the file system (myzonefs) available in the zone (myzone), the zone configuration needs to be updated.
5. To update the zone configuration, use the zonecfg command.
The mypool/myzonefs file system is now added to the zone configuration. Note that these steps must be performed with
the zone shut down, otherwise the zone configuration changes would not be visible until the next reboot. To check that
the zone is shut down try logging into it using zlogin myzone. If the zone is shut down the login will fail; if the zone is
running you will see a login prompt—login as root and shut the zone down with init 5. These steps are performed in the
global zone.
Global# zonecfg -z myzone
zonecfg:myzone> add dataset
zonecfg:myzone:dataset> set name=mypool/myzonefs
zonecfg:myzone:dataset> end
zonecfg:myzone> commit
zonecfg:myzone> exit
NAME USED AVAIL REFER MOUNTPOINT
mypool 396G 197G 99.5K /mypool
mypool/myfs 98.5K 197G 98.5K /mypool/myfs
mypool/myzonefs 98.5K 5G 98.5K /mypool/myzonefs
Global# zfs list
Global# zfs create mypool/myfs
Global# zfs set quota=5G mypool/myzonefs
Global# zfs create mypool/myzonefs
Solaris 10 Operating System sun.com/solaris
4
6. Now boot the zone.
7. Log in to the zone. (Leave a few seconds for the zone to boot.)
8. List the ZFS file systems in the zone.
Note the 5GByte maximum available from the external quota and that the other file systems in the pool
(mypool/myfs) are not visible. This demonstrates the isolation property that Containers provide.
Creating New File Systems
Administering ZFS file systems from the non-global zone is done just like it is in the global zone, although you are limited
to operating within the file system that is allocated to the zone (mypool/myzonefs). New ZFS file systems are always
created as a child of this file system because this is the only ZFS file system the non-global zone can see. The administrator
in the non-global zone can create these file systems. There is no need to involve administrator of the global zone, though
the administer could do so if it were necessary.
1. To create a new file system, use the zfs create command.
The non-global zone administrator can create as many child file systems as s/he wants and each child file system can have
its own file systems, and in that way form a hierarchy.
As a demonstration that the non-global zone administrator is limited to the assigned file systems, this example
demonstrates trying to break security by creating a file system outside the container's "space".
2. Try to create another file system outside of mypool/myzonefs, using the zfs create command.
As you can see, ZFS and zones security denies permission for the non-global zone to access resources it has not been
allocated and the operation fails.
MyZone# zfs create mypool/myzonefs1
cannot create 'mypool/myzonefs1': permission denied
NAME USED AVAIL REFER MOUNTPOINT
mypool 504M 197G 99K /mypool
mypool/myzonefs 197K 5.00G 98.5K /mypool/myzonefs
mypool/myzonefs/tim 98.5K 5.00G 98.5K /mypool/myzonefs/tim
MyZone# zfs create mypool/myzonefs/tim
MyZone# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 0M 200B - /mypool
mypool/myzonefs 8K 5G 8K /mypool/myzonefs
Global# zlogin -C myzone
[Connected to zone 'myzone' pts/3]
[Usual Solaris login sequence]
Global# zoneadm -z myzone boot
5
Solaris 10 Operating System sun.com/solaris
Applying Quota to the File Systems
Typically, to prevent the user consuming all of the space, a non-global zone administrator will want to apply a quota to the
new file system. Of course, the child's quota can't be more than 5GByte as that's the quota specified by the global zone
administrator to all of the file systems below mypool/myzonefs.
1. To set a quota on our new file system, use the zfs set quota command.
The administrator of the non-global zone has set the quota of the child file system to be 1G. They have full authority to do
this because they are operating on their delegated resources and do not need to involve the global zone administrator.
The ZFS property inheritance mechanism applies across zone boundaries, so the non-global zone administrator can specify
his/her own property values should s/he wish to do so. As with normal ZFS property inheritance, these override inherited
values.
Changing the Mountpoint of a File System
Now that the file system is set up and has the correct quota assigned to it, it is ready for use. However, the place where
the file system appears (the mountpoint) is partially dictated by what the global zone administrator initially chose as the
pool name (in this example, mypool/myzonefs). But typically, a non-global zone administrator would want to change it.
1. To change the mountpoint, use the zfs set mountpoint command.
Note that the mountpoint can be changed for any file system independently.
NAME USED AVAIL REFER MOUNTPOINT
mypool 508M 197G 99K /mypool
mypool/myzonefs 198k 5.00G 99K /mypool/myzonefs
mypool/myzonefs/tim 98.5K 1024M 98.5K /export/home/tim
MyZone# zfs set mountpoint=/export/home/tim mypool/myzonefs/tim
MyZone# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 508M 197G 99K /mypool
mypool/myzonefs 198k 5.00G 99K /mypool/myzonefs
mypool/myzonefs/tim 98.5K 1024M 98.5K /mypool/myzonefs/tim
MyZone# zfs set quota=1G mypool/myzonefs/tim
MyZone# zfs list
Solaris 10 Operating System sun.com/solaris
6
Setting the Compression Property
The next example demonstrates the compression property. If compression is enabled, ZFS will transparently compress all of
the data before it is written to disk.
The benefits of compression are both saved disk space and possible write speed improvements.
1. To see what the current compression setting is, use the zfs get command.
Be aware that the compression property on the pool is inherited by the file system and child file system. So if the nonglobal
zone administrator sets the compression property for the delegated file system, it will set it for everything below, as
well.
2. To set the compression for the file system, use the zfs set command.
3. Examine the compression property again in the non-global zone.
Note the compression property has been inherited by mypool/myzonefs/tim as with normal ZFS administration.
NAME PROPERTY VALUE SOURCE
mypool compression off default
mypool/myzonefs compression on local
mypool/myzonefs/tim compression on Inherited from
mypool/myzonefs
MyZone# zfs get compression mypool mypool/myzonefs mypool/myzonefs/tim
MyZone# zfs set compression=on mypool/myzonefs
NAME PROPERTY VALUE SOURCE
mypool compression off default
mypool/myzonefs compression off default
mypool/myzonefs/tim compression off default
MyZone# zfs get compression mypool mypool/myzonefs mypool/myzonefs/tim
7
Solaris 10 Operating System sun.com/solaris
Taking a Snapshot
One of the major advantages of ZFS is the ability to create an instant snapshot of any file system. By delegating a file
system to a non-global zone this feature becomes available as an option for the non-global zone administrator.
1. To take a snapshot named “1st “ of the file system, use the zfs snapshot command.
As with ZFS file systems in the global zone, this snapshot is now accessible from the root of the file system in
.zfs/snapshot/1st.
Summary
Once a zone has been created and a ZFS file system has been allocated to it, the administrator for that (non-global) zone
can create file systems, take snapshots, create clones, and perform all the other functions of an administrator—within that
zone. Yet the global zone, and any other zones, are fully isolated from whatever happens in that zone.
The integration of Solaris Containers and Solaris ZFS is just another way that the Solaris 10 OS is providing cost benefits to
customers by allowing them to safely consolidate applications and more easily manage the data those applications use.
NAME USED AVAIL REFER MOUNTPOINT
mypool 512K 197G 99K /mypool
mypool/myzonefs 198K 5.00G 99K /mypool/myzonefs
mypool/myzonefs@1st 0K - 99K -
mypool/myzonefs/tim 98.5K 1024M 98.5K /export/home/tim
MyZone# zfs snapshot mypool/myzonefs@1st
MyZone# zfs list
Solaris 10 Operating System sun.com/solaris
8
For More information
While this Solaris How To Guide provides the rudimentary steps needed to get Solaris Container technology and the Solaris
ZFS file system working in collaboration with each other, more sophisticated configurations are possible. For more
information regarding Solaris Containers and Solaris ZFS, visit sun.com/solaris.
9
Solaris 10 Operating System sun.com/solaris
Manuals
Frequently Asked Questions (FAQ)
Web-Based Training
Solaris ZFS Administration Guide
ZFS FAQ
Additional Q&A
sun.com/solaris/zfs/faq
opensolaris.org/os/community/zfs/faq
Solaris ZFS Learning Center
(Including video presentations and demos)
Solaris Containers Learning Center
Solaris Containers How to Guide
sun.com/solaris/zfs
sun.com/solaris/containers
sun.com/solaris/howtoguides/containers
opensolaris.org/os/community/zfs/docs/zfsadmin_0417.pdf
Community Resources
OpenSolaris ZFS Community
Sun ZFS Blogs
opensolaris.org/os/community/zfs
opensolaris.org/os/community/zfs/blogs
sun.com/solaris
©2005 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 USA Phone 1-650-960-1300 or 1-800-555-9SUN Web sun.com

Monday, December 17, 2007

vxfs

VERITAS Education http://us.training.veritas.com 800-327-2232 (option 2)
Copyright © 2002 VERITAS Software Corporation. All Rights Reserved. VERITAS, VERITAS Software, the VERITAS logo, and all other VERITAS product names and slogans are trademarks or
registered trademarks of VERITAS Software Corporation in the US and/or other countries. Other product names and/or slogans mentioned herein may be trademarks or registered trademarks of
their respective companies. Specifications and product offerings subject to change without notice. Printed in USA and the EU. March 2002.
1
V E R I T A S E D U C A T I O N Q U I C K R E F E R E N C E
VxFS Commands
SETTING UP A FILE SYSTEM
Action Command Line
Make a VxFS file system mkfs –F vxfs [generic_options] [-o vxfs_options]
char_device [size]
Mount a file system mount –F vxfs [generic_options] [-o vxfs_options]
block_device mount_point
Unmount a file system umount mount_point
Determine file system type fstyp [-v] block_device
Report free blocks/inodes df –F vxfs [generic_options] [-o s] mount_point
Check/repair a file system fsck –F vxfs [generic_options] [yY] [nN]
character_device
ONLINE ADMINISTRATION
Action Command Line
Resize a file system fasdm [-b newsize] [-r raw_device] mount_point
Dump a file system vxdump [options] mount_point
Restore a file system vxrestore [options] mount_point
Create a snapshot file
system
mount –F vxfs –o
snapof=source_block_device,[snapsize=size]
destination_block_device snap_mount_point
Create a storage
checkpoint fsckptadm [-nruv] create ckpt_name mount_point
List storage checkpoints fsckptadm [-clv] list mount_point
Remove a checkpoint fsckptadm [-sv] remove ckpt_name mount_point
Mount a checkpoint mount –F vxfs –o ckpt=ckpt_name pseudo_device
mount_point
Unmount a checkpoint umount mount_point
Change checkpoint
attributes
fsckptadm [-sv] set [nodatanomountremove]
ckpt_name
Upgrade the VxFS layout vxupgrade [-n new_version] [-r raw_device]
mount_point
Display layout version vxupgrade mount_point
DEFRAGMENTING A FILE SYSTEM
Action Command Line
Report on directory fragmentation fsadm –D mount_point
Report on extent fragmentation fsadm –E [-l largesize] mount_point
Defragment directories fsadm –d mount_point
Defragment extents fsadm –e mount_point
Reorganize a file system to
support files > 2GB fsadm –o largefiles mount_point
INTENT LOGGING, I/O TYPES, AND CACHE ADVISORIES
Action Command Line
Change default logging behavior
fsck –F vxfs [generic_options]
–o delaylogtmplognodatainlogblkclear
block_device mount_point
Change how VxFS handles
buffered I/O operations
mount –F vxfs [generic_options] –o
mincache=closesyncdirectdsyncunbuffered
tmpcache block_device mount_point
Change how VxFS handles I/O
requests for files opened with
O_SYNC and O_DSYNC
mount –F vxfs [generic_options] –o
convosync=closesyncdirectdsyncunbuffered
delay block_device mount_point
QUICK I/O
Action Command Line
Enable Quick I/O at mount mount –F vxfs –o qio mount_point
Disable Quick I/O mount –F vxfs –o noqio mount_point
Treat a file as a raw character
device filename::cdev:vxfs:
Create a Quick I/O file through a
symbolic link
qiomkfile [-h header_size] [-a] [-s size]
[-e-r size] file
Get Quick I/O statistics qiostat [-i interval][-c count] [-l] [-r] file
Enable cached QIO for all files in
a file system vxtunefs –s –o qio_cache_enable=1 mnt_point
Disable cached QIO for a file qioadmin –S filename=OFF mount_point

sun cluster 3.x

SUNTM CLUSTER QUICK REFERENCE
This reference provides quick lookup support for the Sun Cluster command-line interface. Many tasks require cluster preparation before
you issue these commands. For information about cluster preparation, refer to the appropriate cluster administration manual.
QUORUM ADMINISTRATION
Add a SCSI Quorum Device # clquorum add device
Add a NAS Quorum Device # clquorum add -t netapp_nas -p filer =nasdevicename,lun_id =IDnumdevice \
Nasdevice
Add a Quorum Server # clquorum add -t quorumserver -p qshost =IPaddress, port =portnumber \
quorumservername
Remove a Quorum Device # clquorum remove device
RESOURCE TYPE ADMINISTRATION
Register a Resource Type # clresourcetype register type
Remove a Resource Type # clresourcetype unregister type
RESOURCE GROUP ADMINISTRATION
Create a Failover Resource Group # clresourcegroup create group
Create a Scalable Resource Group # clresourcegroup create -S group
Bring Online All Resource Groups # clresourcegroup online +
Delete a Resource Group # clresourcegroup delete group
Delete a Resource Group and All of Its Resources # clresourcegroup delete -F group
Switch the Current Primary Node of a Resource Group # clresourcegroup switch -n nodename group
Move a Resource Group Into the UNMANAGED State # clresourcegroup unmanage group
Suspend Automatic Recovery of a Resource Group # clresourcegroup suspend group
Resume Automatic Recovery of a Resource Group # clresourcegroup resume group
Change a Resource Group Property # clresourcegroup set -p Failback=true + name=value
Add a Node To a Resource Group # clresourcegroup add-node -n nodename group
Remove a Node From a Resource Group # clresourcegroup remove-node -n nodename group
RESOURCE ADMINISTRATION
Create a Logical Hostname Resource # clreslogicalhostname create -g group lh-resource
Create a Shared Address Resource # clressharedaddress create -g group sa-resource
Create a Resource # clresource create -g group -t type resource
Remove a Resource # clresource delete resource
Disable a Resource # clresource disable resource
Change a Single-Value Resource Property # clresource set -t type -p name=value +
Add a Value to a List of Property Values # clresource set -p name+=value resource
Existing values in the list are unchanged.
Create an HAStorage Plus Resource # clresource create -t HAStoragePlus -g group \
-p FileSystemMountPoints=mount-point-list \
-p Affinityon=true rs-hasp
Clear the STOP_FAILED Error Flag on a Resource # clresource clear -f STOP_FAILED resource
DEVICE ADMINISTRATION
Add a VxVM Device Group # cldevicegroup create -t vxvm -n node-list -p failback=true vxdevgrp
Remove a Device Group # cldevicegroup delete devgrp
Switch a Device Group to a New Node # cldevicegroup switch -n nodename devgrp
Bring Offline a Device Group # cldevicegroup offline devgrp
Update Device IDs for the Cluster # cldevice refresh diskname
MISCELLANEOUS ADMINISTRATION AND MONITORING
Add a Node to Cluster
From the node to be added, which has access: # clnode add -c clustername -n nodename -e endpoint1, endpoint2 \
(If the node does not have access to cluster -e endpoint3, endpoint4
configuration, see the claccess (1CL) man page.)
Remove a Node From the Cluster
From the node to be removed, which is in noncluster
mode and has access: # clnode remove
(If the node does not have access to cluster
configuration, see the claccess(1CL) man page.)
Switch All Resource Groups and Device Groups # clnode evacuate nodename
Off of a Node
Manage the Interconnect Interfaces # clinterconnect disable nodename:endpoint
These commands disable a cable so that # clinterconnect enable nodename:endpoint
maintenance can be performed, then enable the
same cable afterward.
Display the Status of All Cluster Components # cluster status
Display the Status of One Type of Cluster Component # command status
Display the Complete Cluster Configuration # cluster show
Display the Configuration of One Type of Cluster # command show
Component
List One Type of Cluster Component # command list
Display Sun Cluster Release and Version Information # clnode show-rev -v
This command lists the software versions
on the current node.
Map Node ID to Node Name # clnode show grep nodename
Enable Disk Attribute Monitoring on All Cluster Disks # cltelemetryattribute enable -t disk rbyte.rate wbyte.rate \
read.rate write.rate
Disable Disk Attribute Monitoring on All Cluster Disks # cltelemetryattribute disable -t disk rbyte.rate wbyte.rate \
read.rate write.rate
SHUTTING DOWN AND BOOTING A CLUSTER
Shut Down the Entire Cluster # cluster shutdown
From one node:
Shut Down a Single Node # clnode evacuate
# shutdown
Boot a Single Node
(SPARC) ok> boot
(x86) Press any key to reboot: keystroke
Reboot a Node Into Noncluster Mode
(SPARC) ok> boot -x
(x86) Press any key to reboot: boot interactively and add -x to the multiboot
command
© 2007 Sun Microsystems, Inc. Part No. 819-6811-11, August 2007

nis

NAME ypwhich - return name of NIS server or map master
SYNOPSIS
ypwhich [ -d domain ] [ [ -t ] -m [ mname ] [ -Vn ] hostname ]
ypwhich -x
DESCRIPTION
ypwhich returns the name of the NIS server that supplies the
NIS name services to a NIS client, or which is the master
for a map. If invoked without arguments, it gives the NIS
server for the local machine. If hostname is specified,
that machine is queried to find out which NIS master it is
using.
OPTIONS
-d domain
Use domain instead of the default domain.
-t This option inhibits map nickname translation.
-m mname
Find the master NIS server for a map. No hostname can
be specified with -m. mname can be a mapname, or a
nickname for a map. When mname is omitted, produce a
list of available maps.
-x Display the map nickname translation table.
NAMEypcat - print values in a NIS database
SYNOPSIS
ypcat [ -kx ] [ -d ypdomain ] mname
DESCRIPTION
The ypcat command prints out values in the NIS name service
map specified by mname, which may be either a map name or a
map nickname. Since ypcat uses the NIS network services, no
NIS server is specified.
OPTIONS
-k Display the keys for those maps in which the values
are null or the key is not part of the value. None of
the maps derived from files that have an ASCII version
in /etc fall into this class.
-d ypdomain
Specify a domain other than the default domain.
-x Display map nicknames.
NAMEypmatch - print the value of one or more keys from a NIS map
SYNOPSIS
ypmatch [ -k ] [ -t ] [ -d domain ] key [ key ... ] mname
ypmatch -x
DESCRIPTION
ypmatch prints the values associated with one or more keys
from the NIS's name services map specified by mname, which
may be either a map name or a map nickname.
Multiple keys can be specified; all keys will be searched
for in the same map. The keys must be the same case and
length. No pattern matching is available. If a key is not
matched, a diagnostic message is produced.
OPTIONS
The following options are supported:
-k Before printing the value of a key, print the key
itself, followed by a colon (:).
-d domain Specify a domain other than the default domain.
-x Display the map nickname table. This lists the nick-
names the command knows of, and indicates the map name
associated with each nickname.
OPERANDS
The following operand is supported:
mname The NIS's name services map

solaris commands

SOLARIS
/ {/dev/vx/dsk/rootvol}
/export/home
/dev/vx/dsk/home}
/tmp
/dev/vx/dsk/swapvol}
/usr
/var

Solaris
/etc/passwd
/etc/shadow
/etc/group
2147483647
/etc/default/login
{CONSOLE=/dev/console}
60001 & 65534(nobody4)
60002 & 65534(nogroup)
boot cdrom -s
mkdir /tmp/a
mount /dev/c0t0d0s0 /tmp/a
vi /tmp/a/etc/shadow







useradd
userdel
logins
usermod
Solaris
hostid
admintool
top
sar
vmstat
iostat
dmesg
16TB


/dev/vx/dsk/swapvol
swap
swap -l
swap -a
Solaris
/etc/lp/interfaces/*
/usr/lib/lp/lpshut
/usr/lib/lp/lpsched
lp
lpr


lpstat
cancel
lprm


lpadmin -p pq
lpadmin -x pq
lpadmin -d pq
Solaris
/etc/hostname.*
/etc/inet/*
/etc/defaultrouter
/etc/inet/hosts
/etc/nsswitch.conf
ndd /dev/[tcpip] ?
in.routed
ifconfig -a
ifconfig hme0:1 IP up
BANNER @
/etc/default/telnetd
{/etc/system}
set pt_cnt = # {SYSV}
set npty = # {BSD}

{/etc/iu.ap}
ptsl 0 # ldterm ttcompat

halt
boot -r
176 {BSD}
3000 {SYSV}
rsh
/usr/lib/netsvc/yp/ypbind
Solaris
/etc/dfs/dfstab
/etc/dfs/sharetab
/etc/rmtab
1 TB
8000 TB {vxfs}

1 TB
2 GB {=<2.5.1}>current
format>inquiry
prtvtoc
sub disk
Volume
Plex
disk group
vxfs
/dev/vx/dsk/rootdg
vxprint -l -g rootdg

vxdiskadd
vxprint -dl
vxdg rmdisk
vxassist move
vxdg init



vxdg deport
vxdg import

vxedit set
vxprint -vl
vxassist make
vxassist growto
vxassist shrinkto
vxedit rm
vxbootsetup

vxva
mkfs -M


vxassist mirror

vxassist make vol 100mb layout=raid5

ufsdump
ufsrestore
SOLARIS
/etc/init.d
/kernel/genunix
sysdef -i
vi /etc/system
reboot













modinfo
modload
modunload
sys-unconfig
prtconf
isainfo -kv
crash
truss
uname -imp
uname -r
who -r
/var/crash/`uname -n`
ok boot -s
ok boot -as
Stop-A
ok go
/etc/TIMEZONE
/etc/default/init
/etc/inet/ntp.conf
/etc/init.d/xntpd
SOLARIS
pkgadd
pkgrm
pkginfo
pkginfo -i
pkginfo -p
pkgchk -l package
patchadd -p
pkgchk -l -p path
/var/sadm
SOLARIS
/devices
drvconfig
devlinks
disks
tapes
ports
rem_drv
prtconf -D
psrinfo -v
pmadm -l
/usr/platform/`uname -m`/
sbin/prtdiag
ok test-all
/opt/SUNWvts/bin/sunvts
/dev/c#t#d0s2
/dev/dsk/c#t6d0s2
hsfs
/dev/rmt/0
/dev/rmt/0n
/dev/diskette
SOLARIS
Solaris 2 FAQ
Solaris 10 Documentation
SunSolve
1-800-USA-4SUN
Sun Freeware
suned.sun.com

veritas cluster

Term/Cmd/Pkg Description Command / File =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-VRTSvcs VERITAS Cluster ServerVRTSvcswz VERITAS Cluster Server WizardVRTScsga VERITAS Cluster Server Graphical AdministratorVRTSgab VERITAS Group Membership and Atomic BroadcastVRTSllt VERITAS Low Latency TransportVRTSvcsor VERITAS Cluster Server Oracle Enterprise ExtensionVRTSvcssy VERITAS Cluster Server Sybase Enterprise ExtensionVRTSperl VERITAS Perl for VRTSvcsCluster Name of your HA environmentNodes Physical systems that make up the clusterService group Abstract container of related resourcesResource Cluster components (i.e. NICs, IPs, disk groups, volumes, mounts, processes, etc...)Attributes Parameter values that define the resourcesDependencies Links between resources or service groupsCluster Mgr Cluster Monitor : Log in, add clusters, change preferencesCluster Mgr Cluster Explorer: Monitor systems, service grps, resources, attributes & dependenciesCluster Mgr Log Desk : Monitor log messages received from engine, view GUI commandsCluster Mgr Command Center : Build VCS commands and send to engineLLT Low Latency transport provides fast kernel-kernel comm. & monitors network connx.GAB Grp membership & Atomic Broadcast maintains a synch. state & monitors disk comm.Config files VCS etc directory $VCSETC=/etc/VRTSvcsConfig files VCS configuration directories $VCSCONF=/etc/VRTSvcs/conf/configBinary files VCS opt directory $VCSOPT=/opt/VRTSvcsBinary files VCS binary path $VCSBIN=/opt/VRTSvcs/binLog files VCS log path $VCSLOG=/var/VRTSvcs/logConfig files VCS configuration file /etc/VRTSvcs/conf/config/main.cfLLT tab file LLT configuration file /etc/llttabLLT hosts file LLT host name database /etc/llthostsGAB file Grp membership & Atomic Broadcast file /etc/gabtabquick-start VCS Quick-start wizard # $VCS_HOME/wizards/config/quick_startquick-NFS VCS Quick-NFS wizard # $VCS_HOME/wizards/services/quick_nfsllt Verify LLT # /sbin/llstat -nllt Get interface MAC Address # /opt/VRTSllt/getmac device_namellt Check network connectivity # /opt/VRTSllt/dlpiping -s-c -v device_namegab Verify GAB # /sbin/gabconfig -a ; /sbin/gabconfig -lhasys List systems in cluster # /opt/VRTSvcs/bin/hasys -listhasys Detailed info on each cluster node # /opt/VRTSvcs/bin/hasys -display (sysname)hasys Increase system count in gabtab startup # /opt/VRTSvcs/bin/hasys -add (sysname)hasys Delete a system # /opt/VRTSvcs/bin/hasys -delete (sysname)hastart Start VCS cluster # /opt/VRTSvcs/bin/hastarthastart Force start a stale VCS cluster # /opt/VRTSvcs/bin/hastart -force -stalehastop Stop VCS on all systems # /opt/VRTSvcs/bin/hastop -allhastop Stop VCS had, keep srvc-groups running # /opt/VRTSvcs/bin/hastop -local -forcehastop Stop VCS, migrate srvc-groups to sysname # /opt/VRTSvcs/bin/hastop -sys (sysname) -evacuatehastatus Provide continual status of service grps # /opt/VRTSvcs/bin/hastatus hastatus Verify status of service groups # /opt/VRTSvcs/bin/hastatus -summaryhacf Check for syntax errors in main.cf # /opt/VRTSvcs/bin/hacf -verify /etc/VRTSvcs/conf/config/main.cfhacf Generate dependency tree in main.cf # /opt/VRTSvcs/bin/hacf -generate /etc/VRTSvcs/conf/config/main.cfhares List all resources # /opt/VRTSvcs/bin/hares -listhares List a resource's dependencies # /opt/VRTSvcs/bin/hares -dep (resource_name)hares Get detailed info on a resource # /opt/VRTSvcs/bin/hares -display (resource)hares Add a resource # /opt/VRTSvcs/bin/hares -add (resource_name (resource_type (service_group)hares Modify attributes of the new resource # /opt/VRTSvcs/bin/hares -modify (resource_name (attribute_name (value)hares Delete a resource # /opt/VRTSvcs/bin/hares -delete (resource_name)hares Online a resource # /opt/VRTSvcs/bin/hares -online (resource_name) -sys (system_name)hares Offline a resource # /opt/VRTSvcs/bin/hares -offline (resource_name) -sys (system_name)hares Monitor resource on a system # /opt/VRTSvcs/bin/hares -probe (resource_name) -sys (system_name)hares Clear a faulted resource # /opt/VRTSvcs/bin/hares -clear (resource_name) [-sys system_name]hares Make a resource's attribute value local # /opt/VRTSvcs/bin/hares -local (resource_name) (attribute_name) value)hares Make a resource's attribute value global # /opt/VRTSvcs/bin/hares -global (resource_name) (attribute_name) value)hares Specify a dependency between 2 resources # /opt/VRTSvcs/bin/hares -link (parent_res) (child_res)hares Remove dependency between 2 resources # /opt/VRTSvcs/bin/hares -unlink (parent_res) (child_res)hares Modify a Share res. by adding options # /opt/VRTSvcs/bin/hares Share_cicgt-as4-p_apps Options "%-o rw,root=dcsa-cln1"hagrp List all service groups # /opt/VRTSvcs/bin/hagrp -listhagrp List a service group's resources # /opt/VRTSvcs/bin/hagrp -resources [service_group]hagrp List a service group's dependencies # /opt/VRTSvcs/bin/hagrp -dep [service_group]hagrp Detailed info about a service group # /opt/VRTSvcs/bin/hagrp -display [service_group]hagrp Start service group, bring res. online # /opt/VRTSvcs/bin/hagrp -online (service_group) -sys (system_name)hagrp Stop service group, bring res. offline # /opt/VRTSvcs/bin/hagrp -offline (service_group) -sys (system_name)hagrp Switch service group between nodes # /opt/VRTSvcs/bin/hagrp -switch (service_group) -to (system_name)hagrp Freeze svcgroup, (disable onl. & offl.) # /opt/VRTSvcs/bin/hagrp -freeze (service_group) [-persistent]hagrp Thaw a svcgroup, (enable onl. & offl.) # /opt/VRTSvcs/bin/hagrp -unfreeze (service_group) [-persistent]hagrp Enable a service group # /opt/VRTSvcs/bin/hagrp -enable (service_group) [-sys system_name]hagrp Disable a service group # /opt/VRTSvcs/bin/hagrp -disable (service_group) [-sys system_name]hagrp Enable all resources in a service group # /opt/VRTSvcs/bin/hagrp -enableresources (service_group)hagrp Disable all resources in a service group # /opt/VRTSvcs/bin/hagrp -disableresources (service_group)hagrp Specify dependenciy between 2 svc groups # /opt/VRTSvcs/bin/hagrp -link (parent_group) (child_group) (relationship)hagrp Remove dependenciy between 2 svc groups # /opt/VRTSvcs/bin/hagrp -unlink (parent_group) (child_group)hagrp Auto-Enable a servicegroup marked # /opt/VRTSvcs/bin/hagrp -autoenable (service_group) [-sys system_name] disabled due to prob with system_name.hatype List resource types # /opt/VRTSvcs/bin/hatype -listhatype Detailed info on a resource type # /opt/VRTSvcs/bin/hatype -display (resource_type)hatype List all resources of a part. type # /opt/VRTSvcs/bin/hatype -resources (resource_type)hatype Add a resource type # /opt/VRTSvcs/bin/hatype -add (resource_type)hatype Set static attribute values # /opt/VRTSvcs/bin/hatype -modify ...hatype Delete a resource type # /opt/VRTSvcs/bin/hatype -delete (resource_type)haattr Add Attribute to a Type definition # /opt/VRTSvcs/bin/haattr -add (resource_type) (attribute_name) (attribute_type -integer, -string, -vector)haattr Delete a Entry in a Type definition # /opt/VRTSvcs/bin/haattr -delete (resource_type) (attribute_name)haconf Set VCS configuration file to r/w mode # /opt/VRTSvcs/bin/haconf -makerwhaconf Set VCS configuration file to read mode # /opt/VRTSvcs/bin/haconf -dump -makerohauser Add a user with r/w access to VCS # /opt/VRTSvcs/bin/hauser -add (user_name)hauser Add a user with read access only to VCS # /opt/VRTSvcs/bin/hauser -add VCSGuesthauser Update a user # /opt/VRTSvcs/bin/hauser -update (user_name)hauser Delete a user # /opt/VRTSvcs/bin/hauser -delete (user_name)hauser Display all users # /opt/VRTSvcs/bin/hauser -displayhaagent Start agents manually # haagent -start (agent_name) -sys (system_name)haagent Stop agents manually # haagent -stop (agent_name) -sys (system_name)hagui Start Cluster Manager # /opt/VRTSvcs/bin/haguihagui Start Cluster Manager in debug mode # /opt/VRTSvcs/bin/hagui -DProduct Terminology comparisonsSun SC 2.2 Veritas VCS 1.1------------------------------------------------------cluster name cluster nameadmin workstation -physical node A local systemphysical node B remote systemphysical node IP address maintenance IP addresslogical host service grouplogical host IP address service group IP address- resourcesdisk group disk groupprivate heartbeats communication channels- GAB disk (disk heartbeat)Quorum disk -Admin filesystem -scinstall Quick-Start wizard split-brain network partitionconfiguration files:

/etc/llthosts

/etc/llttab

/etc/gabtab

/etc/VRTSvcs/conf/config/main.cf

/etc/VRTSvcs/conf/config/sysname

solaris---Jumpstart Install

Description Of a Jumpstart Install
Here, roughly, is what goes on during a Solaris 8 jumpstart install, oh but first let's talk about some terms!
Definition of Terms
Client = Machine to Recieve Jumpstart InstallBoot Server = Machine on same subnet/local network/broadcast domain as Client which hands client boot files and informationInstall Server = Machine from which Client will install Solaris OSNotice: The Install server does not have to be on the same subnet as the Client. The Boot Server passes the Client the IP address of its default router which the client then uses as its default router. Not sure if this is documented anywhere in Sun's Doc, but if you snoop -v the traffic between a Boot Server and an Install Client you'll see the bootparam service hand this info to the Client. Also if you are using routed instead of default routers, well good luck!Also Notice: There is nothing stopping the Install server and the Boot server from being the same machine, and in practice it make good sense.
Admin issues the 'boot net - install' command from the 'ok' prompt of the client
Client machine broadcasts a Reverse-ARP request to the local subnet
Boot server's in.rarpd server responds with an ip address from its /etc/hosts file matching the hostname listed for the client's mac address in the server's /etc/ethers file
Client machine requests OS kernel and extras from the Boot server's tftp daemon
The in.tftpd server running on the Boot Server hands the client the requested files
Client downloads and boots the requested kernel image
Client starts bootparams client and requests boot info from Boot Server
rpc.bootparams server on Boot Server responds with the NFS location of a jumpstart-dir, an install-root filesystem, and a sysidcfg dir
Client NFS mounts Boot Server's jumpstart-dir/Solaris_8/Tools/Boot directory as its root filesystem
Client NFS mounts Install server's jumpstart-dir and launches OS install
Client begins "System Indentification" stage of install. If you are familiar with CD installs of Solaris, you will recognize this stage as where the install program asks for host, network, locale, date and time information
Client NFS mounts the sysidcfg directory it was given by the rpc.bootparams daemon on the Boot server
Client reads host configuration information from the text file named 'sysidcfg' inside the sysidcfg directory it has mounted
Client requests manual entry at it's console for any information not contained in this file
Client begins "System Install" stage of install. If you are familiar with CD installs of Solaris, you will recognize this stage as where the install program asks you to choose a parition layout for system and to choose a package cluster/and or individual software packages to install.
Client finds line matching it's own system architechture (Sparc/x86), hostname, ip address, etc. in 'rules.ok' text file in Install server's jumpstart-dir
From this line the Client is told the name of a begin-script, profile, and finish-script. The profile is a text file, the begin and finish scripts bourne shell scripts. All three items are located in the Install server's jumpstart-dir
Client executes the begin-script
Client partitions and formats its disks according to rules laid out in its profile
Client installs software packages according to rules laid out in its profile
Client installs any system patches found in the Install server's jumpstart-dir/Patches directory. It installs these patches in date-wise order (that is to say according to their time-stamps) from oldest to newest
Client execute the finish-script
System is installed, and Client reboots
That's All!!
Network Services Needed for a Jumpstart InstallOn Boot Server
in.rarpd
From The Man Page (man rarpd)RARP is used by machines at boot time to discover their Internet Protocol (IP) address. The booting machine provides its Ethernet address in a RARP request message. Using the ethers and hosts databases, in.rarpd maps this Ethernet address into the corresponding IP address which it returns to the booting machine in an RARP reply message. The booting machine must be listed in both databases for in.rarpd to locate its IP address.Under Solaris 8 in.rarpd is started by the nfs.server init script if the directory /tftpboot exists.
rpc.bootparams
From The Man Page (man bootparamd)rpc.bootparamd is a server process that provides information from a bootparams database to diskless clients at boot time.The bootparams database can either be the flat text file /etc/bootparams (recommended) or an NIS map. Which of these methods to use is controlled by an entry in the /etc/nsswitch.conf file.Under Solaris 8 rpc.bootparamd is started by the nfs.server init script if the directory /tftpboot exists.
in.tftpd
Trivial File Transfer Protocol Daemon. A stripped down version of ftp, used to transfer Solaris 8 kernel plus some extra goodies to the boot clients.The tftp daemon needs to be configured to share the /tftpboot directory (which you may have to create)The tftp daemon included with Solaris 8 (there are many others you could use if you prefer) is run from inetd. It is turned on in a default Solaris 8 install and hence recieves no mention (at least not that I saw...) in Sun's own Jumpstart documentation even though it is essential to the jumpstart process(!?!) Anyhow, if you have disabled the service, adding a line such as this to the file /etc/inet/inetd.conf and restarting the inetd daemon (use /etc/init.d/inetsvc {startstop}) should start it up again:tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboottftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
rpcbind, nfsd, mountd
RPC (Remote Procedure Call) plus the standard NFS Server suite. These services are required to serve out parts of the boot server's filesystem via NFS. The parts that need to be served are the Boot sub-directory of jumpstart-dir. On an Install/Boot server combo machine this is just a sub-directory of the jumpstart-dir which you will already be sharing via NFS. On a stand-alone Boot server this directory is wherever you told the Solaris 8 Jumpstart install scripts to install the boot-only portion of the Jumpstart files. (Basically what you will be serving is the directory tree used as the root filesystem on the install client) Under Solaris 8 these services are started by the rpc and nfs.server init scripts.On Install Server
rpcbind, nfsd, mountd
RPC (Remote Procedure Call) plus the standard NFS Server suite. These services are required to serve out parts of the Install server's filesystem via NFS. What needs to be shared is the jumpstart-dir, ie. where you tell the Solaris 8 Jumpstart install scripts to install to. You must also NFS share the sysidcfg directories where you put the sysidcfg files for your hosts.(One approach is to simply make the sysidcfg dir a subdirectory of the jumpstart-dir so that it is shared along with the jumpstart-dir and thus does not need a seperate dfstab entry, this also serves to put all of your jumpstart files under one directory tree rather than having them all spread out.)Under Solaris 8 these services are started by the rpc and nfs.server init scripts.
Key Files Needed for a Jumpstart InstallOn Boot Server
/etc/ethers, /etc/hosts
in.rarpd uses these files to give out an IP address to the Install Client, hence the install Client must have a valid entry in both of these files for things to work.ethers is a MAC Address to Hostname tablehosts is an IP Address to Hostname tableIn theory it maybe possible to use NIS for these purposes instead of the local flat files but if you want to do things like that you are on your own.
/etc/bootparams
rpc.bootparams uses this file to tell an Install Client where to NFS mount various install directories from. In particular, it tells where the Client should look to mount the 1) root filesystem used during the install, 2) jumpstart directory, 3) sysidcfg directorybootparams is a flat text file which can be edited by hand, there is an extensive manpage describing it's format. Alternately Sun provides two tools called add_install_client and rm_install_client (located in jumpstart-dir/Solaris_8/Tools) which can be used to add and remove entries from /etc/bootparams. I recommend this method becuase it also copies the right files into /tftpboot for the system. See further down for a sample usage of these scripts.
/etc/inet/inetd.conf
The tftp server that comes with Solaris is started from inetd, hence in order to run the in.tftpd daemon (which you need to transfer a boot kernel to the install client) you need to make sure it has a line in the inetd.conf file. The folowing two lines should do the trick if you don't already have any: tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboottftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
/tftpboot/*
There are a handful of files that go in here including a kernel for the Install Client boot. I don't know the specifics of these files because Sun's add_install_client and rm_install_client scripts (located in jumpstart-dir/Solaris_8/Tools) will take care of creating them for you. If any of you ambitious youngsters want crack the code and figure out what all these files are be sure to let me know what you find out!
/etc/dfs/dfstab
Solaris's NFS server config file. Really just a list of share commands that are executed when you run the 'shareall'.This is hardly the place for an NFS tutorial, but here's enough to get you started...On the Boot server you need to share out the Boot subdirectory of the the directory where you told the Solaris 8 Jumpstart install scripts to install to.The directory should be shared read-only with the anon=0 option set (meaning unknown users are given UID=0, sounds dangerous but you are share the FS as read only so it's not so bad) To accomplish this add a line such as this to the /etc/dfstabshare -F nfs -o ro,anon=0 /jumpstart-dir/BootI like to limit access to my local subnet, to do this use a line like this:share -F nfs -o ro=@192.168.1.0,anon=0 /jumpstart-dir/Boot Where 192.168.1.0 is the network address of your subnet. After changing the dfstab run /usr/sbin/unshareall, followed by /usr/sbin/shareall, to share the directories. You can run /usr/sbin/share to see what directories you are currently sharing via NFS.The nfs.server init script can also be used to restart the NFS server daemons and thus propgate your dfstab changes. On Install Server
/etc/dfst/dfstab
Solaris's NFS server config file. Really just a list of share commands that are executed when you run the 'shareall'.This is hardly the place for an NFS tutorial, but here's enough to get you started...On the Install server you need to share out the jumpstart directory, ie the directory where you told the Solaris 8 Jumpstart install scripts to install to.The directory should be shared read-only with the anon=0 option set (meaning unknown users are given UID=0, sounds dangerous but you are share the FS as read only so it's not so bad) To accomplish this add a line such as this to the /etc/dfstabshare -F nfs -o ro,anon=0 /jumpstart-dirI like to limit access to my local subnet, to do this use a line like this:share -F nfs -o ro=@192.168.1.0,anon=0 /jumpstart-dir Where 192.168.1.0 is the network address of your subnet. You also must share out your sysidcfg directory. I recommend making the sysidcfg directory a subdir of the jumpstart-dir, in which case the above lines would export this directory as well (so long as you do not cross filesystems, exporting a parent dir automatically exports all of it's sub-directories. Hence if I NFS export /export/home, a client can legally mount /export/home/scott or even /export/home/scott/Mail) But if you want to put your sysidcfg file somewhere else, you will need another line in the same format as the above sharing this directory as well.After changing the dfstab run /usr/sbin/unshareall, followed by /usr/sbin/shareall, to share the directories. You can run /usr/sbin/share to see what directories you are currently sharing via NFS.The nfs.server init script can also be used to restart the NFS server daemons and thus propgate your dfstab changes.
/jumpstart-dir/rules, /jumpstart-dir/rules.ok
/jumpstart-dir meaning wherever you told the Solaris 8 Jumpstart install scripts to install to. rules is a flat text file containing 'rules' for the install client to use when installing itself. Basically the client looks in the rules file for a rule which matches it's particular hostname, ip address, system architechture (SPARC/x86), etc. When it finds a match it then uses the begin-script, profile, and finish-script listed for that rule to do the system install. The sample rules file that is installed into the /jumpstart-dir by the Jumpstart Server Install scripts documents the options for this file and provides several useful examples. These options are also thoroughly documented in the Sun Solaris 8 Advanced Installation Guide (available online at docs.sun.com or try this direct link)Here's a quick sample rules entry to get you started:any - custom-start.sh core.profile custom-finish.shThis line matches any machine and will install it using the custom-start.sh pre-install script, the profile core.profile and the finish script custom-finish.shrules.ok is the file that is actually used, it is created by first creating a rules file and then running the supplied check script which will varify that all your rules and associated profiles make sense and then produce the rules.ok file. The check script is installed along with the rest of the jumpstart software by the Jumpstart Server Install Scripts and lives directly in the /jumpstart-dir, it takes no arguments and is simply run in the same directory as the rukes and profile files.
/jumpstart-dir/*.profile
The install profiles. These are flat text files that don't actually have to be named by any particular convention, although for sanity's sake '.profile' is my recommended extension.These files are named in the rules.ok file and tell the installer what packages/package clusters to install/remove from the install client, how to format the install client's disks, and what locale to install on the install client. The format of the profile file is pretty straight forward, it is thoroughly documented in the Sun Solaris 8 Advanced Installation Guide (available online at docs.sun.com or try this direct link).Here's a sample profile file to get you started:install_type initial_installsystem_type serverpartitioning explicitfilesys any 2000 /filesys any 1500 swapfilesys any 1500 /varfilesys any 2000 /optgeo N_Americacluster SUNWCreqpackage SUNWgzip addpackage SUNWless addpackage SUNWman addpackage SUNWbash addpackage SUNWtcsh addpackage SUNWzsh add
/sysidcfg-dir/hostname, /sysidcfg-dir/hostname/sysidcfg
/sysidcfg-dir being wherever you decided to put your sysidcfg directories. hostname being the hostname of the install client. One of the bootparams options will point an install client to /sysidcfg-dir/hostname and install client will then use look in this directory for a file named sysidcfg which it will use to complete the System Identification stage of the install.The /sysidcfg-dir must be nfs exported! You can actually use any name you want for the subdirectory, I chose to use the install client's hostname as a convention, and I recommend you do so as well. The important point is that in the bootparams file you point the install client at a directory and it then looks for a file named sysidcfg in that directory, hence you can not simply have a seperate file for each host, you must have a seperate directory containing a unique sysidcfg file for each host. (of course you can use the same sysidcfg file for multiple hosts, but read on to see why you may not want to do that.) The sysidcfg file is a flat text file containing hostname, ip address, name service, locale, IPv6, kerberos, netmask, root password hash, terminal and time service information. It's format and syntax are thoroughly documented in the Sun Solaris 8 Advanced Installation Guide (available online at docs.sun.com or try this direct link).Here's a sample sysidcfg file to get you started:system_locale=en_UStimezone=US/Centralterminal=xtermsname_service=NONEtimeserver=192.168.1.2security_policy=NONEroot_password=PpZsmNrUdbsGknetwork_interface=primary{ hostname=js-testip_address=192.168.1.5netmask=255.255.255.0protocol_ipv6=yes}
How To Setup a Jumpstart ServerStep 1) Install Jumpstart Software
All of the servers and whatnot (eg. nfsd, tftpd, etc) should already be on your system as they are part of the core Solaris 8 system.What's left to install then is the Jumpstart Server software from the Sun Install CD's. At minimum you'll need Solaris 8 Software CD 1 from the Solaris 8 install media kit.Insert the Solaris 8 Software CD 1 into the to-be Install Server and mount it.cd to /mount-point/Solaris_8/ToolsHere you will find the first Solaris 8 Jumpstart Server Install script, it's called: setup_install_serverRun the script with the directory into which you wish to install the Jumpstart Software as it's only argument, eg:./setup_install_server /jumpstart-dirThe destination directory should be empty and should have > 1 gigabyte of freespace available to it.This script basically just copies the contents of the install CD over to your Install Server. If you only want to create a Boot Server you can use the -b option which will only copy over the files required by a Boot Server.To add the contents of the other install CD's to your to-be Install Server (Software CD 2 is HIGHLY recommended, it contains the man page packages!) follow these steps for each CD:Insert the CD into the to-be Install Server and mount itcd to /mount-point/Solaris_8/ToolsHere you will find the secondary Solaris 8 Jumpstart Server Install script, it's called: add_to_install_serverRun this script with the directory into which you wish to install the Jumpstart Software as it's only argument, eg:./add_to_install_server /jumpstart-dir Again this script simple copies over the contents of the CD to your to-be Install Server.Now you need to copy over the check script and the sample profile and rules files into your /jumpstart-dir (actually these files can go in their own directory but that directory would also have to be NFS exported) One nice offshoot of the Jumpstart Server Install scripts just dumping the install CD's onto your Install Server's harddrive is that these files are now already on your Install Server, you've simply got to put copies in the root of your /jumpstart-dir. To do so use cp like this:cp /jumpstart-dir/sparc_8/Solaris_8/Misc/jumpstart_sample/* /jumpstart-dir/.Finally you'll need to setup your sysidcfg directory. To do so, simply choose where you want to put it (I recommend making it a sub-dir of your /jumpstart-dir) and create it, eg.mkdir -p /jumpstart-dir/sysidcfg-dir Step 2) Setup All the Required Server Daemons
Following the directions given above you'll need to make sure your to-be Install Server is running in.tftpd, in.rarpd and nfs sharing it's /jumpstart-dir and /sysidcfg-dir directories.Here's a checklist of what needs to be done to help out
/etc/dfstab must be set to share your jumpstart-dir and sysidcfg-dir
/etc/inet/inetd.conf should be setup to start in.tftpd
/tftpboot should be created
/etc/bootparams should be created (leave empty for now)
rpc services should be (re-)started
nfs server services should be (re-)started When you are done with all of this the following processes should show up in a ps -e:
in.rarpd
rpc.bootparams
rpcbind
nfsd
mountd
inetdStep 3) Setup Install Client
Your install server is more or less good to go now, all that's left is to flesh it out with rules, sysidcfg files, and profiles for your various hosts.Here's a sample walkthrough of adding a dummy Install Client named js-test.Add entries for js-test in the /etc/ethers and /etc/hosts files.Create a sysidcfg directory and file for js-test.Add js-test to /etc/bootparams and install boot files for it in /tftpboot.To do this using the provided add_install_client script follow these stepscd /jumpstart-dir/Solaris_8/Tools./add_install_client -c jumpstart-server:/jumpstart_dir -p jumpstart-server:/sysidcfg-dir/js-test js-test sun4uHere jumpstart-server is the hostname of your Install Server, /jumpstart-dir is your jumpstart-dir, /sysidcfg-dir/js-test is wherever you put the sysidcfg file for the install client, and sun4u is the platform group of the install client (Sparc, UltraSparc, x86)add_install_client has an extensive man page which details all it's options and is well worth reading. Next, you must make sure there is a matching rule in the rules and rules.ok files as well as a corresponding profile for your host.The installer simply uses the first line in rules.ok that matches for your host so be careful with the order of lines in that file.Now drop js-test to the 'ok' prompt, type 'boot net - install' and watch the magic happen!!




That's all folks!!