Once the disk has been physically installed, the system should detect the device that a new device is available on the SCSI bus. After the power to the system has been restored, press the Esc key to get to the Boot PROM prompt where Boot_Admin> is offered. At the Boot_Admin> prompt, type search:
This will return the list of scsi devices:Boot_Admin> search [return]
After verifying the disk drive is detected by the Boot PROM, continue the initialization sequence by entering boot. When the boot process has completed, ensure that the drive was detected by the kernel by reviewing the kernel messages in /var/adm/syslog/syslog.log. They should look somewhat similar to the following:Device Path Device Type ---------------- ----------------- scsi.6.0 HP C2247 scsi.2.0 TOSHIBA CD-ROM XM-340ITA
This system located three disk drives on controller 0 located at the controller device address 1 and at SCSI IDs 0, 1 and 6. Additionally, the command /usr/sbin/ioscan may be run to show further information about the disk drives detected.Mar 19 15:21:47 bud vmunix: 2/0/1.0 tgt Mar 19 15:21:47 bud vmunix: 2/0/1.0.0 sdisk Mar 19 15:21:47 bud vmunix: 2/0/1.1 tgt Mar 19 15:21:47 bud vmunix: 2/0/1.1.0 sdisk Mar 19 15:21:47 bud vmunix: 2/0/1.6 tgt Mar 19 15:21:47 bud vmunix: 2/0/1.6.0 sdisk
If the disk device is not found, determine if the device driver needed for the disk and interface are available. If any necessary device driver is absent from the kernel, the kernel will need to be rebuilt incorperating the new driver.# /usr/sbin/ioscan -C disk H/W Path Class Description =========================================== 2/0/1.0.0 disk HP C2247 2/0/1.1.0 disk HP C2247 2/0/1.6.0 disk SEAGATE ST31200N
Here is a brief overview of the steps to rebuild a kernel.
# cd /stand/build # /usr/lbin/sysadm/system_prep -v -s system
The new kernel /stand/build/vmunix_test is created# /usr/sbin/mk_kernel -s system
# mv /stand/system /stand/system.old # mv /stand/vmunix /stand/vmunix.old # mv /stand/build/system /stand/system # mv /stand/build/vmunix_test /stand/vmunix
A disk is usually divided into file systems, areas that can hold files, or raw data areas such as swap. File systems are created in disk partitions or logical volumes. To view the size of the drive to be configured use the command, diskinfo.
Though HP-UX does support standard (BSD) style filesystems, it is recommended that the logical volume manager (LVM) be used because of the following reasons.# /usr/sbin/diskinfo /dev/rdsk/c0t6d0 SCSI describe of /dev/rdsk/c0t6d0: vendor: HP product id: C3324A type: direct access size: 1025730 Kbytes bytes per sector: 512
More recommended reading about LVM is availbable in the Logical Volume White paper.
The newfs command has been updated, from the 9.x version, to prompt for disk specific information, thereby overriding the information directives found in the, now obsolete, /etc/disktab file.# mediainit /dev/rdsk/c0t1d0
# newfs -F hfs /dev/rdsk/c0t5d0 mkfs (hfs): Warning - 121 sector(s) in the last cylinder are not allocated. mkfs (hfs): /dev/rdsk/c0t5d0 - 990071 sectors in 2947 cylinders of 12 tracks, 28 sectors 1013.8Mb in 185 cyl groups (16 c/g, 5.51Mb/g, 832 i/g) Super block backups (for fsck -b) at: 16, 5424, 10832, 16240, 21648, 27056, .....
In either case pvcreate needs to run to initializes the device (a raw disk device) for use as a physical volume in a volume group.
Then to create a new volume group, the directory /dev/vg01 with the character special file called group, execute vgcreate.# pvcreate /dev/rdsk/c0t5d0 Physical volume "/dev/rdsk/c0t5d0" has been successfully created.
Note that the last argument to the mknod command must be unique for each volume group that exists on the system.#mkdir /dev/vg01 #mknod /dev/vg01/group c 64 0x010000 # vgcreate /dev/vg01 /dev/dsk/c0t5d0 Volume group "/dev/vg01" has been successfully created. Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
Otherwise, to add or extend an existing volume group, executed vgextend.
Utililizing the increased disk space in the volume group, create a single or multiple logical volumes that will contain filesystems. In this example a single logical volume and file system of 1 gigabyte is created.# vgextend /dev/vg00 /dev/dsk/c0t5d0 Volume group "/dev/vg00" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvcreate -L 1000 /dev/vg00 Logical volume "/dev/vg00/lvol9" has been successfully created with character device "/dev/vg00/rlvol9". Logical volume "/dev/vg00/lvol9" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # newfs -F hfs /dev/vg00/rlvol9 mkfs (hfs): Warning - 608 sector(s) in the last cylinder are not allocated. mkfs (hfs): /dev/vg00/rlvol9 - 1024000 sectors in 1642 cylinders of 16 tracks, 39 sectors 1048.6Mb in 103 cyl groups (16 c/g, 10.22Mb/g, 1600 i/g) Super block backups (for fsck -b) at: 16, 10040, 20064, 30088, 40112, ....
Mount the filesystem using the command /usr/sbin/mount -a. Check the mount table to ensure the partition was mounted and check the filesystem size with the /usr/bin/bdf command./dev/vg00/lvol9 /usr/local hfs defaults 0 2
For more optional information about HP-UX filesystems, HFS, please review the HP-UX 10.0 HFS File System White Paper.# mount -a # mount / on /dev/vg00/lvol1 defaults on Thu May 23 08:10:01 1996 /var on /dev/vg00/lvol8 defaults on Thu May 23 08:10:14 1996 /usr on /dev/vg00/lvol7 defaults on Thu May 23 08:10:15 1996 /tmp on /dev/vg00/lvol6 defaults on Thu May 23 08:10:15 1996 /opt on /dev/vg00/lvol5 defaults on Thu May 23 08:10:15 1996 /home on /dev/vg00/lvol4 defaults on Thu May 23 08:10:15 1996 /usr/local on /dev/vg00/lvol9 defaults on Thu May 23 08:37:17 1996 # bdf /usr/local Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol9 1001729 9 901547 0% /usr/local
Terms used: disk drive.