On 2009-08-12, Antonio Manuel Ciampi <> wrote:
> I read somewhere that is possible dedicate a specific part of the HD to
> some activity, is it true - Solaris 10 - where could I find some help.
> many thanks
Yes -- it is possible. But assuming that you have only one
disk, it pretty much has to be done at install time. You need to
partition the disk, allocating various parts of it to various uses.
Here is how I have the 146 GB boot disk on a Sun Fire 280R partitioned
with an older version of Solaris 10:
================================================== ====================
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 3.9G 230M 3.7G 6% /
/dev/dsk/c1t0d0s3 16G 4.0G 12G 26% /var
/dev/dsk/c1t0d0s4 16G 4.9G 11G 32% /usr
/dev/dsk/c1t0d0s5 16G 6.7G 8.9G 44% /opt
/dev/dsk/c1t0d0s7 60G 61M 59G 1% /dumps
/dev/dsk/c1t0d0s6 16G 1.3G 14G 9% /usr/local
================================================== ====================
What you don't see in that is the partition /dev/dsk/c1t0d0s1
which is dedicated to swap space. Now -- I was rather generous with the
partition sizes, especially looking at the root partition '/'.
And /dev/dsk/c1tt0d0s2 represents the whole disk, and is
normally not used as a mountable filesystem.
Now -- if you have two *identical* disks, you can install the
more recent versions of Solaris 10 with zfs handling the partitioning,
and you can change that on the fly after the system is running. But you
have two identical disks -- one mirroring the other -- to allow booting
from either if the other fails. I have a couple of systems built this
way too -- and I can get away with a pair of 73 GB drives and not worry
because the disk space comes dynamically out of a single pool.
"zpool status" shows the following:
================================================== ====================
pool: root-pool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
root-pool ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0
c1t2d0s0 ONLINE 0 0 0
errors: No known data errors
================================================== ====================
and "zfs list" shows this:
================================================== ====================
NAME USED AVAIL REFER MOUNTPOINT
root-pool 42.1G 23.4G 94K /root-pool
root-pool/ROOT 12.7G 23.4G 18K legacy
root-pool/ROOT/s10s_u7wos_08 12.7G 23.4G 11.9G /
root-pool/ROOT/s10s_u7wos_08/var 824M 23.4G 824M /var
root-pool/dump 8.00G 23.4G 8.00G -
root-pool/export 38K 23.4G 20K /export
root-pool/export/home 18K 23.4G 18K /export/home
root-pool/local-workplace 11.9G 23.4G 11.9G /local-workplace
root-pool/swap 8G 29.8G 1.53G -
root-pool/usr-local 1.48G 23.4G 1.48G /usr/local
================================================== ====================
This is ignoring zfs raidz2 (double parity RAID-5) pools present on both
systems as other disks external to the computer chassis.
But assuming that you are working with a single disk, you need
to partition it manually instead of accepting the defaults offered by
the installation scripts. And to do that, you need to know where the
disk usage occurs in these systems.
Note that /local-workplace is only needed if you do a lot of
program compilation specific to a given system, and is something which I
added myself. /usr/local is a place where a lot of net sourced programs
will install, but those already pre-compiled using the _Software
Companion_ CD-ROM will get installed in /opt/sfw instead.
I'll assume that you already have Solaris 10 installed, so you
can print out the man pages for format (which includes the ability to
partition the systems). And while looking at it, see how much of each
filesystem is in use ("df -h" is a good way, and what I usually use.
The "-h" option prints in human-friendly terms -- MB, GB, or even KB, so
you don't have to count digits to see how large something really is.
Be sure to leave lots of extra space in /var, because that grows
every time you install a package, and logfiles grow in there too.
Leave lots of space in /opt, since that gets expanded with a lot
of package installations.
I like extra elbow room in /, since under some conditions, /tmp
won't be a RAM-disk backed by the swap space, and you may need to edit
something large to recover a damaged system. /export (if you export
filesystems) probably should have lots of room, especially for
/export/home. My user home directories come from another system with
different naming.
But find out how much space you need for the existing
partitions. If /var is not already a separate partition, *make* it one,
as some security holes are built on the ability to create links from
things like /etc/passwd and /etc/shadow to somewhere in /var where other
programs can write as root. Symbolic links don't create as much of a
security hole.
Once you know how much space is needed for everything, then
re-install Solaris 10. (Back up anything important from the current
installation if you have already been doing things with the system).
Manually partition the disk and specify a mount point which
follows some name which makes sense for your intended use of it. On
some systems, I mount a separate partition on /var to run a web server,
so the server does not have access to other critical parts of /var.
Or -- if you have the ability to add another disk or several to
the system, you can partition such disks before you start using them
from the existing system and not have to re-install. Just get it right,
as it is a pain to re-partition -- you have to back up all partitions on
that disk before re-partitioning, because you will lose the data when
you have to create new filesystems after the repartitioning. Or -- use
zfs, which allows you to manipulate these things on the fly.
Good Luck,
DoN.
--
Email: <> | Voice (all times): (703) 938-4564
(too) near Washington D.C. |
http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---