- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- [ftok()-related] Can 'st.st_dev of the same file' ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 12:13 AM
01-10-2012 12:13 AM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>> Where to pick? Via any program that "works" with myexe.
> Use the myexe executable itself.
Our situation is more complicated. We need several ftok-files, their names depend on some input parameters from database.
OK, we will think of that.
Dennis, thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 12:45 AM
01-10-2012 12:45 AM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>We need several ftok-files
You can use the same file and up to 256 values of "id".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 02:19 AM
01-10-2012 02:19 AM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>> We need several ftok-files
> You can use the same file and up to 256 values of "id".
Our "id's" are actually some strings (that are selected from database).
But there is another problem: file "myexe" may be updated (i.e. re-created) from time to time.
We will investigate another solution (possible using also existing ftok()-function).
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 09:35 AM
01-10-2012 09:35 AM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>another problem: file "myexe" may be updated (i.e. re-created) from time to time.
Are there multiple executables that access the shared memory segment? Or you want it to stick around after you update myexe?
I assume you realize that if you file isn't on NFS, you don't have to worry?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 10:10 PM - edited 01-10-2012 10:11 PM
01-10-2012 10:10 PM - edited 01-10-2012 10:11 PM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>>another problem: file "myexe" may be updated (i.e. re-created) from time to time.
>Are there multiple executables that access the shared memory segment? Or you want it to stick around after you update myexe?
No, we don't have multiple executables that access the shared memory segment. The only executable creates (or attaches) different shared memory segments, Names of ftok-files are built on basis some info from data base.
>I assume you realize that if you file isn't on NFS, you don't have to worry?
....
1. It seems that I don't understand this issue. Where may file be: on NFS, something else?
2. But we actually came across this problem: ftok() returned other key for the same non-recreated file between reboots.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 11:33 PM
01-10-2012 11:33 PM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>1. Where may file be: on NFS, something else?
Well more precisely, somewhere where it can be unmounted and mounted. With the automounter, this is transparent.
>2. But we actually came across this problem: ftok() returned other key for the same non-recreated file between reboots.
On HP-UX and not NFS or umount/mount?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2012 12:08 AM
01-11-2012 12:08 AM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>>1. Where may file be: on NFS, something else?
>Well more precisely, somewhere where it can be unmounted and mounted. With the automounter, this is >transparent.
I am not familiar with that issue.
>>2. But we actually came across this problem: ftok() returned other key for the same non-recreated file between reboots.
>On HP-UX and not NFS or umount/mount?
Dennis, sorry. My mistake.
We came across that on Linux. After that I started to check the ftok()-problem on other platforms.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2012 11:40 AM
01-11-2012 11:40 AM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>We came across that on Linux.
As far as I know this only happens transparently with NFS and automounter. Or some sysadmin manually unmounting and mounting filesystems.
Were there any other cases for Linux?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2012 10:14 PM - edited 01-11-2012 10:15 PM
01-11-2012 10:14 PM - edited 01-11-2012 10:15 PM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
@Dennis Handly wrote:>We came across that on Linux.
As far as I know this only happens transparently with NFS and automounter. Or some sysadmin manually unmounting and mounting filesystems.
Were there any other cases for Linux?
About other cases for Linux - I don't know.
I came accross that accidently, because it happened on Linux-machine that I have nothing to do with it.
How was the problkem detected?
While each reading the ftok file I write to that file some relevant info, including generated Key (see attachment TC_SHMTOK1_avinokur_TTT2_TTT1.docx).
In addition, on request we can get brief info about ftok-file (see attachment FtokFilesInfo.docx), that includes all generated Keys for ftok-files.
I was asked about something for that machine and accidently detected that some row in FtokFilesInfo.docx contained 3 keys (not the only key, as it was expected).
It seems, that two keys were from the same reboot interval (so, here we have problematic situation).
Third key was from other reboot interval (so, it may be OK).
I think, we should check generated keys within the same reboot interval (not only write to ftok-file).
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2012 10:41 PM - edited 01-11-2012 10:43 PM
01-11-2012 10:41 PM - edited 01-11-2012 10:43 PM
Re: [ftok()-related] Can 'st.st_dev of the same file' be changed without reboots on HP-UX?
>How was the problem detected?
>While each reading the ftok file I write to that file
> /devjuser1/jp/ccjp/avinokur/tmp/shm_keys_holder
Did someone remove the file since it was in "tmp"?