- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Device Name -VG -LV -Mount point
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
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
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
11-01-2012 12:48 AM
11-01-2012 12:48 AM
Hi Experts
Hp ux Server having Multiple device files for disks .
Any specific Script to get output of device file using concern VG -LV -Mount Point.
Regards
Ajin.S
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2012 06:29 AM
11-02-2012 06:29 AM
Re: Device Name -VG -LV -Mount point
vgdisplay -v vgname
- Tags:
- vgdisplay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2012 02:12 PM
11-10-2012 02:12 PM
Re: Device Name -VG -LV -Mount point
Hi
vgdisplay -v vgname not display the mount point belong to the VG.
I have more than 10000 device files configured in LVM in my Server .My requrement was i want to know which device file bloong to which VG and LV and the corresponding Mount Point.
Same like SAR report output with Mount Point details.
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2012 06:47 PM
11-12-2012 06:47 PM
SolutionThis code will display each mountpoint, the VG, the LV and the PVs that are part of the LV.
It is sorted by VG/LV. If there are multiple PVs that are part of the LV, all the PVs are on the same line.
bdf -l |
grep -v ^Filesystem |
while read LV KB USED AV PCT MNT
do
[[ "$KB" = "" ]] && read KB USED AV PCT MNT
PV=$(lvdisplay -v $LV |
awk '/--- Dist/,/--- Logi/' |
awk '/\/dev\/d/{print $1}')
VG=$(echo $LV | cut -f3 -d/)
LVOL=$(echo $LV | awk -F / '{print $NF}')
echo $MNT $VG $LVOL $PV
done | sort -k2
Bill Hassell, sysadmin
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2012 07:41 PM
11-12-2012 07:41 PM
Re: Device Name -VG -LV -Mount point
You can remove one of the awks by:
PV=$(lvdisplay -v $LV |
awk '/--- Distribution/,/--- Logical/ {
if ($1 ~ "/dev/d") { print $1; exit }
}' )