Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NAME_MAX in HP-UX

Status
Not open for further replies.

andysys

IS-IT--Management
May 20, 2003
103
0
0
IN

Hi

I have unix box with HP-UX 11.11 installed on it.
The default file name supports 255 cgaracters.
O/P of getconf --

# getconf NAME_MAX /
255
I want to lower the value of NAME_MAX.

Can anyone help me to do the same.

Thanks

Andy
 
I don't believe you can - I don't see NAME_MAX in SAM.

If there is no utility to change NAME_MAX, you would need to edit /usr/include/limits.h and /usr/include/sys/stdio.h, and recompile the kernel and any utilities that rely on the value of NAME_MAX (assuming you have the source code).

This is no trivial task, and probably a Bad Idea.

 

HI

I had seen that entries in /usr/include/limits.h &
stdio.h header files.But I didn't tried that option.
Is there any other option to do so.

Thanks

Andy
 
I don't believe so. Perhaps I should say "If there is another way, I don't know what it is" :)
 
Hi andysys, one way to lower that is using 'convertfs' (check 'man convertfs' for details) particularly if you are using HFS file systems, on the other hand hope you have VxFS which are easier to admin, except /stand which remains as HFS.

Hope this helps a little, regards,
vlan52
[sunshine]

vlan52
The end of wisdom is freedom. The end of culture is perfection. The end of
education is character. The end of knowledge is love.
 
I don't think this will work. convertfs changes an hfs filesystem from supporting a maximum of 14 characters to 255 characters in the filename and it can't be reversed.

My question is, why would you want to lower the NAME_MAX value?
 
Ok bi, yes, that is probably not the answer he was looking for, perhaps the change he is trying to make is to avoid possible performance issues.But I'm just assuming things, he...sorry...

Best regards,
vlan52
[sunshine]

vlan52
The end of wisdom is freedom. The end of culture is perfection. The end of
education is character. The end of knowledge is love.
 
Hi

This is VxFS file system.I gone thro. man convertfs but it
converts HFS to VxFS & converts file name support from 14
chara. to 255.
Requirement is to lower the file name characters support
from 255 to 14.

Thanks

Andy
 
Came across this info regarding your issue andysys, I don't believe it is possible to modify the NAME_MAX value, well actually I agree with Jason´s suggestion but also with: "This is no trivial task, and probably a Bad Idea."


The following limits are not defined in <limits.h>, but are available at run time via the sysconf() or pathconf() functions. Although the values returned by sysconf() or pathconf() for some of these limits are constants, they may vary in future HP-UX releases.

NAME_MAX : 14 for short-filename system; 255 for long-filename system; 12 for CD-ROM file syste

vlan52
The end of wisdom is freedom. The end of culture is perfection. The end of
education is character. The end of knowledge is love.
 
It would really be helpful if you could tell us what you're trying to accomplish here.

I'm sure that changing NAME_MAX on a vxfs filesystem will put you in the unsupported realm if it even works. NAME_MAX is used to construct the inode tables on both the disk and in the kernel. I would be absolutely amazed if changing the value doesn't totally corrupt your filesystem.

If you really just want a filesystem with short filename support, then use hfs.

man mkfs_hfs # See the &quot;-S&quot; option.

Geoff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top