1833800 Members
2557 Online
110063 Solutions
New Discussion

inode question

 
Jeff_Traigle
Honored Contributor

inode question

I was sent down the path of trying to put a license file on a specific inode moving from one system to another to save a whole $50 per incident to re-enable. While I doubt seriously this will work since there must be some system specific parameter the software uses to generate this file and not just the inode it sits on, the exercise to prove this will no doubt be required to satisfy the manager involved. I found the very good replies from A. Clay Stephenson from last year on this subject, however, in trying to run a test Friday, I ran into the problem that I filled the file system without ever getting a file on the inode I was targeting. Some of the files were assigned sequential inode numbers far larger than my target and others assigned apparently random numbers both above and below my target. So, given this empirical evidence, it appears that trying to consistently make this work could take a very, very long time (potentially filling the file system and clearing all of the temporary files numerous times trying to get lucky in hitting the target).

So my question...

What determines the maximum value an inode number can be? If I can find that, maybe I can make some statistical argument that it's not worth attempting even if the inode is the only parameter this license file uses. :) (The easy route of having the company tell me any system specific parameters they use to generate the license didn't work because they won't divulge even that much because it's "proprietary information"... not that the manager who thinks this will work likely would take their word that it won't even if they would divulge some information.)

In case it matters, this is HP-UX 11.00 and the file resides on the root file system in the root directory, which is an LVM logical volume.
--
Jeff Traigle
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: inode question

It depends upon whether the filesystem is hfs or vxfs. Because / is almost certainly vxfs the maximum existing inode value can be determined by df -i; however, most likely / was created with the default ninode=0 and thus is unlimited (well, actually bounded by the free space within the filesystem). It is possible that / was created with a fixed number of inodes; you can determine that with
mkfs -F vxfs -m /dev/vg00/lvol3 which displays the commands that were used to create an existing filesystem.

Most license files which encode the inode number also encode the hostname and/or IP address and I know of one that also encodes the inode number of the parent directory of the license file as well; unless you can get all of these things to "align", you are probably out of luck.

If it ain't broke, I can fix that.

Re: inode question

Jeff,

perhaps its time to point out to your manager you've already spent more that $50 of your time trying to get this to work - where's the saving there?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Jeff_Traigle
Honored Contributor

Re: inode question

It's vxfs. Just so I'm sure I understand... since the root file system, in this case, has 8960 total inodes (according to df -i), the the range of inode numbers assigned to files will be 0 to 8959? Or would the system be able to assign any unsigned 32-bit interger value (or is it some other interger type being used) as the inode number, but only allow 8960 of them to exist in the file system?
--
Jeff Traigle
Jeff_Traigle
Honored Contributor

Re: inode question

I think it's a pointless exercise she's convinced herself into believing, but this isn't a one-time occurrence she's trying to avoid the cost of. Aside from the technical aspect that makes it impossible or impractical, what she's wanting to do isn't even allowed by the licensing agreement according to the software company. In the end, she won't get what she wants for both technical and legal reasons, but, if she wanted to pay me to research the technical aspects of trying it despite me telling her it wouldn't work up front, who am I to complain? I get to learn more about inodes than I knew before. :)
--
Jeff Traigle
Jeff_Traigle
Honored Contributor

Re: inode question

Oops... misunderstood Clay's comments... running an infinite loop of touching files, clarified that df -i shows the maximum *assigned* inode number, not the maximum value possible... so I guess the only question I have left is simply... what type of integer is the inode number? (unsigned 16-bit? unsigned 32-bit? unsigned 64-bit?)
--
Jeff Traigle
A. Clay Stephenson
Acclaimed Contributor

Re: inode question

The inodes range sequentially from 0 to a maximum value. (It's slightly more cpmplicated in that a few low-number inodes have special meaning; e.g. inode 2 is always the top of the filesystem tree.) If the vxfs filesystem was configured with inodes unlimited then the total can grow above that reported by df -i.

If it ain't broke, I can fix that.