DYNIX/ptx V4.5.1 and Layered Products Software Installation Release Notes: Increase the Size of the Root Partition


Appendix C
Increase the Size of the Root Partition

If your root partition is smaller than 2GB, you will need to increase its size before upgrading to DYNIX/ptx V4.5. Use the procedure appropriate for your system:


Systems With ptx/SVM Installed

To increase the size of the root partition, complete the following steps:

  1. Select a disk to use as the alternate root. The disk must be an unused local disk.

  2. Create a custom VTOC for the disk. The /etc/vtoc directory contains the default VTOCs for each disk type. You can use the default VTOC or the VTOC currently on the alternate disk as the starting point. To use the current VTOC, use the prtvtoc command to make a copy of the VTOC:

    # /etc/prtvtoc sdX > /etc/vtoc/newname

    Use the following guidelines when modifying the VTOC:

    You can modify the VTOC file manually or with ptx/ADMIN (use System Administration -> Disk Drive Management -> Create a Custom VTOC File).

  3. Install the VTOC on the alternate disk and create the partition driver. You can do this with ptx/ADMIN or manually.

    ptx/ADMIN: use System Administration -> Disk Drive Management -> Create a VTOC File

    Manually: enter the following commands:

    # mkvtoc -s /etc/vtoc/newname sdX disk_type
    # /etc/devbuild vtoc /dev/rdsk/sdX
  4. Force ptx/SVM to see the changes to the disk configuration:

    # vxdctl enable
  5. Initialize the disk and add it to the rootdg disk group:

    # vxdisk init sdXs0
    # vxdg -g rootdg adddisk sdXs0
  6. Create a mirror of the ROOTVOL on the alternate root disk:

    # vxassist -g rootdg mirror ROOTVOL sdXs0

    This operation takes several minutes. The following message may appear; it can be ignored.

    vxbootsetup: NOTE: Root file system is not defined on a volume.
    
  7. Break off the plex you just mirrored. In the example, the plex is named ROOTVOL-01.

    # sync; sync; vxplex dis ROOTVOL-01 
  8. Remove this plex and its subdisk from the rootdg record:

    # vxedit -r rm ROOTVOL-01
  9. Remove the disk media record from the rootdg:

    # vxdg rmdisk sdXs0
  10. Run fsck on the filesystem:

    # fsck -y /dev/rdsk/sdXs0
  11. Expand the filesystem:

    # exfs -F [filesystem_type] /dev/rdsk/sdXs0 partition_0_size
  12. Run fsck again:

    # fsck -y /dev/rdsk/sdXs0
  13. Mount the partition to be used for the install as /mnt:

    # /etc/mount /dev/dsk/sdXs0 /mnt

You can now perform the upgrade. For NUMA-Q systems, go to "Install Software With the ALT DISK DELTA Procedure" in Chapter 4. For Symmetry systems, go to "Install Software With the ALT DISK DELTA Procedure" in Chapter 5.


ATTENTION

After the installation is complete, do not attempt to mirror the original ROOTVOL plex with the new ROOTVOL. The old plex is now smaller than the new ROOTVOL. You will need to install a new VTOC on the old root disk before creating the ROOTVOL mirror.



Systems Without ptx/SVM

To increase the size of the root partition, complete the following steps:

  1. Select a disk to use as the alternate root. The disk must be an unused local disk.

  2. Create a custom VTOC for the disk. The /etc/vtoc directory contains the default VTOCs for each disk type. You can use default VTOC or the VTOC currently on the disk as the starting point. To use the current VTOC, use the prtvtoc command to make a copy of the VTOC:

    # /etc/prtvtoc sdX > /etc/vtoc/newname

    Use the following guidelines when modifying the VTOC:

    You can modify the VTOC file manually or with ptx/ADMIN (use System Administration -> Disk Drive Management -> Create a Custom VTOC File).

  3. Install the VTOC on the alternate disk and create the partition driver. You can do this with ptx/ADMIN or manually.

    ptx/ADMIN: use System Administration -> Disk Drive Management -> Create a VTOC File

    Manually: enter the following commands:

    # mkvtoc -s /etc/vtoc/newname sdX disk_type
    # /etc/devbuild vtoc /dev/rdsk/sdX
  4. Create a filesystem for root on the alternate disk (sd1s0 in the following example):

    # /etc/newfs /dev/rdsk/sd1s0 
  5. Copy the current root filesystem to the alternate disk. (The dump command is shown on two lines for readability). Be sure to specify the dump flags shown here. The commands have this syntax:

    # /etc/mount /dev/dsk/alt_root_partition mountpoint
    # sync
    # /etc/dump 0bdsf 32 54000 10000 - /dev/rdsk/current_root_partition
    | (cd alt_root_mountpoint; /etc/restore xbf 32 -)

    The following example mounts the alternate root partition sd1s0 as /mnt and copies the current root filesystem to that partition.

    # /etc/mount /dev/dsk/sd1s0 /mnt
    # sync
    # /etc/dump 0bdsf 32 54000 10000 - /dev/rdsk/sd0s0 | (cd /mnt;
    /etc/restore xbf 32 -)

    When the dump is complete, the following prompt appears:

    set owner/mode for '.'? [yn]
    

    Enter y at the prompt.

  6. Unmount the alternate root partition (/mnt in this example):

    # /etc/umount /mnt
  7. Run labelit on the root filesystem on the alternate disk:

    # /etc/labelit -F filesystem_type /dev/rdsk/alt_root_partition label
    alt_root_partition

    The filesystem_type can be either ufs or efs.

    The following example assigns the label root to the alternate root partition.

    # /etc/labelit -F ufs /dev/rdsk/sd1s0 root sd1s0
  8. Run fsck on the root filesystem. Be sure to specify the appropriate filesystem type (ufs or efs). In the following example the filesystem on the alternate disk (sd1) is ufs.

    # /etc/fsck -F ufs /dev/rdsk/sd1s0  

    If fsck should fail, use the -o full option of fsck to recover.

  9. Mount the root filesystem on the alternate disk:

    # /etc/mount -f filesystem_type /dev/dsk/sd1s0 /mnt
  10. Issue a df command to confirm that the root filesystem is mounted.

    # df
    / (/dev/dsk/sd0s0 ): 38760 blocks 25107 i-nodes
    /mnt (/dev/dsk/sd1s0 ): 38812 blocks 25110 i-nodes

You now have an image of the current root filesystem in a larger partition on the alternate disk and can perform the upgrade. For NUMA-Q systems, go to "Install Software With the ALT DISK DELTA Procedure" in Chapter 6. For Symmetry systems, Go to "Install Software With the ALT DISK DELTA Procedure" in Chapter 7.