- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Major and minor number for a vg
Operating System - Linux
1753532
Members
6186
Online
108795
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
тАО07-16-2009 11:01 AM
тАО07-16-2009 11:01 AM
How can I check the major and minor number for a volume group in Red Hat Linux?
I really appreciate any help in this regard.
I really appreciate any help in this regard.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 12:08 PM
тАО07-16-2009 12:08 PM
Solution
Are you perhaps assuming Linux is like HP-UX and requires consistent VG device numbers in clusters?
Linux (kernel 2.6.*) does not work that way.
There is no device for the VG (like /dev/vgNAME/group in HP-UX), only for its LVs.
The LV major and minor numbers are allocated dynamically by the device-mapper _at the time the VG is activated_. If you activate a few VGs, reboot the machine and then activate the same VGs again in a different order, the LV minor numbers will not be the same as before. Therefore, *a Linux application must never rely on the LV major/minor numbers in any way*.
But if you're curious, you can see the numbers by running a command like "ls -l /dev/mapper/vgNAME-*". The major and minor numbers are listed in the column normally occupied by the file size. (A device node does not have a "size" as such, even if the device behind it has a measurable size.)
If you are familiar with ServiceGuard on HP-UX and now working with ServiceGuard on Linux, be careful: you may assume too much. There are several important differences.
Some other things that might surprise you:
* No need to export the VGs and move map files around to make the VGs known to all nodes of the cluster: just run "vgscan" in all nodes and you're done.
* If you use RHEL 4 or 5, the distribution is equipped with dynamically managed /dev filesystem, "udev". The LV devices will appear automatically _when the VG is activated_, not before. They will also be deleted automatically when you deactivate a VG. This can cause much confusion if you don't expect it.
MK
Linux (kernel 2.6.*) does not work that way.
There is no device for the VG (like /dev/vgNAME/group in HP-UX), only for its LVs.
The LV major and minor numbers are allocated dynamically by the device-mapper _at the time the VG is activated_. If you activate a few VGs, reboot the machine and then activate the same VGs again in a different order, the LV minor numbers will not be the same as before. Therefore, *a Linux application must never rely on the LV major/minor numbers in any way*.
But if you're curious, you can see the numbers by running a command like "ls -l /dev/mapper/vgNAME-*". The major and minor numbers are listed in the column normally occupied by the file size. (A device node does not have a "size" as such, even if the device behind it has a measurable size.)
If you are familiar with ServiceGuard on HP-UX and now working with ServiceGuard on Linux, be careful: you may assume too much. There are several important differences.
Some other things that might surprise you:
* No need to export the VGs and move map files around to make the VGs known to all nodes of the cluster: just run "vgscan" in all nodes and you're done.
* If you use RHEL 4 or 5, the distribution is equipped with dynamically managed /dev filesystem, "udev". The LV devices will appear automatically _when the VG is activated_, not before. They will also be deleted automatically when you deactivate a VG. This can cause much confusion if you don't expect it.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2009 03:59 AM
тАО07-20-2009 03:59 AM
Re: Major and minor number for a vg
ll /dev/*/group
For Ex:
crw------- 1 root sys 64 0x190000 Nov 16 2008 /dev/vg19/group
In this case major no. is 64 & minor no is Hexadecimal no. 0x190000
For Ex:
crw------- 1 root sys 64 0x190000 Nov 16 2008 /dev/vg19/group
In this case major no. is 64 & minor no is Hexadecimal no. 0x190000
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