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:
- If the logical volume does not contain a file system, skip
to step 4.
- 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:
- 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.
- Another name for the unmount command is umount.
The names are interchangeable.
- To list information you need to know about your file systems,
type the following fast path:
The following is a partial listing:
Name Nodename Mount Pt ...
/dev/hd3 -- /tmp ...
/dev/locallv -- /adam/usr/local ...
- 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:
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
- To remove the logical volume, type the following fast path
on the command line:
- Select the name of the logical volume you want to remove.
- 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).
- Press Enter to remove the logical volume. SMIT prompts
you to confirm whether you want to remove the logical volume.
- Confirm you want to remove the logical volume. SMIT displays
a message when the logical volume has been removed successfully.
- 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:
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.