1748021 Members
4495 Online
108757 Solutions
New Discussion юеВ

FILE INODE & DISK QUOATA

 
SOLVED
Go to solution
Vinayak_HPUX
Frequent Advisor

FILE INODE & DISK QUOATA

As per the my concern maximum files of 0 byte sized is not depend on the disk size it's depend on number of inodes on the disk. My Q? is

How many [maximum], 0 byte sized file we can create on particular disk partition[example of 10MB disk] Could u plz suggest any formula if any?
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
14 REPLIES 14
Dennis Handly
Acclaimed Contributor
Solution

Re: FILE INODE & DISK QUOATA

Any reason you care about this? If they are 0 size, you might as well keep them in a database or a text file.
Bill Hassell
Honored Contributor

Re: FILE INODE & DISK QUOATA

For HP-UX using the VxFS filesystem (not HFS), there is no practical limit to inodes -- they are created as needed (not fixed at newfs time). That said, if you will have tens or hundreds of thousands of these files, you will have to educate everyone about the big issues with large directories. Using file matching characters like * and ? can produce massively long command lines. You'll need to become familiar with xargs and forget simple commands like ll *


Bill Hassell, sysadmin
Vinayak_HPUX
Frequent Advisor

Re: FILE INODE & DISK QUOATA

I have mounted volume of 1GB size with vxfs FS on mount point /mnt1 & Let one script which is creating 1010 files of 2048 Byte & excceds limits of 1GB while creting 1006 file & gives vx_nospace issue
==================================
for i in `echo {1..1010}`; do dd if=/dev/zero of=/mnt1/VINfile$i count=1024 bs=1024; echo "$i done"; done
==================================
So here it is allocating max 1010 inodes for 1010 files & giving vx_nospace message due to lack of space. but how could I allocate all the inodes from that 1GB disk but creating 'x' number of files on 1GB disk OR how could I came to know the inode limit on that particular 1GB vxfs mounted volume.... ?

below script will create 0 sized files
==================================
for i in `echo {1..30000}`; do touch /mnt1/vinfile$i; echo "$i done"; done
==================================
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Sunny123_1
Esteemed Contributor

Re: FILE INODE & DISK QUOATA

Hi

For VxFS filesystems, 'inodes' allocation is unlimited, as long as there is space in the filesystem and as long as 'largefiles' is enabled. Wthout 'largefiles' enabled, you are limited to about 8-million inodes


Regards
Sunny
Sunny123_1
Esteemed Contributor

Re: FILE INODE & DISK QUOATA

Hi

You can use

df -F vxfs -i or

bdf -i /filesystem to see the free and used inodes.


Regards
Sunny
Dennis Handly
Acclaimed Contributor

Re: FILE INODE & DISK QUOATA

>how could I know the inode limit on that particular 1GB vxfs volume?

There is no fixed inode limit. What you have is a fixed size 1 Gb. You can carve it up with lots of data and a few inodes, or lots of inodes and little data.

If you really want to know the formula, it would be related to the size of each inode and the directory size. The size of any other vxfs metadata and overhead, etc.
Vinayak_HPUX
Frequent Advisor

Re: FILE INODE & DISK QUOATA

[root@sfqapa27][/mnt1]$ bdf -i /mnt1
Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vx/dsk/testdg/vol1
1048576 21994 966644 2% 3 256645 0% /mnt1
[root@sfqapa27][/mnt1]$ ls
So here .....below script should exceed the limit & should give vX_nospace OR should show inode limit exceeded
[root@sfqapa27][/mnt1]$ for i in `echo {1..256646}`; do touch vinfile$i; echo "$i done"; done > /dev/null > 2&>1
IS IT correct... ?
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Sunny123_1
Esteemed Contributor

Re: FILE INODE & DISK QUOATA

Hi

if you are using VxFS filesystems then inodes allocation is unlimited.


Regards
Sunny
Dennis Handly
Acclaimed Contributor

Re: FILE INODE & DISK QUOATA

>below script should exceed the limit & should give vx_nospace OR should show inode limit exceeded. IS IT correct?

Perhaps or perhaps not. You have at least that many inodes but vxfs will make more. IF you don't run out of directory space and other metadata requirements.