- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Use of group device file in vg
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
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
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
тАО10-04-2011 12:57 AM
тАО10-04-2011 12:57 AM
Use of group device file in vg
Hi ,
Can someone tell what is the use of group device file in each volume group
We usually create the group deice file for the vg cersion 1 with the command mknod
crw-r----- 1 root sys 64 0x000000 Jul 3 2009 /dev/vg00/group
I would like to know what is the use of this character group file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2011 03:12 AM
тАО10-04-2011 03:12 AM
Re: Use of group device file in vg
The group file is used to allow communications between the lvm commands and the lvm kernel.
Was this post useful? - You may click the KUDOS! star to say thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2011 12:48 AM
тАО10-05-2011 12:48 AM
Re: Use of group device file in vg
Could you please explain ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2011 03:10 AM
тАО10-06-2011 03:10 AM
Re: Use of group device file in vg
One of the original design principles of UNIX was "everything is a file". However, it turned out there were some operations that were inconvenient to implement as regular file read/write operations, particularly with devices: sometimes you want to read/write to the actual hardware device, in other situations you want to communicate with the device driver instead of the actual device.
A strict implementation of the "everything is a file" principle would have required allocating a separate device node for the communication with the driver. Then, the applications would have had to know which control device node is related to each data device... and it turned out the inconvenience of that was greater than the benefit of the strict "everything is a file" principle. So a different solution was designed.
For communication with the device driver, a standard form of control function was developed: the ioctl() system call. It allows a program to pass arbitrary data structures to the device driver that is responsible for a particular device node. When using the ioctl() system call, you must specify a file descriptor (usually a device file), the number of the ioctl operation you wish to perform, and the parameters necessary to the particular ioctl operation you want. Each device driver can have a different set of ioctl operations, but the overall interface to access them is standardized.
An ioctl operation can be a query for information: in that case, the program will provide a pointer to a memory buffer, and the driver will write its answer to the buffer in the form of a operation-specific data structure. Alternatively, an ioctl operation can be used to set some parameters: in that case, the program must typically prepare an operation-specific data structure and submit its address as a parameter to the ioctl() system call.
Some device files, like the group device file in LVM, exist only to provide the applications a target for ioctl() operations: such devices typically won't return anything useful if you attempt to read them as normal files, and return an error if you try to write to them. An ioctl operation is programmed much like a file read/write operation: you open the device file as normal, but instead of actually reading or writing, you use the ioctl() system call to communicate with the device driver.
I could not quickly find any documentation on LVM ioctl operations, but using tusc I was able to confirm that commands like vgdisplay certainly use ioctl operations:
# tusc vgdisplay vg00 [... a lot of text ...] stat("/dev/vg00/group", 0x7f7f1e48) ...................... = 0 open("/dev/vg00/group", O_RDWR, 0100) .................... = 4 ioctl(4, 0xc0207612, 0x7f7f14e0) ......................... = 0 ioctl(4, 0xc0207610, 0x40176068) ......................... = 0 ioctl(4, 0xc0207610, 0x40176088) ......................... = 0 [... still more text...]
- Tags:
- ioctl