Separate /usr/spool partition possible?

Gary Heston gary at sci34hub.UUCP
Thu Nov 29 04:56:40 AEST 1990


In article <145 at raysnec.UUCP> shwake at raysnec.UUCP (Ray Shwake) writes:
>rob at xyzoom.info.com (Rob Lingelbach) writes:
>
>>I am about to start a bbs under ISC 2.2, and I only have 2 filesystem
>>partitions, / and /usr.  I am concerned about fragmentation, and want
>>to move my news SPOOLDIR out of /usr, and have the bbs file area there
>>as well.  

>	I wouldn't worry about fragmentation under ISC 2.2; its FFS
>	does an excellent job keeping it to a minimum. In any event,
>	except for the binaries and data files (esp. if using nn, for
>	example) most News data is found in small files anyway, so
>	fragmentation is not so critical an issue.

It's not critical, unless directories get too big (like > 10,000 blocks
for the directory entry [not the contents]). Then, your throughput
goes thru the floor like you wouldn't believe. Imagine a ls -al that
doesn't come back in 5 minutes....

>>If it's permissible, I intend to back up the system, then reinstall,
>>creating 3 partitions, /, /usr, and /usr/spool.  Then restore
>>(hopefully files from the old /usr/spool/ will go into the new
>>/usr/spool/).

>	Technically speaking, you don't "create" such partitions. Rather,
>	you create filesystems and simply "mount" them at specified points
>	in the root hierarchy.

Bzzzztt. Partitions are created, then filesystems are initialized into
them. mkpart and mkfs are the respective instructions.

For the benefit of anybody interested, I'm attaching my partition-
juggling cheat sheet. I've set up separate /usr and /usr/spool
partitions here to try and improve performance (cuts down on
seek activity when they're on separate drives). It's not hard, and
if you are using multiple drives, you don't have to back up/restore.
I recommend you back up anyway, as a precaution. mkpart and mkfs are
more final than rm -r *, and faster.

I assembled this over the last couple of years while learning system
administration. I have no objection to anyone propagating this further,
so long as authorship is attributed to me. Inclusion in the FAQ would
be fine with me. It's been used with ISC 1.0.6, 2.0.2, and 2.2 with
no problems. BE CAREFUL, though.

========================== cut here =================================

Garys' partitioning cheatsheet, by Gary Heston. Use at your own risk.

Starting from maintenance mode, with the new drive in place and jumpered:

Edit the /etc/partition file. Note that the start and size values are in
blocks. Make sure you change the "disk#" entry.

Edit /etc/fstab to include names for the new partitions

At this point, nothing has been done to the disc. The next steps will
destroy data, so BE CAREFUL!!!

For each defined partition on the drive, execute the following command:

	mkpart -P (partition name) disk(#)

  where partition name is what was defined in /etc/partitions and # is the
zero-based drive number (for example, partition pb on drive 1 would be
written as  mkpart -P pb disk1 ). NOTE: mkpart executed on disk0 should be
done with extreme caution, as you can destroy any boot capability if you
accidentally overwrite your root partition.

  Next, a file structure must be made for each partition. This is done with
the mkfs command, as follows:

	mkfs /dev/dsk/1s1 101395(:20000)

  where 1s1 is the partition device name, the big number is the size entry
from /etc/partitions and the option in parenthesis is an inode value. Once
more, be careful when working on drive 0 partitions.

  Now, create a directory entry for each of the file structures in the root
directory. This is necessary for the system to have a place to mount the
file structures, and allows access without using the long device name.

  The /etc/fstab file must be edited with an entry for each new partition
added. There should already be entries for all the drive 0 file structures,
which can be used as models for the new ones. They'll look like this:

	/dev/dsk/0s3 /u
	/dev/dsk/0s4 /usr2      # existing drive 0 structures
	/dev/dsk/1s1 /m         # new entries for three structures on
	/dev/dsk/1s2 /e         # drive 1.
	/dev/dsk/1s3 /a

After all the partitions are made, and the file systems created, do a
mountall and a umountall as a test to verify that they will mount/unmount
properly, then repeat that to make sure. If the partitions come up as
corrupted, but do not show any errors after the fsck, check for duplicate
partition names or incorrect data in /etc/partitions.

The final step is to label each partition with labelit:

	labelit /dev/dsk/(partition device) (name) (NAME)

  where the partition device is of the form (drive)s(number)  (the first
partition of drive 1 would be 1s1, drive 0 root partition would be 0s0,
partition 4 of drive 2 would be 2s4, etc..... (name) and (NAME) are lower-
and upper-case entries of the partition name from /etc/partitions. To label
the second partition on drive 1 as pq, the command would be  labelit
/dev/dsk/1s1 pq PQ  (remember that numbering is zero-based--the first
partition would be /dev/dsk/1s0 )

========================== cut here, too ==============================

Enjoy. But (once again) BE CAREFULL!!

-- 
Gary Heston System Mismanager and technoflunky uunet!sci34hub!gary or
My opinions, not theirs.  SCI Systems, Inc.     gary at sci34hub.sci.com
  The sysadmin sees all, knows all, and doesn't tell the boss who's
  updating their resumes....  This .sig Copyright G. L. Heston, 1990



More information about the Comp.unix.sysv386 mailing list