- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Determing minor nos in use for major no:64(lvm)
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
08-17-2007 12:07 AM
08-17-2007 12:07 AM
Determing minor nos in use for major no:64(lvm)
Is their any full proof method of determining the available minor no LVM.
I'm using the following method:
root@hpia7// $ minor_avail=`ls -la /dev/vg*/group | awk '{print $6}'`
root@hpia7// $ echo $minor_avail
0x000000 <===
root@hpia7// $ lsdev|grep lvm
64 64 lv lvm
but this doesn't always work :(
sometimes after crating the vg and due to some reason if the user could not create the LVs and removed the PVs from LVM control by directly dd ing it with zeroes in the private region of the disk and then brought them under control of another volume manager(VxVM) and removed the entry of previously created VG (
hence i need to have a better method of determining which all minor nos for major no:64 are in use .
Thanks,
~amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2007 12:22 AM
08-17-2007 12:22 AM
Re: Determing minor nos in use for major no:64(lvm)
The information about this VG is still on different places on your system - you will see some additional problems too.
The only good method is to use vgreduce.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2007 12:38 AM
08-17-2007 12:38 AM
Re: Determing minor nos in use for major no:64(lvm)
Creating and removing logical volumes and disk devices and volume groups is complex, and I would never trust it to a user. This is a systems administration function.
You may wish to add a little diagnostics to your script to look at the $? variable after the attempt to create the device and see what the error code is.
Very often there are stray device files left around from sysadmin's learning their trade or users learning how to do this.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2007 12:49 AM
08-17-2007 12:49 AM
Re: Determing minor nos in use for major no:64(lvm)
Just now i tweaked a little with vgreduce and
i am fully convienced with what Torsten said,
Also as all these (pvcreate,vgcreate,lvcreate,vgreduce,etc) are in /usr/sbin directory hence i would expect the su to be using these than the cheap dd method.
Thanks again,
~amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2007 01:08 AM
08-17-2007 01:08 AM
Re: Determing minor nos in use for major no:64(lvm)
# vgexport
will completely blow away the old VG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2007 01:10 AM
08-17-2007 01:10 AM
Re: Determing minor nos in use for major no:64(lvm)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2007 02:55 AM
08-17-2007 02:55 AM
Re: Determing minor nos in use for major no:64(lvm)
You need also to be aware that all of the LVM commands reside in '/sbin' too. This is for use in single-user mode when only the root filesystem is mounted.
I second Patrick's remarks. You need to use the LVM toolset to manage LVM disks. I suggest you read chapter-6 in "Managing Systems and Workgroups: A Guide for HP-UX System Administrators":
http://www.docs.hp.com/en/B2355-90950/index.html
Regards!
...JRF...