- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to view NFS and SAMBA shares accessibility...
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
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
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
тАО07-08-2009 04:18 AM
тАО07-08-2009 04:18 AM
I am using HP Unix (10.20, 11.00, 11.11).
I am running NFS and SAMBA services.
1)NFS shares:
One server's (Ex: serverA) NFS shares are mounted with some hpux servers (serverB, serverC and serverD).
I would like to find that which NFS shares of serversA is mounted with which servers (serverB, serverC and serverD) and what is the mount point.
Is it possible that we can see the above details.
2)SAMBA shares:
Some samba shares are configured in one hpux server.
I dont know whether they are being used or not, but configured.
So i want to view what are the samba shares are being used and what are the samba shares are not being used.
And i want to find what are the users are accessing samba shares from which system / servers.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 04:33 AM
тАО07-08-2009 04:33 AM
Re: How to view NFS and SAMBA shares accessibility.
Look out for nfs entry in fstab.
grep - i nfs /etc/fstab | awk '{print $2}'
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 04:55 AM
тАО07-08-2009 04:55 AM
Solution1) showmount -a ${host}. You don't have to be on the system that's nfs exporting filesystems either:
$ showmount -a usilapp3 | tail
usildb12:/exports/usr/data/fdi-svp
usildb12:/exports/usr/data/finmrgps
usildb12:/exports/usr/data/lries
usildb13:/exports/usr/data/fdi-svp
usildb13:/exports/usr/data/finmrgps
usildb17:/exports/usr/data/lries
usildb17:/exports/usr/vertex/V1P
usildb9:/exports/usr/data/finmrgps
usr3db17:/exports/usr/sap/global_trans
usr3db19:/exports/usr/sap/global_trans
2. /opt/samba/bin/smbstatus
$ sudo /opt/samba/bin/smbstatus
Samba version 3.0.22 based HP CIFS Server A.02.03.03
PID Username Group Machine
-------------------------------------------------------------------
26041 oleary users oleary-c1 (135.244.5.207)
Service pid machine Connected at
-------------------------------------------------------
IPC$ 26041 oleary-c1 Wed Jul 8 08:52:49 2009
oleary 26041 oleary-c1 Wed Jul 8 08:52:07 2009
IPC$ 26041 oleary-c1 Wed Jul 8 08:52:33 2009
Locked files:
Pid DenyMode Access R/W Oplock SharePath Name
----------------------------------------------------------------------------------------
26041 DENY_NONE 0x100001 RDONLY NONE /home/oleary working/projects Wed Jul 8 08:52:20 2009
26041 DENY_NONE 0x2019f RDWR NONE /home/oleary working/projects/SAP_2009_Plan.mpp Wed Jul 8 08:52:36 2009
26041 DENY_NONE 0x100001 RDONLY NONE /home/oleary . Wed Jul 8 08:52:09 2009
The displayed output is *very* wide...
HTH;
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 04:57 AM
тАО07-08-2009 04:57 AM
Re: How to view NFS and SAMBA shares accessibility.
If its a permanent NFS Share you can fine it in /etc/fstab
But you can always use showmount -e
For Samba share you can look into samba.conf file.
Regards
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 05:16 AM
тАО07-08-2009 05:16 AM
Re: How to view NFS and SAMBA shares accessibility.
Examining the /etc/fstab file for nfs shares doesn't satisfy the original request. The OP is looking for active mounts. The /etc/fstab tells you what *can* be mounted using a simple mount command, not what *is* mounted. Additionally, if the environment uses the automounter, no nfs mounts will be listed in /etc/fstab.
Same logic for the smb.conf file. It shows what *can* be mounted, not what *is* mounted.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 05:42 AM
тАО07-08-2009 05:42 AM
Re: How to view NFS and SAMBA shares accessibility.
It will read smb.conf only for what to mount.
If Samba is running
Regards
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 06:01 AM
тАО07-08-2009 06:01 AM
Re: How to view NFS and SAMBA shares accessibility.
>>It will read smb.conf only for what to mount.
for what to mount if requested. The original poster wanted to know about active shares. Parsing the smb.conf will only tell you *configured* shared; it does not tell you anything about whether or not they're active.
For example: I exited out of the share listed above.
$ sudo /opt/samba/bin/smbstatus
Samba version 3.0.22 based HP CIFS Server A.02.03.03
PID Username Group Machine
-------------------------------------------------------------------
26041 oleary users oleary-c1 (135.244.5.207)
Service pid machine Connected at
-------------------------------------------------------
oleary 26041 oleary-c1 Wed Jul 8 08:52:07 2009
IPC$ 26041 oleary-c1 Wed Jul 8 09:56:17 2009
No locked files
Now there are no active shares. When I reopen the share, I get the following:
$ sudo /opt/samba/bin/smbstatus
Samba version 3.0.22 based HP CIFS Server A.02.03.03
PID Username Group Machine
-------------------------------------------------------------------
26041 oleary users oleary-c1 (135.244.5.207)
Service pid machine Connected at
-------------------------------------------------------
oleary 26041 oleary-c1 Wed Jul 8 08:52:07 2009
IPC$ 26041 oleary-c1 Wed Jul 8 09:56:17 2009
Locked files:
Pid DenyMode Access R/W Oplock SharePath Name
----------------------------------------------------------------------------------------
26041 DENY_NONE 0x100001 RDONLY NONE /home/oleary . Wed Jul 8 09:56:17 2009
26041 DENY_NONE 0x100001 RDONLY NONE /home/oleary . Wed Jul 8 09:56:17 2009
Close it again and we're back to this:
$ sudo /opt/samba/bin/smbstatus
Samba version 3.0.22 based HP CIFS Server A.02.03.03
PID Username Group Machine
-------------------------------------------------------------------
26041 oleary users oleary-c1 (135.244.5.207)
Service pid machine Connected at
-------------------------------------------------------
oleary 26041 oleary-c1 Wed Jul 8 08:52:07 2009
IPC$ 26041 oleary-c1 Wed Jul 8 09:56:17 2009
No locked files
In only one of those three cases was the share active which, I reiterate, is what the original poster is looking for. Reading the smb.conf in any of those three cases would show the configured share - not the active share.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 06:01 AM - last edited on тАО11-03-2022 03:27 AM by Sunitha_Mod
тАО07-08-2009 06:01 AM - last edited on тАО11-03-2022 03:27 AM by Sunitha_Mod
Re: How to view NFS and SAMBA shares accessibility.
Shalom,
I use showmount -e to show NFS mounts available.
smbstatus is a good way to see what is going on with Samba shares.
It may be cifsstatus on HP-UX, my machines are still turned off at the moment.
Couple of threads with more goodness:http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1121001http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=102508
Moderator Edit: Above links are no longer valid. Please visit the HPE Support Center: https://support.hpe.com
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 06:41 AM
тАО07-08-2009 06:41 AM
Re: How to view NFS and SAMBA shares accessibility.
#showmount -e -> To know the filesystem exported by that server and to whom.
#showmount -a -> To list the clients currently mounted the exported filesystem.
For samba shares use the below commands:
#/opt/samba/bin/testparm -> will check the syntax errors and dump the current configuration including samba shares and user access details.
You can also use cifslist command.
Ganesh.