📄 2.t
字号:
INPUT T{Standard DEC keyboard (LK201) and mouse.T}_MISC T{Battery-backed real time clock,internal and TURBOchannel PMAZ-AA SCSI interfaces.T}.TE.LPMajor items that are not supported include the 5000/240(there is code but not compiled in or tested),R4000 based machines, FDDI and audio interfaces.Diskless machines are not supported but booting kernels and bootstrappingover the network is supported on the 5000 series..Sh 3 "The procedure".PPThe first file on the distribution tape is a tar file that containsfour files.The first step requires a running UNIX (or ULTRIX) system that canbe used to extract the tar archive from the first file on the tape.The command:.DS.ft CWtar xf /dev/rmt0.DEwill extract the following four files:.DSA) root.image: \fIdd\fP image of the root filesystemB) vmunix.tape: \fIdd\fP image for creating boot tapesC) vmunix.net: file for booting over the networkD) root.dump: \fIdump\fP image of the root filesystem.DEThere are three basic ways a system can be bootstrapped corresponding to thefirst three files.You may want to read the section on bootstrapping the HP300since many of the steps are similar.A spare, formatted SCSI disk is also useful..Sh 4 "Procedure A: copy root filesystem to disk".PPThis procedure is similar to the HP300.If you have an extra disk, the easiest approach is to use \fIdd\fP\|(1)under ULTRIX to copy the root filesystem image to the beginningof the spare disk. The root filesystem image includes a disklabel and bootblock along with theroot filesystem.An example command to copy the image to the beginning of a disk is:.DS.ft CWdd if=root.image of=/dev/rz1c bs=\*(Bzb.DEThe actual special file syntax will vary depending on unit numbers andthe version of ULTRIX that is running.This system is now ready to boot. You can boot the kernel with one of thefollowing PROM commands. If you are booting on a 3100, the disk must be SCSIid zero because of a bug..DS.ft CWDEC 3100: boot \-f rz(0,0,0)vmunixDEC 5000: boot 5/rz0/vmunix.DEYou can then proceed to section 2.5to create reasonable disk partitions for your machineand then install the rest of the system..Sh 4 "Procedure B: bootstrap from tape".PPIf you have only a single machine with a single disk,you need to use the more difficult approach of booting akernel and mini-root from tape or the network, and using it to restorethe root filesystem..PPFirst, you will need to create a boot tape. This can be done using\fIdd\fP as in the following example..DS.ft CWdd if=vmunix.tape of=/dev/nrmt0 bs=1bdd if=root.dump of=/dev/nrmt0 bs=\*(Bzb.DEThe actual special file syntax for the tape drive will vary depending onunit numbers, tape device and the version of ULTRIX that is running..PPThe first file on the boot tape contains a boot header, kernel, andmini-root filesystem that the PROM can copy into memory.Installing from tape has only been testedon a 3100 and a 5000/200 using a TK50 tape drive. Here are two examplePROM commands to boot from tape..DS.ft CWDEC 3100: boot \-f tz(0,5,0) m # 5 is the SCSI id of the TK50DEC 5000: boot 5/tz6 m # 6 is the SCSI id of the TK50.DEThe `m' argument tells the kernel to look for a root filesystem in memory.Next you should proceed to section 2.4.3 to build a disk-based root filesystem..Sh 4 "Procedure C: bootstrap over the network".PPYou will need a host machine that is running the \fIbootp\fP server with the.Pn vmunix.netfile installed in the default directory defined by theconfiguration file for.Xr bootp .Here are two example PROM commands to boot across the net:.DS.ft CWDEC 3100: boot \-f tftp()vmunix.net mDEC 5000: boot 6/tftp/vmunix.net m.DEThis command should load the kernel and mini-root into memory andrun the same as the tape install (procedure B).The rest of the steps are the same exceptyou will need to start the network(if you are unsure how to fill in the <name> fields below,see sections 4.4 and 5).Execute the following to start the networking:.DS.ft CW# mount \-uw /# echo 127.0.0.1 localhost >> /etc/hosts# echo <your.host.inet.number> myname.my.domain myname >> /etc/hosts# echo <friend.host.inet.number> myfriend.my.domain myfriend >> /etc/hosts# ifconfig le0 inet myname.DENext you should proceed to section 2.4.3 to build a disk-based root filesystem..Sh 3 "Label disk and create the root filesystem".LPThere are five steps to create a disk-based root filesystem..IP 1)Label the disk..DS.ft CW# disklabel -W /dev/rrz?c # This enables writing the label# disklabel -w -r -B /dev/rrz?c $DISKTYPE# newfs /dev/rrz?a\&...# fsck /dev/rrz?a\&....DESupported disk types are listed in.Pn /etc/disktab ..IP 2)Restore the root filesystem..DS.ft CW# mount \-uw /# mount /dev/rz?a /a# cd /a.DE.ti +0.4iIf you are restoring locally (procedure B), run:.DS.ft CW# mt \-f /dev/nrmt0 rew# restore \-xsf 2 /dev/rmt0.DE.ti +0.4iIf you are restoring across the net (procedure c), run:.DS.ft CW# rrestore xf myfriend:/path/to/root.dump.DE.ti +0.4iWhen the restore finishes, clean up with:.DS.ft CW# cd /# sync# umount /a# fsck /dev/rz?a.DE.IP 3)Reset the system and initialize the PROM monitor to boot automatically..DS.ft CWDEC 3100: setenv bootpath boot \-f rz(0,?,0)vmunixDEC 5000: setenv bootpath 5/rz?/vmunix -a.DE.IP 4)After booting UNIX, you will need to create.Pn /dev/mouseto run X windows as in the following example..DS.ft CWrm /dev/mouseln /dev/xx /dev/mouse.DEThe 'xx' should be one of the following:.DSpm0 raw interface to PMAX graphics devicescfb0 raw interface to TURBOchannel PMAG-BA color frame bufferxcfb0 raw interface to maxine graphics devicesmfb0 raw interface to mono graphics devices.DEYou can then proceed to section 2.5 to install the rest of the system.Note that where the disk name ``sd'' is used throughout section 2.5,you should substitute the name ``rz''..Sh 2 "Disk configuration".PPAll architectures now have a root filesystem up and running andproceed from this point to layout filesystems to make useof the available space and to balance disk load for better systemperformance..Sh 3 "Disk naming and divisions".PPEach physical disk drive can be divided into up to 8 partitions;UNIX typically uses only 3 or 4 partitions.For instance, the first partition, \*(Dk0a,is used for a root filesystem, a backup thereof,or a small filesystem like,.Pn /var/tmp ;the second partition, \*(Dk0b,is used for paging and swapping; anda third partition, typically \*(Dk0e,holds a user filesystem..PPThe space available on a disk varies per device.Each disk typically has a paging area of 30 to 100 megabytesand a root filesystem of about 17 megabytes..\" XXX checkThe distributed system binaries occupy about 150 (180 with X11R5) megabytes.\" XXX checkwhile the major sources occupy another 250 (340 with X11R5) megabytes.The.Pn /varfilesystem as delivered on the tape is only 2Mb,however it should have at least 50Mb allocated to it just fornormal system activity.Usually it is allocated the last partition on the diskso that it can provide as much space as possible to the.Pn /var/usersfilesystem.See section 2.5.4 for further details on disk layouts..PPBe aware that the disks have their sizesmeasured in disk sectors (usually 512 bytes), while the UNIX filesystemblocks are variable sized.If.Sm BLOCKSIZE=1kis set in the user's environment, all user programs reportdisk space in kilobytes, otherwise,disk sizes are always reported in units of 512-byte sectors\**..FSYou can thank System V intransigence and POSIX duplicity forrequiring that 512-byte blocks be the units that programs report..FEThe.Pn /etc/disktabfile used in labelling disks and making filesystemsspecifies disk partition sizes in sectors..Sh 3 "Layout considerations".PPThere are several considerations in deciding howto adjust the arrangement of things on your disks.The most important is making sure that there is adequate spacefor what is required; secondarily, throughput should be maximized.Paging space is an important parameter.The system, as distributed, sizes the configuredpaging areas each time the system is booted. Further,multiple paging areas of different sizes may be interleaved..PPMany common system programs (C, the editor, the assembler etc.)create intermediate files in the.Pn /tmpdirectory, so the filesystem where this is stored also should be madelarge enough to accommodate most high-water marks.Typically,.Pn /tmpis constructed from a memory-based filesystem (see.Xr mount_mfs (8)).Programs that want their temporary files to persistacross system reboots (such as editors) should use.Pn /var/tmp .If you plan to use a disk-based.Pn /tmpfilesystem to avoid loss across system reboots, it makessense to mount this in a ``root'' (i.e. first partition)filesystem on another disk.All the programs that create files in.Pn /tmptake care to delete them, but are not immune to rare eventsand can leave dregs.The directory should be examined every so often and the oldfiles deleted..PPThe efficiency with which UNIX is able to use the CPUis often strongly affected by the configuration of disk controllers;it is critical for good performance to balance disk load.There are at least five components of the disk load that you candivide between the available disks:.IP 1)The root filesystem..IP 2)The.Pn /varand.Pn /var/tmpfilesystems..IP 3)The.Pn /usrfilesystem..IP 4)The user filesystems..IP 5)The paging activity..LPThe following possibilities are ones we have used at timeswhen we had 2, 3 and 4 disks:.TScenter doublebox;l | c s sl | lw(5) | lw(5) | lw(5). diskswhat 2 3 4_root 0 0 0var 1 2 3usr 1 1 1paging 0+1 0+2 0+2+3users 0 0+2 0+2archive x x 3.TE.PPThe most important things to consider are toeven out the disk load as much as possible, and to do this bydecoupling filesystems (on separate arms) between which heavy copying occurs.Note that a long term average balanced load is not important; it ismuch more important to have an instantaneously balancedload when the system is busy..PPIntelligent experimentation with a few filesystem arrangements canpay off in much improved performance. It is particularly easy tomove the root, the.Pn /varand.Pn /var/tmpfilesystems and the paging areas. Place theuser files and the.Pn /usrdirectory as space needs dictate and experimentwith the other, more easily moved filesystems..Sh 3 "Filesystem parameters".PPEach filesystem is parameterized according to its block size,fragment size, and the disk geometry characteristics of themedium on which it resides. Inaccurate specification of the diskcharacteristics or haphazard choice of the filesystem parameterscan result in substantial throughput degradation or significantwaste of disk space. As distributed,filesystems are configured according to the following table..DS.TScenter;l l l.Filesystem Block size Fragment size_root 8 kbytes 1 kbytesusr 8 kbytes 1 kbytesusers 4 kbytes 512 bytes.TE.DE.PPThe root filesystem block size ismade large to optimize bandwidth to the associated disk.The large block size is important as many of the mostheavily used programs are demand paged out of the.Pn /bindirectory.The fragment size of 1 kbyte is a ``nominal'' value to usewith a filesystem. With a 1 kbyte fragment sizedisk space utilization is about the sameas with the earlier versions of the filesystem..PPThe filesystems for users have a 4 kbyte blocksize with 512 byte fragment size. These parametershave been selected based on observations of theperformance of our user filesystems. The 4 kbyteblock size provides adequate bandwidth while the512 byte fragment size provides acceptable space compactionand disk fragmentation..PPOther parameters may be chosen in constructing filesystems,but the factors involved in choosing a blocksize and fragment size are many and interact in complexways. Larger block sizes result in betterthroughput to large files in the filesystem aslarger I/O requests will then be done by thesystem. However,consideration must be given to the average file sizesfound in the filesystem and the performance of theinternal system buffer cache. The systemcurrently provides space in the inode for12 direct block pointers, 1 single indirect blockpointer, 1 double indirect block pointer,and 1 triple indirect block pointer.If a file uses only direct blocks, access time toit will be optimized by maximizing the block size.If a file spills over into an indirect block,increasing the block size of the filesystem maydecrease the amount of space usedby eliminating the need to allocate an indirect block.However, if the block size is increased and an indirectblock is still required, then more disk space will beused by the file because indirect blocks are allocatedaccording to the block size of the filesystem..PPIn selecting a fragment size for a filesystem, at leasttwo considerations should be given. The major performancetradeoffs observed are between an 8 kbyte block filesystemand a 4 kbyte block filesystem. Because of implementationconstraints, the block size versus fragment size ratio can notbe greater than 8. This means that an 8 kbyte filesystemwill always have a fragment size of at least 1 kbytes. Ifa filesystem is created with a 4 kbyte block size and a1 kbyte fragment size, then upgraded to an 8 kbyte block sizeand 1 kbyte fragment size, identical space compaction will be
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -