Sponsored Content
Top Forums UNIX for Advanced & Expert Users /etc/mnttab is zero length - I have done a silly thing Post 302149104 by Smiling Dragon on Tuesday 4th of December 2007 10:42:02 PM
Old 12-04-2007
Error /etc/mnttab is zero length - I have done a silly thing

Being the clever-clogs that I am, I have managed to clobber the contents of /etc/mnttab.

It started when I tried to unmount all the volumes in a prticular veritas disk group and neglected to include a suitable grep in my command line, thus attempting to unmount _all_ the filesystems on the server (for loop).

They all came back with a fs busy message so I was presuming no harm done. However, a df to check all was in order came back with no results, likewise running mount.

When I went to look in the mnttab itself I find it's zero length !?! Smilie

Everything appears ok in that the filesystems are still actually mounted and read/write.

If I try a mount or umount I get the message
"mount: Inappropriate ioctl for device"

I suspect a reboot would sort me out but that's a big hammer and I'd rather get to the bottom of it.

What have I done and how in the world do I fix it?

Running solaris 10 on a T2000, fairly recent patches applied. Bugger all running aside from base OS and SAN kit.
 

10 More Discussions You Might Find Interesting

1. Solaris

Silly question

Are GNOME or javadsktop supported of the box on Solaris 10 on Ultra (SUNBlade 1500) ? I'could switch desktops to KDE at CDE logon. But when I tried to use the JavaDesktop it simply returns me back to the log on screen of CDE. How do I conigure to the latest GNOME and.or JavaDesktop if... (3 Replies)
Discussion started by: miket
3 Replies

2. HP-UX

bdf , /etc/fstab , /etc/mnttab

Hi all, Would like to know if it is possible to rearrange the order that mounts are displayed when the 'bdf' command is issued. An example of what I mean is, currently I see the following ... $ bdf -l Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol3 524288 ... (6 Replies)
Discussion started by: Cameron
6 Replies

3. UNIX for Dummies Questions & Answers

silly question

How do I go about finding the number of unique words in a file. (3 Replies)
Discussion started by: EECSDAVE
3 Replies

4. Linux

veritas hasf /etc/mnttab

Hi All, Where is now the /etc/mnttab if you are in veritas sfha for red hat es 4? Thanks in advance for any comments. (2 Replies)
Discussion started by: itik
2 Replies

5. UNIX for Dummies Questions & Answers

/etc/vfstab vs /etc/mnttab

what is the difference between the /etc/vfstab and /etc/mnttab? when i check both files, the content is almost the same. can you enlighten me? what i know is /etc/vfstab is used for hard mounts. (4 Replies)
Discussion started by: hrist
4 Replies

6. Solaris

My /etc/mnttab file is showing ro permission for /usr

Hi All, My current /usr utilization is 100%.As i don't have another harddisk i decided to delete some unnecessary files under /usr.But,while deleteing it is giving error "it is a readonly filesystem".I checked /etc/mnttab file it is showing the following entry /dev/lofi/1 /usr hsfs ... (3 Replies)
Discussion started by: navjotmannan
3 Replies

7. Solaris

what is the difference between /etc/mnttab and /etc/vfstab

what is the difference between /etc/mnttab and /etc/vfstab???? what are these files used for one time i removed mnttab file from my solaris box. infact i renamed it and my solaris box was not booting properly. (12 Replies)
Discussion started by: chidori
12 Replies

8. Solaris

MNTTAB and NFS questions

SunOS 5.10 Generic_142900-15 sun4u sparc SUNW,SPARC-Enterprise I have been asked to move all file from /CV to /EABATCH looking at our mnttab I see these two entries. wdcprodhome:/eabatch/EABATCH /EABATCH nfs nodevices,bg,intr,xattr,zone=cbp011,dev=5500010 1288539528 ... (0 Replies)
Discussion started by: Harleyrci
0 Replies

9. Post Here to Contact Site Administrators and Moderators

Might be silly question

Hi Team, In case if i want to delete one of my posting thread.. can i delete that? Just asking to know.. (5 Replies)
Discussion started by: darling
5 Replies

10. UNIX for Dummies Questions & Answers

/etc/mnttab empty UNIXware 7.1.3

Hi Guys New to this forum so apologies if posted in wrong place. Got a unixware 7.1.3 system (I know !). df -k produces no output which I believe is because /etc/mnttab is empty. Can /etc/mnttab be re-built ? Thanks (2 Replies)
Discussion started by: deel
2 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 07:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy