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...
I need some help, it is slightly urgent so any help is appreciated.
We were doing a data migration, during a migratepv command, our SAN ran out of quota space and locked all of the filesystems, now I'm left with a few errors and am not able to do migratepv again.
/:migratepv... (2 Replies)
I have 500 GB hard drive in my office server, previous employee installed fedora in to it, with 50 GB / and 120 GB (/opt/backup 15GB, /opt/test 5GB so on) . i have 180 GB free space left , so I have created LVM in 180 GB and moved all data from 120 GB to 180 .
Now i need to create lvm in... (1 Reply)