Solstice DiskSuite 4.2.1 User's Guide

Removing Trans Metadevices

This section describes how to remove trans metadevices (UFS logging).


Note -

To remove a trans metadevice and keep the same metadevice name as the mount device, refer to "Metadevice Name Switching".


Preliminary Information for Removing Trans Metadevices

How to Remove a Trans Metadevice (DiskSuite Tool)

Use this task to remove UFS logging from a file system that can be unmounted.

  1. Make sure you have met the prerequisites ("Prerequisites for Removing DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Removing Trans Metadevices").

  2. Make sure you have a current backup of the metadevice.

  3. Unmount the file system.

  4. Double-click the Trans Metadevice object in the Objects list.

    The trans metadevice object appears on the canvas.

  5. Display the Trans Metadevice object's pop-up menu and select Delete.

  6. Click the Really Delete button.

    The trans metadevice is split into its underlying master and logging devices.

  7. Edit the /etc/vfstab file, using one of the following:

    • If the master device is a metadevice, you can change the /etc/vfstab entry to mount the file system on the metadevice that serves as the master device.

    • If the master device is metadevice consisting of a single slice, you can change the /etc/vfstab entry to mount the file system on the metadevice's underlying slice.

    • If the master device is a slice, you can change the /etc/vfstab entry to mount the file system on the slice.

    • If you do not plan on accessing the data anymore, remove the /etc/vfstab entry for the file system altogether.

  8. To verify that the Trans Metadevice object was deleted, display the Configuration Log.

  9. Run the fsck(1M) command.

    Because the file system is no longer a logging device, you must run fsck before you can mount it. You run fsck either on the raw metadevice or raw device for the slice, depending on the configuration of the master device. Answer y to the following prompt:


    # fsck raw_device
    ...
    FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? y
    ...

    Note -

    If you are mounting the file system on a metadevice, run fsck on the raw device for that metadevice. Otherwise, run fsck on the raw device for slice upon which you will mount the file system.


  10. Mount the file system.

    The file system is no longer being logged.

  11. [Optional] Clean up the master and logging devices.

    If the master and logging devices were metadevices, you should delete the metadevices that you no longer need.

How to Remove a Trans Metadevice (Command Line)

After checking the prerequisites ("Prerequisites for Removing DiskSuite Objects") and the preliminary information ("Preliminary Information for Removing Trans Metadevices"), use the metaclear(1M) command to remove the trans metadevice. Refer to the metaclear(1M) man page for more information.

Example -- Removing a Trans Metadevice


# umount /abcfs
# metaclear d64
(Edit the /etc/vfstab file)
# fsck /dev/rdsk/c0t2d0s6
...
FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? y
...
# mount /abcfs

This example removes UFS logging from the /abcfs file system, which uses the trans metadevice d64. The underlying slice for the master device is /dev/dsk/c0t2d0s6. When the trans metadevice is cleared, any information pertaining to the master device is rolled from the log prior to clearing the device. The entry for the file system in the /etc/vfstab file must be changed so that it references the block and raw devices containing the file system rather than the metadevice name for the trans metadevice. Because the file system is no longer a logging device, the fsck(1M) command is run before mounting it. The FIX? prompt is responded to with a y, then the file system is mounted on the underlying slice.

How to Remove a Trans Metadevice From a File System That Cannot Be Unmounted (DiskSuite Tool)

Use this procedure to remove UFS logging from a file system that cannot be unmounted, such as root (/), /usr, and swap.

  1. Make sure you have met the prerequisites ("Prerequisites for Removing DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Removing Trans Metadevices").

  2. Make sure you have a current backup of the metadevice.

  3. Double-click the Trans Metadevice object in the Objects list.

    The object appears on the canvas.

  4. Drag the logging device out of the Trans Metadevice object to the canvas.

    The status of the object changes to "Detach log (scheduled)."

  5. Click inside the top rectangle of the Trans Metadevice object then click Commit.

    A dialog box warns that the logging device will be detached after the trans metadevice is unmounted or after the next reboot. Click Really Commit.

    The status of the trans metadevice changes to "Detach log (in-progress)."


    Note -

    If an entry exists for the file system in the /etc/vfstab file, and the file system is currently mounted, DiskSuite Tool automatically updates it to use the slice name instead of the trans metadevice name.


  6. Reboot. You may see a message indicating that the file system is being checked.


    ...
    The /usr file system (/dev/md/rdsk/d0) is being checked.
    /dev/md/rdsk/d0: 11576 files, 198318 used, 42081 free
    /dev/md/rdsk/d0: (737 frags, 5168 blocks, 0.3% fragmentation)
    ...
  7. Edit the /etc/vfstab file to remove the trans metadevice.

    Change the entry for the file system so that it references the block and raw devices containing the file system rather than the trans metadevice.

  8. Reboot.

    This reboot enables the system to recognize that the file system is no longer mounted on the trans metadevice but on its underlying slice.

  9. To delete the trans metadevice, double-click the Trans Metadevice object in the Objects list. The object appears on the canvas. Point inside the top rectangle of the object and display the pull-down menu. Choose the Delete option.

  10. Click the Really Delete button on the Confirmation dialog box that appears.

  11. To verify that the Trans Metadevice object was deleted, display the Configuration Log.

How to Remove a Trans Metadevice From a File System That Cannot Be Unmounted (Command Line)

After checking the prerequisites ("Prerequisites for Removing DiskSuite Objects") and the preliminary information ("Preliminary Information for Removing Trans Metadevices"), use the metadetach(1M) and metaclear(1M) commands to remove the trans metadevice. Refer to the metadetach(1M) and metaclear(1M) man pages for more information.

Use this procedure to remove a trans metadevice from a file system, such as /usr, that cannot be unmounted during normal system operation.

Example -- Removing a Trans Metadevice from /usr


# metadetach -f d20
d20: logging device c0t0d0s1 will be detached at unmount or reboot
# reboot
...
The /usr file system (/dev/rdsk/c0t3d0s3) is being checked.
...
(Edit the /etc/vfstab file)
# reboot
...
# metaclear d20
d20: Trans is cleared

In this example, d20 is a trans metadevice providing UFS logging for the /usr file system. To remove logging, the metadetach command is run with the -f option to force a detach of the logging device, and the system is rebooted. Next, the /etc/vfstab file is edited to change the entry for the file system so that it references the slice containing the file system rather than the trans metadevice. Another reboot places the /usr file system on its new mount device. The metaclear command clears the trans metadevice d20 from the system.