- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: LV & Current le in adjacent columns
Operating System - HP-UX
1748229
Members
3979
Online
108759
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО12-15-2004 12:13 AM
тАО12-15-2004 12:13 AM
Hey,
How I can do lvdisplay and arrange the LV Name and Current in adjacant columns. I will assign points. I got list of LV's and I need to check for current LE assigned and create the same on Test box. I appreciate the help very much and will surely assign points..
Thanks and regards
Prashant
How I can do lvdisplay and arrange the LV Name and Current in adjacant columns. I will assign points. I got list of LV's and I need to check for current LE assigned and create the same on Test box. I appreciate the help very much and will surely assign points..
Thanks and regards
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2004 12:24 AM
тАО12-15-2004 12:24 AM
Solution
Hi,
i do not clearly understand your question, but some time ago i did this script:
#!/sbin/sh
if [ $# != 2 ]
then
printf "\n"
printf " Specular_lv.sh - Version 1.0 \n"
printf "\n"
printf "\n"
printf " Usage: specular_lv.sh sourcevg targetvg \n"
printf "\n"
exit 1
fi
vgdisplay -v $1 | awk ' /LV Name/{ print $3 } /LV Size/{ print $4 }'| paste -s -d"\t\n" - | tr "/" " " | awk -v NOMEVG=$2 '{ print "lvcreate -n", $3, "-L", $4, NOMEVG }'
It will print to video the instruction to re-create the vg, changing the name.
It will NOT issue any real command to create logical volumes..
HTH,
Massimo
i do not clearly understand your question, but some time ago i did this script:
#!/sbin/sh
if [ $# != 2 ]
then
printf "\n"
printf " Specular_lv.sh - Version 1.0 \n"
printf "\n"
printf "\n"
printf " Usage: specular_lv.sh sourcevg targetvg \n"
printf "\n"
exit 1
fi
vgdisplay -v $1 | awk ' /LV Name/{ print $3 } /LV Size/{ print $4 }'| paste -s -d"\t\n" - | tr "/" " " | awk -v NOMEVG=$2 '{ print "lvcreate -n", $3, "-L", $4, NOMEVG }'
It will print to video the instruction to re-create the vg, changing the name.
It will NOT issue any real command to create logical volumes..
HTH,
Massimo
- Tags:
- vgdisplay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2004 12:29 AM
тАО12-15-2004 12:29 AM
Re: LV & Current le in adjacent columns
As Massimo, I'm not really sure I understand your question. From what I understand, even if this is not an exact solution, this may help (or not :)
This will put LV name in front of each LE description line of "lvdisplay -v".
for lv in $(vgdisplay -v vg00|grep "LV Name"|awk '{print $NF}')
do
for LEline in $(lvdisplay -v $lv|grep current|tr -s " " ":")
do
echo "$lv $LEline"
done
done
Regards,
Fred
This will put LV name in front of each LE description line of "lvdisplay -v".
for lv in $(vgdisplay -v vg00|grep "LV Name"|awk '{print $NF}')
do
for LEline in $(lvdisplay -v $lv|grep current|tr -s " " ":")
do
echo "$lv $LEline"
done
done
Regards,
Fred
--
"Reality is just a point of view." (P. K. D.)
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-15-2004 01:08 AM
тАО12-15-2004 01:08 AM
Re: LV & Current le in adjacent columns
lvdisplay /dev/emc01/lvol1 | awk '
/LV Name/ {LV=$3}
/LE/ {LE=$3}
END {print LV, LE}
'
b. Yields:
/dev/emc01/lvol1 6250
/LV Name/ {LV=$3}
/LE/ {LE=$3}
END {print LV, LE}
'
b. Yields:
/dev/emc01/lvol1 6250
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP