- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Removing(Destroying) LVM
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-13-2009 10:25 PM
тАО06-13-2009 10:25 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-13-2009 10:53 PM
тАО06-13-2009 10:53 PM
SolutionNo detail reply for the above query if its to remove the LV then VG and PVs.
If LVs and PVs are associated with a particular VG then :
Your command would be:
1)Unmount the FileSystem:
umount
2) vgchange -a n
3)vgexport
You're done here:
4) Remove the entry from the /etc/fstab
Check the Documentation for all details of LVM in www.docs.hp.com.
This is one of the best documents among the LVM topics:
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf
Cheers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-13-2009 10:55 PM
тАО06-13-2009 10:55 PM
Re: Removing(Destroying) LVM
For removing the LV
1)unmount the filesystem using umount
2)#lvremove /dev/vgname/lvname
For removing VG
Do step 1 and 2 first for all lvs in the vg
3)reduce the vg by removing All but one physical volume can not be removed. The last physical volume must remain in the volume group so that the logical volume driver can continue to operate.
#vgreduce
4)remove the pv using vgremove command
#vgremove
You can also do a vgexport for removing vg from the system and skip step 3 and 4 in that case
#vgexport
For removing PV
pvremove
make sure that the pv is not part of any vg before executing pvremove command
Rgds
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2009 12:07 AM
тАО06-14-2009 12:07 AM
Re: Removing(Destroying) LVM
vgdisplay -v | grep " VG Name"
check if they are these avaiable
first remove the vg definitions
vgexport /dev/vg01
if these are SAN LUNS unpresent them to that host.
then after reboot you will not have NO_HW.
if these are not SAN LUNs, then use others methods.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2009 04:29 AM
тАО06-14-2009 04:29 AM
Re: Removing(Destroying) LVM
Two comments relative to those that have been offered already:
You do _not_ manually edit the '/etc/lvmtab'. It is a binary file maintained by the LVM commands only. A 'vgexport' of a volume group removes all of the associated volume's device files from the 'lvmtab'.
As for using 'pvremove' this may be unnecessary. If the physical disk will be used for another LVM volume group later, you will be 'pvcreate'ing the disk. The 'pvremove' command is used if an LVM disk is going to be used with a non-LVM volume manager (e.g. VxVM).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2009 05:28 AM
тАО06-14-2009 05:28 AM
Re: Removing(Destroying) LVM
lvremove (each logical volume)
vgremove volume group
pvremove (Which really does nothing)
To insure the data is removed, you need to lay down now data on the disk, otherwise it is easily recoverable.
If you plan on selling the disk, the only way to be sure the old data is gone is to create a new logical volume and fill it up with data.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2009 05:43 AM
тАО06-14-2009 05:43 AM
Re: Removing(Destroying) LVM
> SEP: pvremove (Which really does nothing)
Let's be clear. As I noted, 'pvremove' will erase the LVM metadata from a physical disk. That is, among other information, the PVID and VGID present on the physical disk are removed. This allows use of the disk by VxVM; _and/or_ prevents the disk from being 'vgimport'ed again on the same or on another server; _and_ will assist you in probing for unused physical disks where "used" indicates the presence of a VGID while the disk is otherwise absent from '/etc/lvmtab'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2009 01:45 PM
тАО06-14-2009 01:45 PM
Re: Removing(Destroying) LVM
Very simple,
1-Unmount all filesystems on VG in question
# unmount /
2-Deactivate the VG
# vgchange -a n
3-Export the VG
# vgexport
4-Remove the device files of the disks if you are going to physically remove them
# pvremove /dev/dsk/c#t#d#
5-If you are going to use the disks for another purpose you can pvcreate the disks with -f option or use mediainit to erase everything on the disk.
# pvcreate -f /dev/rdsk/c#t#d#
or
# mediainit /dev/dsk/c#t#d# (this takes some time)
LN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2009 04:55 PM
тАО06-14-2009 04:55 PM