- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: fcntl issue HPUX
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
Forums
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
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
04-22-2004 05:53 PM
04-22-2004 05:53 PM
fcntl issue HPUX
I m running this program both on solaris and HPUX. Its successful in solaris but it failed in HPUX. Both system has 64 bit OS.
Details of the machine is given below. Dont know y its happening ? I dont know whether my file system is enable for large files. ? If NO how can i check this ?
Hope to get speedy reply..
Thanks
Hemant
solaris
Uname -a
SunOS sun250 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-250
cc -c $1.c -xarch=v9 -misalign
cc -o $1 $1.o -xarch=v9 -misalign
uname -a
HPUX
HP-UX hpux110 B.11.00 U 9000/800 106901527 unlimited-user license
Compilation option used
cc -c $1.c +DD64 +M2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
cc -o $1 $1.o +DD64 +M2 -D_FILE_OFFSET_BITS=64 -D_KERNEL -D_LARGEFILE64_SOURCE
#include
#include
#include
#include
#include
main()
{
int iCommand;
struct flock64 sFlock;
int fd;
if ((fd = open64("test1.c", O_RDWR)) == -1) {
perror("open");
exit(1);
}
iCommand = F_SETLK64;
sFlock.l_type = F_UNLCK;
sFlock.l_whence = SEEK_SET;
sFlock.l_start = 0;
/*
sFlock.l_len = 4611686018427387903;
sFlock.l_len = 1073741823;
1073741823 this lenght is successful in HPUX
*/
sFlock.l_len = 4611686018427387903;
sFlock.l_pid = getpid();;
if (fcntl (fd, iCommand, &sFlock)) {
perror(" ");
return (-1);
}
else printf(" Sussess \n");
return (0);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 06:01 PM
04-22-2004 06:01 PM
Re: fcntl issue HPUX
# fstyp -v /dev/my/rmylvol
The f_flag field must equal 16
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 11:16 PM
04-22-2004 11:16 PM
Re: fcntl issue HPUX
As far as Largefiles Options is concerned you can always check it thr' #sam command.
1. Go to SAM menu
2. Select Disk And FileSystems
3. Select Filesystems
4. Select Your FileSystem
5. Use TAB and Arroy key's to select "Actions" menu.
6. Select Modify
7. You will see one option Below as:
[ ] Allow Larger Files
8. See if there is cross in the square brackets
9. If you want to enable it, simply go on that option and check one. Press OK.
10. That's all
Make sure during this modification nobody is using the File system becuase SAM will make the change and unmount that particular filesystem and remount it.
SAM is the simplest method to change the FileSystem related options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 11:20 PM
04-22-2004 11:20 PM
Re: fcntl issue HPUX
/dev/vg00/mylvol /myFileSystem vxfs delaylog,nodatainlog,largefiles,rw,suid 0 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 11:43 PM
04-22-2004 11:43 PM
Re: fcntl issue HPUX
If u r using vxfs filesystem .
then use fsadm -v .
It will tell filesystem is configured for largefiles ...
if required u can convert the filesytems for largefiles support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2004 03:39 AM
04-23-2004 03:39 AM
Re: fcntl issue HPUX
sFlock.l_len = 4611686018427387903;
exceeds the maximum supported file size (2TB).