Sponsored Content
Operating Systems Solaris Major and Minor number of Virtual File System Post 302668619 by jlliagre on Monday 9th of July 2012 04:24:13 PM
Old 07-09-2012
You shouldn't try to extrapolate anything from dev=xxx in mnttab:
Using dev=option in applications is strongly discouraged. The device number string represents a 32-bit quantity and might not contain correct information in 64-bit environments.

Applications requiring device number information for mounted file systems should use the getextmntent(3C) interface, which functions properly in either 32- or 64-bit environments.

 

9 More Discussions You Might Find Interesting

1. Programming

Device Major/Minor numbers

To further my fledgling knowledge of C, I am re-writing some of the Unix command set. My current command is an ls-style command. All works well, except for device files. How do I get the major/minor numbers for the dev files? I see from the stat struct there are st_rdev and st_dev members. Do... (1 Reply)
Discussion started by: zazzybob
1 Replies

2. Solaris

major & minor number

Hi Can anyone tell me what is major number and minor number in the mknod command. Also what these numbers mean. I have gone through the man pages but still I couldn't understand. Regards (3 Replies)
Discussion started by: RajaRC
3 Replies

3. Shell Programming and Scripting

sort major.minor.release_build_x

would like to order this input based on major.minor.release AND build number Label abc_def_0.0.3_build_999 2008/08/01 'Created by me.' Label abc_def_0.0.9_build_1000 2008/08/01 'Created by me.' Label abc_def_9.0.9_build_10001 2008/08/01 'Created by me.' Label abc_def_10.9.100_build_2... (4 Replies)
Discussion started by: gurpal2000
4 Replies

4. Solaris

Help with Major and minor number

Hi Does anyone know what the major and minor numbers are in Solaris? (2 Replies)
Discussion started by: wisdom
2 Replies

5. AIX

how do I change major-minor numbers of disk devices

Good evening ... does anyone of you know how to change major/minor numbers of disk devices ? I had to migrate from raid1 to raid5 and this messed up my ASM cluster - I know which devices should have which IDs to match the content - but I have no idea how to change it. Any help would be... (2 Replies)
Discussion started by: zxmaus
2 Replies

6. AIX

Difference between Major and Minor in AIX

Difference between Major and Minor in AIX (5 Replies)
Discussion started by: AIXlearner
5 Replies

7. Programming

which head file for major and minor function?

#include <sys/types.h> #include <sys/stat.h> #include <sys/termios.h> #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <unistd.h> #include <signal.h> #include <sys/mkdev.h> int main(int argc, char *argv) { int i; struct stat buf; ... (4 Replies)
Discussion started by: konvalo
4 Replies

8. Shell Programming and Scripting

How to filter out major and minor?

Hi, I have line like this : proj_name/module/trunk/module_1_0 where the first "1" refers to major version and second "0" refers to minor version. any AWK or command like that so that I can filter out the major and minor ? like major= command | input line minor= command |... (4 Replies)
Discussion started by: bhaskar_m
4 Replies

9. Shell Programming and Scripting

Filtering my major and minor values

I want to remove all rows with a minor repeating count less than 30% compared to the major repeating count from my table. The values of a col(starting col 2) can assume is A,T,G,C and N. Each row has at least 2 values and at most 4 repeating values(out of ATGC). N is considered a missing value... (12 Replies)
Discussion started by: newbie83
12 Replies
mnttab(4)							   File Formats 							 mnttab(4)

