Removing a logical volume only

Use this procedure to remove a logical volume with a different type of file system mounted on it or a logical volume that does not contain a file system.

Attention: Removing a logical volume destroys all data in the specified file systems and logical volume.

The following procedures explain how to remove a logical volume and any associated file system. You can use this procedure to remove a non-JFS file system or a logical volume that does not contain a file system. After the following procedures describe how to remove a logical volume, they describe how to remove any non-JFS file system's stanza in the /etc/filesystems file.

To remove a logical volume through SMIT, use the following procedure:

  1. If the logical volume does not contain a file system, skip to step 4.
  2. Unmount all file systems associated with the logical volume by typing:
    unmount /FSname

    Where /FSname is the full path name of a file system.

    Note:
    1. The unmount command fails if the file system you are trying to unmount is currently being used. The unmount command executes only if none of the file system's files are open and no user's current directory is on that device.
    2. Another name for the unmount command is umount. The names are interchangeable.
  3. To list information you need to know about your file systems, type the following fast path:
    smit lsfs
    The following is a partial listing:
    Name            Nodename   Mount Pt         ...
       
    /dev/hd3        --         /tmp             ...
                                             
    /dev/locallv    --         /adam/usr/local  ... 
  4. Assuming standard naming conventions for the second listed item, the file system is named /adam/usr/local and the logical volume is locallv. To verify this, type the following fast path:
    smit lslv2
    The following is a partial listing:
    imagesvg:                                                                 
    LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT 
    hd3                 jfs        4     4     1    open/syncd    /tmp
    locallv             mine       4     4     1    closed/syncd  /adam/usr/local
  5. To remove the logical volume, type the following fast path on the command line:
    smit rmlv
  6. Select the name of the logical volume you want to remove.
  7. Go to the Remove Mount Point field and toggle to your preference. If you select yes, the underlying command will also remove the mount point (directory) where the file system is mounted (if any, and if that directory is empty).
  8. Press Enter to remove the logical volume. SMIT prompts you to confirm whether you want to remove the logical volume.
  9. Confirm you want to remove the logical volume. SMIT displays a message when the logical volume has been removed successfully.
  10. If the logical volume had a non-JFS file system mounted on it, remove the file system and its associated stanza in the /etc/filesystems file, as shown in the following example:
    rmfs /adam/usr/local
    Or, you can use the file system name as follows:
    rmfs /dev/locallv

At this point, the logical volume is removed. If the logical volume contained a non-JFS file system, that system's stanza has also been removed from the /etc/filesystems file.