Display Magnified Output S:SRC961126003750 B:326467 I:LOAN PRICING CORPERATION U:NEW YORK R:NY C:NORMAN MASON A:1032171 T:(212)4895455 P:customer has new system, how to configure addtional disks N:0001 \+----------------------- Beginning of Screener's Text -----------------------+ \V3.2G UNIX NEEDS CONFIG ON BOOT DISK X22987KT \+--------------------------- End of Screener's Text --------------------------+ prob: 1) customer has new system, needs to partition and mount additional system disks. not Digital Unix literate, not at system sol: 1) faxed following to (212) 765-4983 (extracted from Sri's articles) R.J. Riha ---------------------------------------------------------------------------- Helpful UNIX disk management techniques: Finding your SCSI disks/tapes from active system: ================================================= # /sbin/scu scu> show edt If you see a device Direct Access - a disk Sequential Access - a tape Read-only Direct Access - a CD-ROM Note: You won't be able to see some RAID devices here because they might be presented as non-SCSI type devices to the operating system (such as swxcr based raid devices). scu> quit # Finding your SCSI disks/tapes from hardware prompt: =================================================== # init 0 !Shutdown system >>> show devices DKA0 ^^^^ ||||-------drive number on bus (first on bus 0 here) |||---------------letter signifys bus number (a=bus 0, b=bus 1) ||---------2 letters signify drive type (DK=RZ,DR=Raid,TK=tape >>> boot # Calculate device number for your disk: ====================================== Bus * 8 + target Suppose if the disks of your interest are Bus: 0, Target: 0, Lun: 0, Device Type: Direct Access Bus: 1, Target: 2, Lun: 0, Device Type: Direct Access The first disk has (0*8 + 0) = 0 as the device number, so the disk is rz0 The second disk has (1*8 + 2) = 10 as the device number, so the disk is rz10 Making device files: =================== # cd /dev # ./MAKEDEV rz10 (for SCSI disk) # ./MAKEDEV re0 (for RAID disk, note that you won't see many types of internal controller based RAID disks using the scu utility!, you might have to boot from /genvmunix and watch for boot up messages) # ./MAKEDEV tz5 (for SCSI tape) Making sure that system sees those devices ======================================== # cd /dev SCSI disks/SCSI floppies/CD-ROMs: --------------------------------- Using the command similar to the following you can also figure out which disks physically corresponds to what devices on the system. # file rrz*c /dev/rrz0c: character special (8/2) SCSI #0 RZ28 disk #0 (SCSI ID #0) (Yes, you have a SCSI disk at rz0) swxcr based RAID disks: ----------------------- # file rre*c /dev/rre0c: character special (44/2) eisa #0 SWXCR disk #0 (Yes, you have a SWXCR based RAID disk at re0) /dev/rre7c: character special (44/450) eisa #0 SWXCR disk #7 offline (You don't have a SWXCR based RAID disk at re7) /dev/rre8c: character special (44/514) (You don't have a SWXCR based RAID disk at re8) Tape devices: ------------- # file rmt*h rmt0h: character special (9/5122) SCSI #0 TLZ6 tape #40 (SCSI ID #5) offline rmt1h: character special (9/515074) (You have a TLZ6 tape at rmt0h and nothing at rmt1h) How to tackle disklabel'ing in Digital Unix (formerly OSF/1) ============================================================ Please exercise caution in executing the commands as listed in the steps 2 and 3 below as you might lose the data if you change the partition sizes without backing up that disk. If you have a new disk to be installed you can follow the steps 1 and 2. A typical SWXCR based RAID disks being referenced as re0., re1 etc., they can be treated similar to regular disks., but they need to be assinged generic disklabel. 1) How to read the disklabel on the disk rz4? # /sbin/disklabel -r /dev/rrz4c (Note: disklabel utility needs that the partition be started at offset "0" to open it. If the partition "c" and/or "a" is not starting at offset "0" you will get an error similar to "Bad pack magic number (label is damaged, or pack is unlabeled)" or "partition "?" doesn't start at offset "0". If you get such an error you keep on trying the partitions rrz4a thru rrz4h) 2) If you are creating a new disk-label: # /sbin/disklabel -rw rz4 rzxx (Note: If you know the disk type such as "rz28" or "rz29b" etc., you would replace "rzxx" with "rz28" or "rz29b" respectively. If you don't know the disk type you can use /sbin/scu utility to find that out. If the disk is not among one of the types that are present in the /etc/disktab file., you need to just keep "rzxx" as it is and it would install a generic disklabel on that disk (third-party disks are generic, but probably a few exceptions!). A disk on HSZ40 array controller assumes a "HSZ40" disk type. You can NOT use the underlying disk's (such as rz28 or rz29 etc) /etc/disktab entry any longer. You can use this command if you are installing a new disk on your system. Make sure you are NOT doing this command on an existing disk that has pre-defined swap/file-system/ database on them) 3) How to erase a disklabel: # /sbin/disklabel -z rz4 NOTE: You should backup all your partitions that have data before you attempt to change the partition sizes because you might lose the data on that disk. 4) How to change the existing disklabel: # /sbin/disklabel -e rz4 You change only the "size" and "offset" values and to have the partitions of your custom configuration set up. If you want to use multiple partitions make sure that after writing/saving the disklabel., you can read it back again and make sure that the cylender groups (Cyl. 0 - 82*, etc) don't overlap for the partitions of your configuration. How to run newfs on the disk: ============================= Once you have added added/edited the right disklabel information., you need to run newfs (if your plan to run regular Unix file system) on the partition you wish: Example: newfs /dev/rz4c After that try mounting that disk on a mount point such as /mnt mount -t ufs /dev/rz4c /mnt !ufs disk mount -t ufs -r /dev/rz5c /usr/cdrom !ufs cdrom mount -t advfs usr_domain#usr /usr !advfs mount -t cdfs -r /dev/rrz5c /usr/cdrom !non-ufs formatted cdrom, needs cdfs kernel option If all these steps works you can decide finally on what directory you need to mount it on and placing an entry in the /etc/fstab using your favorite unix editor (ed,vi,emacs...) Sample /etc/fstab entries: -------------------------- /dev/rz0a / ufs rw 1 1 !ufs usr_domain#usr /usr advfs rw,userquota,groupquota !advfs /dev/rz0b swap1 ufs sw 0 2 !swap /dev/rz4c /usr/cdrom cdfs ro 0 0 !cd (non ufs) NOTE: Please note that this doesn't describe on how to put proper entries in the kernel-configuration file. You need to get to your system adminitration manual for a complete reference. NOTE: Some times "/sbin/scu" will not show some additional SCSI controllers that you may have on the system, thus you can't get information about the devices on that contoller. To see that new controller, you need to boot from the generic kernel "genvmunix" as follows: At firmware console prompt: >>> boot -fi genvmunix NOTE: "disklabel -r rz4" is interpreted as "disklabel -r /dev/rrz0a" ADDITIONAL TAPE INFORMATION: ============================ Typically rmt0h stands for rewind magnetic tape number 0 with high density. Similarly, nrmt0h means no rewind magnetic tape number 0 with high density. If for some reason if you want to back up with no-compression at tape hardware level., use the rmt#a or nrmt#a device (# stands for a number > 0) For compatibility with third party systems., the nice way to back-up is using the command similar to following: tar cvf - FILE_SETS | dd of=/dev/nrmt0a To restore on the third party system: dd if=TAPE_DEVICE | tar xvf - DISK CATCHES: ============= Typically Digital UNIX doesn't like having a swap partition starting within first 16 blocks. So, avoid having the starting 16 blocks of the disk in a swap partition. Its better to keep the offset of partitions "a" and "c", always "0". Also, never try changing the size of partition "c". NOTE: ===== To find about some useful boot time messages: (such as operating system/firmware revisions, amount of memory and list of devices etc..) # /usr/sbin/uerf -R -r 300 | more