- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Validating LVM mirrors
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
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
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
04-03-2001 08:51 AM
04-03-2001 08:51 AM
Validating LVM mirrors
Does anyone know of any tools or commands to determine the validity of a mirror'd lvol?
The problem is this: When a disk that is part of a mirrored lvol fails, it usualy isn't detected until you do something silly, like split the mirror. The problem is that once you split the mirror you have no way to recover the data.... Current SCSI patches are helping to detect these failures, but are not yet fool-proof.
Checking VG display to see if the extents are stale or current is all well and good, but what I'd like is a way to say that they are actually 'the same', not just that they are flagged that they should be the same.
A related question is: Does anyone know of any tools to map Logical extents to files? (I realize this would be technicaly VERY complex and computationaly intensive) There are times when it would be nice to know what files got corrupted after a disk starts to fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 09:02 AM
04-03-2001 09:02 AM
Re: Validating LVM mirrors
If you don't have it installed, I think it would be a great idea to try it.
good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 09:58 AM
04-03-2001 09:58 AM
Re: Validating LVM mirrors
I also don't know of any way to make sure your mirrors are synced and everything is the same other than to perform a periodic vgsync or lvsync, but there is really not much point in doing that becuase LVM will keep your mirrors in sync automatically.
The way I verify that all my mirrors are synced and that I don't have any bad disks is by running a script every morning at 6AM that checks the status of everything. I do a 'vgdisplay -v' and grep for stale. If nothing shows up, then I am OK. I also send a tail of my syslog.log file and look at that. If I have a disk that has gone completely bad, then I will see a message in the syslog saying something to the effect that the disk has been POWERFAILED.
Checking and making sure that your mirrors are synced with vgdisplay is probably the easiest and most effective thing to do. LVM does a good job of keeping everything synced, which is what it is supposed to do.
Have a look at this thread to and look for my responses to see the script that I run every morning.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x04c86af52b04d5118fef0090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2001 01:23 PM
04-03-2001 01:23 PM
Re: Validating LVM mirrors
I've tried using the Online Diagnostics several times with mixed success. The HPUX systems I'm most concerned with have problems running some of the tools in OnlineDiag, and I'm not sure they have anything specific to validating mirror status.
Patrick,
The vgdisplay or lvdisplay status of 'stale' or 'sync' is just a flag set somewhere in LVM. It indicates that LVM put the same stuff in each block, but doesn't have a way to check that they are still the same (for example, if the disk is corrupting data).
The tool I'm hoping for would be something along the lines of a 'dd' from each side of the lvol running through 'diff' and hoping for an identical comparision. The problem is that there isn't a particularly direct way to do this because of how information is filtered through LVM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2001 12:38 AM
04-04-2001 12:38 AM
Re: Validating LVM mirrors
The vgdisplay/lvdisplay will work, but you can use the following "dd if=/dev/rdsk/cxtxdx of=/dev/null bs=xxx" and check the final output.
The output should be something like:
1855546+0 records in
1855546+0 records out
good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2001 12:45 AM
04-04-2001 12:45 AM
Re: Validating LVM mirrors
Predictive should warn you in advance of any disk problems.
lvdisplay -v should also show some stale extents.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2001 09:30 AM
04-04-2001 09:30 AM
Re: Validating LVM mirrors
Good Luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2001 10:56 AM
04-24-2001 10:56 AM
Re: Validating LVM mirrors
vgdisplay -v vg00
and you get these 2 disks back with the first being the live disk and the second being the mirror.
/dev/dsk/c0t5d0
/dev/dsk/c0t8d0
Now if you have different size disks you will have to do a better comparison.
So then I do a
pvdisplay -v /dev/dsk/c0t5d0 |tee /tmp/disk1
pvdisplay -v /dev/dsk/c0t8d0 |tee /tmp/disk2
This outlines all of the extents and the vols that they belong to, then I do a diff
diff disk1 disk2 | tee /tmp/difference
the only difference you should see here is that there are 2 disk addresses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2001 01:54 PM
04-24-2001 01:54 PM
Re: Validating LVM mirrors
Another interesting way to check and see that both sides are marked current under LVM. However the core problem is finding out when the actual data on the drives differ and the state on LVM is still showing 'current'. I expect that I'll eventualy have to hack together a 'reproduceable test case' and take it to WTEC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2001 10:41 PM
04-24-2001 10:41 PM
Re: Validating LVM mirrors
an other option you have is "vgdisplay -v VGxx" and check for stale logical volumes.
(or lvdisplay -v)
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2001 10:43 PM
04-24-2001 10:43 PM
Re: Validating LVM mirrors
LV Name /dev/vg01/lvol8
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 50
Allocated PE 100
Used PV 2
LV Name /dev/vg01/lvol7
LV Status available/stale <---
LV Size (Mbytes) 300
Current LE 75
Allocated PE 150
Used PV 1