This is a discussion on Diff. between f_bavail & f_bfree in statfs sys call??? (need a method to find the fs reserved space) within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi gurus, I would like to the know the diff between the following two elements of the statfs structure ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi gurus, I would like to the know the diff between the following two elements of the statfs structure in AIX... fsblkcnt_t f_bfree; /* free block in fs */ fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */ In AIX, both elements have the same value. But in other UNIX versions, such as Solaris & HP_UX, they differ by a few megabytes. So that difference amount gives me the filesystem sapce reserved for the superuser. Is there any reason for this behaviour in AIX? I am in need of calculating the file system space reserved for superuser in AIX. Is there any other method of getting it? Any pointers on this topic would be helpful. TIA! Cheers Raj. PS: attaching statfs structure for a reference! --------------------------- /* * file system statistics * NOTE: f_version is UNUSED NOW, but should be set to 0! * NOTE: all other reserved fields should be cleared by the vfs implementation */ struct statfs { int f_version; /* version/type of statfs, 0 for now */ int f_type; /* type of info, zero for now */ ulong_t f_bsize; /* optimal file system block size */ fsblkcnt_t f_blocks; /* total data blocks in file system */ fsblkcnt_t f_bfree; /* free block in fs */ fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */ fsfilcnt_t f_files; /* total file nodes in file system */ fsfilcnt_t f_ffree; /* free file nodes in fs */ #if !defined(_KERNEL) && defined(__64BIT__) fsid64_t f_fsid; /* file system id */ #else fsid_t f_fsid; /* file system id */ #endif int f_vfstype; /* what type of vfs this is */ ulong_t f_fsize; /* fundamental file system block size */ int f_vfsnumber; /* vfs indentifier number */ int f_vfsoff; /* reserved, for vfs specific data offset */ int f_vfslen; /* reserved, for len of vfs specific data */ int f_vfsvers; /* reserved, for vers of vfs specific data */ char f_fname[32]; /* file system name (usually mount pt.) */ char f_fpack[32]; /* file system pack name */ int f_name_max; /* maximum component name length for posix */ }; |
| |||
| Hi Raj, under AIX, there is no "root-reserved" disk space. The value is then allways 0. Regards, Stephane Raj a écrit: > > Hi gurus, > > I would like to the know the diff between the following two elements > of the statfs structure in AIX... > > fsblkcnt_t f_bfree; /* free block in fs */ > fsblkcnt_t f_bavail; /* free blocks avail to non-superuser > */ > > In AIX, both elements have the same value. But in other UNIX versions, > such as Solaris & HP_UX, they differ by a few megabytes. So that > difference amount gives me the filesystem sapce reserved for the > superuser. > > Is there any reason for this behaviour in AIX? > > I am in need of calculating the file system space reserved for > superuser in AIX. Is there any other method of getting it? > > Any pointers on this topic would be helpful. > > TIA! > > Cheers > Raj. |
| |||
| > Hi Raj, > under AIX, there is no "root-reserved" disk space. > The value is then allways 0. > Hi Stephane, Thanks for your reply. Is there a way to allocate some space reserved for root while creating a file system? The reserved space is zero for the file systems that are created with default values. So if there is a way to mention the reserved size during an fs creation, I can chek it out. TIA! Cheers Raj. |
| ||||
| Hi again, Raj, As I wrote, there is no root-reserved disk space. That is why you cannot allocate space reserved for root. AIX does not allow root-only access to a reserved part. Just forget it under AIX. Raj a écrit: > > > Hi Raj, > > under AIX, there is no "root-reserved" disk space. > > The value is then allways 0. > > > > Hi Stephane, > > Thanks for your reply. Is there a way to allocate some space reserved > for root while creating a file system? > > The reserved space is zero for the file systems that are created with > default values. So if there is a way to mention the reserved size > during an fs creation, I can chek it out. > > TIA! > > Cheers > Raj. |