[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 System Management Guide: Operating System and Devices

Removing a Logical Volume

To remove a logical volume, you can use Web-based System Manager or you can use one of the following procedures. Use Web-based System Manager fast path wsm lvm instead of smit rmlv or wsm fs instead of smit rmfs. The primary difference between the following procedures is that the smit rmfs procedure removes the file system, its associated logical volume, and the record of the file system in the /etc/filesystems file. The smit rmlv procedure removes the logical volume but does not remove the file system record.

If you use one of the following procedures instead of Web-based System Manager, use smit rmfs to remove a logical volume with a JFS file system mounted on it. Use smit rmlv if you want to remove a logical volume with a non-JFS file system mounted on it or a logical volume that does not contain a file system.

Prerequisites

It is important to have an understanding of the following:

Remove a Logical Volume Using smit rmfs

Using this procedure removes a JFS file system, any logical volume on which it resides, the associated stanza in the /etc/filesystems file, and, optionally, the mount point (directory) where the file system is mounted.

Attention: Using this procedure destroys all data in the specified file systems and logical volume.
  1. Unmount the file system that resides on the logical volume with a command similar to the following example:
    Note: You cannot use the umount command on a device in use. A device is in use if any file is open for any reason or if a user's current directory is on that device.
    umount /adam/usr/local
  2. To select which file system to remove, enter:
    smit rmfs
  3. Go to the Remove Mount Point field and toggle to your preference. Selecting yes removes the mount point (directory) where the file system is mounted if the directory is empty.

Remove a Logical Volume Using smit rmlv

Using this procedure removes a non-JFS file system, provided such a system exists and is mounted, any logical volume on which it resides, the associated stanza in the /etc/filesystems file, and, optionally, the mount point (directory) where the file system is mounted. It also can be used to remove a logical volume that does not contain a file system. If the logical volume does not have a file system, go to step 3.

Attention: This procedure destroys all data in the specified logical volume.
  1. Unmount the file system that resides on the logical volume. For example:
    umount /adam/usr/local
    Note: You cannot use the umount command on a device in use. A device is in use if any file is open for any reason or if a user's current directory is on that device.
  2. Enter the following fast path to list relevant information about your file systems:
    smit lsfs
    A partial listing follows:
    Name            Node     Mount Point
       
    /dev/testlv     xxx      /test
       
    /dev/locallv   xxx       /adam/usr/local

    Assuming standard naming conventions for the second item, the file system would be named /adam/usr/local and the logical volume would be locallv. To verify this, use the following fast path:

    smit lslv2

  3. To select which logical volume to remove, enter:
    smit rmlv
  4. If the logical volume had a non-JFS file system mounted on it, remove the file system from the /etc/filesystems file as follows:
    rmfs /adam/usr/local
    Or, you can use the device name as follows:
    rmfs /dev/locallv

[ Previous | Next | Contents | Glossary | Home | Search ]