Operating System - HP-UX
1748063 Members
6032 Online
108758 Solutions
New Discussion юеВ

Re: unmounted filesystem size

 
SOLVED
Go to solution
Vacquier
Occasional Advisor

unmounted filesystem size

Hi,
On hp-ux, statfs or statvfs C functions return structure which gives information about a mounted filesystem (it is the sizes which interest me). On solaris, for exemple, the same functions can give also information about unmounted filesystems. Does anyone know how it is possible to do the same thing on hp-ux ? The use of statfs (or statvfs) gives wrong information.
Thanks
Serge
4 REPLIES 4
Michael Tully
Honored Contributor

Re: unmounted filesystem size

Hi,

I think what your after is this:

I want to have a look at say /usr

# fstyp -v /dev/vg00/lvol6
vxfs
version: 4
f_bsize: 8192
f_frsize: 1024
f_blocks: 1048576
f_bfree: 334076
f_bavail: 313197
f_files: 112444
f_ffree: 83516
f_favail: 83516
f_fsid: 1073741830
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 5
f_size: 1048576
# bdf /usr
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol6 1048576 714500 313232 70% /usr

Have a look at the man page for further information.

HTH
~Michael~
Anyone for a Mutiny ?
Vacquier
Occasional Advisor

Re: unmounted filesystem size

Hi Michael,

that is the data I'm looking for, but I need to access them by C functions (for performance constraint). But the statfs function allows only access to mounted filesystems, that is the problem; I need these datas for unmounted filesystems too.

Serge
Andreas Voss
Honored Contributor
Solution

Re: unmounted filesystem size

Hi,

i found what you need:

Instead statvfs() you have to use

statvfsdev() for unmounted filessystems.

Regards
Vacquier
Occasional Advisor

Re: unmounted filesystem size

Hi Andreas,

that is exactly what I wanted.
Thanks

Serge