Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-24-2017, 09:37 AM
|
#1
|
LQ Newbie
Registered: May 2017
Posts: 3
Rep:
|
How do I copy files from CentOS 7.3.1611 (Core) to a Windows NFS Share
I created a bash script to backup some files on my CentOS (7.3.1611 (Core)) which are now in a tar.gz on my CentOS server. I need to copy these files from the CentOS server to a Windows Server NFS share. I tried using the command below but got an error message about wrong fs type.
Question 1: Guessing I need install cifs-utils for that to work?
Question 2: What other options are there to mount this Windows share on my CentOS box instead of using cifs-utils?
[splunk@Server321 windows]$ sudo mount -t cifs -o user=user123 //10.10.70.174/share /mnt/windows
mount: wrong fs type, bad option, bad superblock on //10.10.70.174/share,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
|
|
|
05-24-2017, 10:27 AM
|
#2
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,912
|
1. Windows does not do NFS as a native service, you would have to load special software to present as NFS. Windows presents a share using SMB (older) or CIFS (newer). If you attempt something that either server does not support you will have problems.
2. Is your share offered using the native windows tools?
If it is, then something like smbclient from the samba package tools should work. It allows you to transfer to and from cifs/smb shares like you were using an ftp or sftp command-line file transfer tool. This does NOT require that it be mounted, but it DOES require that you have the path, authentication, server, and other options correct.
3. If you really want to mount it like that, did you check if you need the user password on the command line?
4. Did you try the mount.cifs tool as described in the messages?
5. did you check your syslog messages in /var/log and see if it looked additional information?
Last edited by wpeckham; 05-24-2017 at 10:29 AM.
|
|
1 members found this post helpful.
|
05-24-2017, 10:28 AM
|
#3
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
Did you install cifs-utils? Since you asked, the quick answer would be to try it and the package information would suggest that this maybe needed.
Code:
# yum info cifs-utils
...
Available Packages
Name : cifs-utils
Arch : x86_64
Version : 6.2
Release : 9.el7
Size : 84 k
Repo : base/7/x86_64
Summary : Utilities for mounting and managing CIFS mounts
URL : http://linux-cifs.samba.org/cifs-utils/
Licence : GPLv3
Description : The SMB/CIFS protocol is a standard file sharing protocol widely deployed
: on Microsoft Windows machines. This package contains tools for mounting
: shares on Linux using the SMB/CIFS protocol. The tools in this package
: work in conjunction with support in the kernel to allow one to mount a
: SMB/CIFS share onto a client and use it as if it were a standard Linux
: file system.
|
|
1 members found this post helpful.
|
05-24-2017, 10:33 AM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,130
|
In addition, if running a desktop you should be able to use the file browser to browse and access windows shares without installing cifs-utils
|
|
1 members found this post helpful.
|
05-24-2017, 11:31 AM
|
#5
|
LQ Newbie
Registered: May 2017
Posts: 3
Original Poster
Rep:
|
Follow up
Quote:
Originally Posted by wpeckham
1. Windows does not do NFS as a native service, you would have to load special software to present as NFS. Windows presents a share using SMB (older) or CIFS (newer). If you attempt something that either server does not support you will have problems.
2. Is your share offered using the native windows tools?
If it is, then something like smbclient from the samba package tools should work. It allows you to transfer to and from cifs/smb shares like you were using an ftp or sftp command-line file transfer tool. This does NOT require that it be mounted, but it DOES require that you have the path, authentication, server, and other options correct.
3. If you really want to mount it like that, did you check if you need the user password on the command line?
4. Did you try the mount.cifs tool as described in the messages?
5. did you check your syslog messages in /var/log and see if it looked additional information?
|
My sysadmin told me that they loaded NFS on that Windows file server for those shares. With that being said, I could use either NFS or CIFS correct? Also, I would have to install either nfs-utils or the smbclient on the CentOS server correct? I like the idea of not having to mount the share so I may test out the smbclient method. Any advantage of using the NFS-UTILS over CIFS and smbclient?
|
|
|
05-24-2017, 03:51 PM
|
#6
|
LQ Newbie
Registered: May 2017
Posts: 3
Original Poster
Rep:
|
Hey guys thanks for your help I went with the NFS client install app and all is working now.
|
|
|
05-24-2017, 06:47 PM
|
#7
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,912
|
Quote:
Originally Posted by SecGuy
My sysadmin told me that they loaded NFS on that Windows file server for those shares. With that being said, I could use either NFS or CIFS correct?
|
You clearly no longer need this information now, but the answer is "no". There is no forces relation between NFS shares and CIFS shares, so they will only match if the admin forced it that way.
I am very glad your problem is solved. Thank you for the interesting thread.
|
|
|
All times are GMT -5. The time now is 04:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|