HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mount using an NFS file handle
Operating System - HP-UX
1829103
Members
2442
Online
109986
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-19-2005 11:21 PM
04-19-2005 11:21 PM
Mount using an NFS file handle
I am trying to mount a fileystem from a remote server using NFS. I can do this from command line OK, but I am trying to do it programatically in C/C++.
I can get the NFS file handle for the file on the remote machine I am interested in, but I can't get the mount(2) command to work I keep getting EINVAL. This is not helped by the fact that I don't actually know what the dataptr argument for the mount(2) command is supposed to be for an NFS mount. I have
fs = "" (that's what trace showed)
path = directory path on remote machine
mflag = MS_DATA (that's what trace showed)
fstype = "nfs3" (that's what trace showed)
dataptr = char[64] with first 32 bytes = fhandle returned by clnt_call
datalen = 64 (that's what trace showed)
Having traced a successful command line mount, I can see that the datalen argument is 64 bytes, so I assume that dataptr is the address of a structure of size 64 bytes. The file handle I get back is only 32 bytes, (as it is a fhandle type) and looks OK.
The clnt_create(), authsys_create_default() and clnt_call() calls all complete successfully.
I can get the NFS file handle for the file on the remote machine I am interested in, but I can't get the mount(2) command to work I keep getting EINVAL. This is not helped by the fact that I don't actually know what the dataptr argument for the mount(2) command is supposed to be for an NFS mount. I have
fs = "" (that's what trace showed)
path = directory path on remote machine
mflag = MS_DATA (that's what trace showed)
fstype = "nfs3" (that's what trace showed)
dataptr = char[64] with first 32 bytes = fhandle returned by clnt_call
datalen = 64 (that's what trace showed)
Having traced a successful command line mount, I can see that the datalen argument is 64 bytes, so I assume that dataptr is the address of a structure of size 64 bytes. The file handle I get back is only 32 bytes, (as it is a fhandle type) and looks OK.
The clnt_create(), authsys_create_default() and clnt_call() calls all complete successfully.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 11:59 PM
04-19-2005 11:59 PM
Re: Mount using an NFS file handle
Stephen,
I assume you have had alook through the
/usr/include/sys/mount.h
Also for somebody elses code:
http://www.koders.com/c/fid838F9F10371C15E1D4B681A6A838130D0F99DF4D.aspx
(Have not read ALL the code, but is in the right area I think)
Regards
I assume you have had alook through the
/usr/include/sys/mount.h
Also for somebody elses code:
http://www.koders.com/c/fid838F9F10371C15E1D4B681A6A838130D0F99DF4D.aspx
(Have not read ALL the code, but is in the right area I think)
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 12:38 AM
04-20-2005 12:38 AM
Re: Mount using an NFS file handle
Yes I've had an extensive rummage through the /usr/include area.
I'd seen the file you posted, but as I said when I trace the call the mount system call is being given a 64 byte structure and the nfs_mount_data in the example code is way bigger than that. S'worth a try I guess.
I'd seen the file you posted, but as I said when I trace the call the mount system call is being given a 64 byte structure and the nfs_mount_data in the example code is way bigger than that. S'worth a try I guess.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP