Next | Prev | Up | Top | Contents | Index

Converting a Filesystem on an Option Disk From EFS to XFS

Caution: The procedure in this section can result in the loss of data if it is not performed properly. It is recommended only for experienced IRIX system administrators. This section explains how to convert an EFS filesystem on an option disk (a disk other than the system disk) to XFS. It assumes that neither lv nor XLV logical volumes are used. You must be superuser to perform this procedure.

  1. Review the subsections within the section "Planning for XFS Filesystems" in this chapter to verify that you are ready to begin this procedure.

  2. Verify that your backups are up to date. Because this procedure temporarily removes all files from the filesystem you convert, it is important that you have a complete set of backups that have been prepared using your normal backup procedures. You will make a complete backup of the system disk in step 4, but you should have your usual backups in addition to the backup made during this procedure.

  3. Identify the device name of the partition, which is the variable partition, where you plan to create the filesystem. For example, if you plan to use partition 7 (the entire disk) of an option disk on controller 0 and drive address 2, partition is /dev/dsk/dks0d2s7. For more information on determining partition (also known as a special file), see the dks(7M) reference page.

  1. Back up all files on the disk partition to tape or disk because they will be destroyed by the conversion process. You can use any backup command (Backup, bru, cpio, tar, and so on) and back up to a local or remote tape drive or a local or remote disk. For example, the command for dump for local tape is:

    # dump 0uCf tapesize dumpdevice partition

    tapesize is the tape capacity (it's used for backup to disks, too) and dumpdevice is the device name for the tape drive. Table 4-1 gives the values of tapesize and dumpdevice for different local tape drives and disk. You can get the values of tapecntlr and tapeunit used in the table from the output of the command hinv -c tape.

  2. Unmount the partition:

    # umount partition

  3. Use the mkfs command to create the new XFS filesystem:

    # mkfs -b size=blocksize -l size=logsize partition

    blocksize is the filesystem block size (see the section "Choosing the Filesystem Block Size and Extent Size" in this chapter) and logsize is the size of the area dedicated to log records (see the section "Choosing the Log Type and Size" in this chapter). Example 4-1 shows an example of this command line and its output.

  4. Mount the new filesystem with this command:

    # mount partition mountdir

  5. In the file /etc/fstab, in the entry for partition, replace efs with xfs. For example:

    partition mountdir xfs rw,raw=rawpartition 0 0

    rawpartition is the raw version of partition.

  6. Restore the files to the filesystem from the backup you made in step 4. For example, if you gave the dump command in step 4, the commands to restore the files from tape are:

    # cd mountdir

    # mt -t device rewind

    # restore rf dumpdevice

    The value of device is the same as dumpdevice without nsv or other letters at the end.

    You may need to be patient while the restore is taking place; it doesn't generate any output and it can take a while.



Next | Prev | Up | Top | Contents | Index