- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- reading LVM headers
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
Forums
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
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
тАО10-02-2006 06:39 AM
тАО10-02-2006 06:39 AM
i just wonder, if there is a way how to read LVM headers off existing physical volumes (VGRA, PVRA). Or if someone could direct me to a document that describes the format so I could write a tool myself...
thanks and regards
Michal
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 06:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 08:56 AM
тАО10-02-2006 08:56 AM
Re: reading LVM headers
dd if=/dev/rdsk/c0t5d0 | xd -xc | more
Not pretty but it shows the raw data at the beginning of the disk. Use offsets in dd to move around. Naturally, you'll need a lot of details about the VGRA, BDRA, and other LVM structures to make sense of the data.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 04:16 PM
тАО10-02-2006 04:16 PM
Re: reading LVM headers
I actually was checking out LVM headers myself last week.
You see, I have a modest rx2620 which I boot for HPUX or OpenVMS based on my needs.
It has 3 x 73 GB drives which I want to use all for OpenVMS performance experiments.
So I want to reserve an HPUX LVM Logical Volume as play area for VMS.
Now as long as I knew where the LV starts on the drive, I could use the OpenVMS psuedo disk LD-driver to 'map' a disk in a range of blocks with neglectable performance impact.
VGdisplay -v gives the PE number for the LV start, but this does NOT map directly to a block number on the disk due to those LVM headers (and the EFI partitioning 512MB).
So here is the brute force method I succesfully deployed:
- using " dd -count=1 -bs=1k " wrote a 1KB file with the words 'first first first...' in it to the raw volume for a selected LV.
- using " dd -oseek=(LV_SIZE*PE_SIZE -1) -bs=1k -count=1 " wrote a 1KB file with 'last last last ..." to the last KB in the LV raw device.
- Boot OpenVMS
- Write program to scan raw disk for text starting from a selected block (SMOP :-)
- Scanned for 'first first ' -- Found start!
- Scanned for 'last last ' -- Found end!
- Verified distance was size of LV
- mapped OpenVMS LDdrive onto block range.
- repeat for second drive... Presto!
Now I can use my hpux data and os disk drives as data drives for my OpenVMS tests!
Fun fun fun... for crazy folks like myself.
Grins,
Hein van den Heuvel
HdvH Performance Consulting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 08:12 PM
тАО10-02-2006 08:12 PM
Re: reading LVM headers
anyways, if someone could post the lvm11 script here I'd be very grateful, as I currently do not have my pets under contract from HP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 08:20 PM
тАО10-02-2006 08:20 PM
Re: reading LVM headers
Try this link.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=40687
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 08:35 PM
тАО10-02-2006 08:35 PM
Re: reading LVM headers
Read the LVM record identification:
#echo 0x2000?4s | adb /dev/dsk/c0t6d0
Read the PVID:
#echo 0x2000?4X | adb /dev/dsk/c0t6d0
2000: 4C564d52 45433031 78261D3A 391C79BF
The 3rd and 4th fields make up the PVID
78261D3A391C79BF
Read the VGID:
#echo 0x12000?8X | adb /dev/dsk/c0t6d0
12000: 4C564d52 45433031 78261D3A 91C79BF 78261D3A 391C79C0 1FC74B 0
The VGID is the 5th and 6th fields:
78261D3A391C79C0
Read the cluster ID (if in use on a cluster):
#echo 0x12080?8X | adb /dev/dsk/c0t6d0
12080: 0 1 1FC740 392C0AE1 100 0 0 0
The cluster ID is the 4th field:
392C0AE1
Hope that helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 08:46 PM
тАО10-02-2006 08:46 PM
Re: reading LVM headers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2006 08:46 PM
тАО10-02-2006 08:46 PM