NAME
mnttab - mounted file system table DESCRIPTION
The file /etc/mnttab is really a file system that provides read-only access to the table of mounted file systems for the current host. /etc/mnttab is read by programs using the routines described in getmntent(3C). Mounting a file system adds an entry to this table. Unmount- ing removes an entry from this table. Remounting a file system causes the information in the mounted file system table to be updated to reflect any changes caused by the remount. The list is maintained by the kernel in order of mount time. That is, the first mounted file system is first in the list and the most recently mounted file system is last. When mounted on a mount point the file system appears as a regular file containing the current mnttab information. Each entry is a line of fields separated by <TAB>s in the form: special mount_point fstype options time where: special The name of the resource that has been mounted. mount_point The pathname of the directory on which the filesystem is mounted. fstype The file system type of the mounted file system. options The mount options. See respective mount file system man page in the SEE ALSO section below. time The time at which the file system was mounted. Examples of entries for the special field include the pathname of a block-special device, the name of a remote file system in the form of host:pathname, or the name of a swap file, for example, a file made with mkfile(1M). IOCTLS
The following ioctl(2) calls are supported: MNTIOC_NMNTS Returns the count of mounted resources in the current snapshot in the uint32_t pointed to by arg. MNTIOC_GETDEVLIST Returns an array of uint32_t's that is twice as long as the length returned by MNTIOC_NMNTS. Each pair of numbers is the major and minor device number for the file system at the corresponding line in the current /etc/mnttab snapshot. arg points to the memory buffer to receive the device number information. MNTIOC_SETTAG Sets a tag word into the options list for a mounted file system. A tag is a notation that will appear in the options string of a mounted file system but it is not recognized or interpreted by the file system code. arg points to a filled in mnttagdesc structure, as shown in the following example: uint_t mtd_major; /* major number for mounted fs */ uint_t mtd_minor; /* minor number for mounted fs */ char *mtd_mntpt; /* mount point of file system */ char *mtd_tag; /* tag to set/clear */ If the tag already exists then it is marked as set but not re-added. Tags can be at most MAX_MNTOPT_TAG long. Use of this ioctl is restricted to processes with the {PRIV_SYS_MOUNT} privilege. MNTIOC_CLRTAG Marks a tag in the options list for a mounted file system as not set. arg points to the same structure as MNTIOC_SETTAG, which identi- fies the file system and tag to be cleared. Use of this ioctl is restricted to processes with the {PRIV_SYS_MOUNT} privilege. ERRORS
EFAULT The arg pointer in an MNTIOC_ ioctl call pointed to an inaccessible memory location or a character pointer in a mnttagdesc structure pointed to an inaccessible memory location. EINVAL The tag specified in a MNTIOC_SETTAG call already exists as a file system option, or the tag specified in a MNTIOC_CLRTAG call does not exist. ENAMETOOLONG The tag specified in a MNTIOC_SETTAG call is too long or the tag would make the total length of the option string for the mounted file system too long. EPERM The calling process does not have {PRIV_SYS_MOUNT} privilege and either a MNTIOC_SETTAG or MNTIOC_CLRTAG call was made. FILES
/etc/mnttab Usual mount point for mnttab file system /usr/include/sys/mntio.h Header file that contains IOCTL definitions SEE ALSO
mkfile(1M), mount_cachefs(1M), mount_hsfs(1M), mount_nfs(1M), mount_pcfs(1M), mount_ufs(1M), mount(1M), ioctl(2), read(2), poll(2), stat(2), getmntent(3C) WARNINGS
The mnttab file system provides the previously undocumented dev=xxx option in the option string for each mounted file system. This is pro- vided for legacy applications that might have been using the dev=information option. Using dev=option in applications is strongly discouraged. The device number string represents a 32-bit quantity and might not contain cor- rect information in 64-bit environments. Applications requiring device number information for mounted file systems should use the getextmntent(3C) interface, which functions prop- erly in either 32- or 64-bit environments. NOTES
The snapshot of the mnttab information is taken any time a read(2) is performed at offset 0 (the beginning) of the mnttab file. The file modification time returned by stat(2) for the mnttab file is the time of the last change to mounted file system information. A poll(2) sys- tem call requesting a POLLRDBAND event can be used to block and wait for the system's mounted file system information to be different from the most recent snapshot since the mnttab file was opened. SunOS 5.10 20 Dec 2003 mnttab(4)
All times are GMT -4. The time now is 09:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy