Have you ever had a need to know which lvols were on which disks? Maybe you needed to expand an index filesystem and wanted to make sure you did not expand onto a disk with a data filesystem. Here is a script to see how each lvol is laid out on each disk. (For VGs with many PVs it may be easier to output to a file and then open in a spreadsheet). It works with both Agile and legacy DSFs.
Enjoy! Let me know what you think. (I really think LVM should include something like this already).
Last edited by vbe; 05-31-2012 at 08:47 AM..
Reason: code tags..
These 2 Users Gave Thanks to keelba For This Post:
Awesome! Thank you very much for the script. I came across this situation couple of times for Linux and HP-UX. I scratched my head, tried to guesstimate, and gave up at last.
Just to let you know, although I can make up what the script is actually doing, it would be very helpful, if you comment it properly so that others can understand and use the similar idea in different platforms.
(OK, I do strange configs when I want to optimize throughput... here you have LUNS that are RAID5 luns, I use in PVG and stripe... using 2 HBAs so you see them thruogh the 2 paths (alternate links...))
(HP-UX 11.11 PA-RISC...)
This is not the worst I did... I have a volume group with 3 PVG where I made 3 set of stripes: 2 set of lvols striped over 4 luns and 1 set using 8... Now I sweat when it comes to add extents...