- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- LVM pvcreate
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
тАО01-21-2009 08:22 PM
тАО01-21-2009 08:22 PM
Does pvcreate -f deletes the data on the disk? I am using oracle raw logical volumes.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 08:34 PM
тАО01-21-2009 08:34 PM
Re: LVM pvcreate
"pvcreate -f" will NOT delete the data. It will only remove the headers on the disk.
If you have VG backup files (created from vgcfgbackup, normally inside /etc/lvmconf/ directory), then you can revert back (by "vgcfgrestore") and get the disk working as before.
-RK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 09:55 PM
тАО01-21-2009 09:55 PM
Re: LVM pvcreate
whenever you apply command pvcreate, it deletes all the previous data reside in it and clean the disk as like as new disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 11:20 PM
тАО01-21-2009 11:20 PM
Re: LVM pvcreate
the pvcreate is a destructive command that writes the necessary LVM Structures on a disk and after that we add the disk to a VG using vgcreate or vgextend.
used with -f option this deletes the earlier LVM structures on the disk and creates the new one.
LVM structures on a disk are the metadata structures that are used to keep all the informations regarding the LV, VG ,PV, data area , boot area etc.
So all the LVM related information is gone.
that means that u can further do not read any data on the disk.the disk becomes as good as an empty or new disk.
Regards
Sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 01:06 AM
тАО01-22-2009 01:06 AM
Re: LVM pvcreate
i had done this before,
it will remove all your information from that physicall HDD (LVM , VG)
you can not recover all info again. tq
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 01:32 AM
тАО01-22-2009 01:32 AM
SolutionFor the record RK has it right. pvcreate overwrites the reserved area at the start of a disk that contains LVM metadata. The actual remaining data on disk is left untouched, and you *should* be able to get it back if you have a backup of the LVM headers in /etc/lvmconf. vgcfgrestore can be used to do that.
Now if you've accidently run a pvcreate -fB on a data disk that wasn't previously bootable, you could really lose data, as the -B option makes the reserved area bigger to provide space for the boot LIF areas. If the disk wasn't previously used for boot, then the first few LVM extents could get overwritten.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 01:59 AM
тАО01-22-2009 01:59 AM
Re: LVM pvcreate
Nice piece of info about "pvcreate -Bf".
A good point to take care of.
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 08:54 AM
тАО01-22-2009 08:54 AM
Re: LVM pvcreate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 09:27 PM
тАО01-22-2009 09:27 PM
Re: LVM pvcreate
One more Question regarding the same:
Is this the same even when data resides on block logical volume?
Thanks
Ravi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 10:19 PM
тАО01-22-2009 10:19 PM
Re: LVM pvcreate
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 12:14 AM
тАО01-23-2009 12:14 AM
Re: LVM pvcreate
For example in a one pv vg, you could pvcreate the vg, create a new vg with that pv with the same VG options pe, max_pvs, etc, and then create lvols with exactly the same size as the ones you had before, and you will be able to mount and access the data with no problems.