How do I mount a shared drive with NFS


  1. Posts : 7
    Windows 10
       #1

    How do I mount a shared drive with NFS


    I have most of my data on a Linux machine accessible via NFS. How can I access it on my Windows 10 system?
    I have edited the registry to add Uid and Gid, and enabled the NFS service.
    The mount command eludes me. The examples I see have "-o anon" or "-o nolock" or similar. Microsoft Docs has help for mount showing -o options. When used I get an error saying "-o" is ambiguous and could be OutVariable or OutBuffer.
    If I omit -o I get prompted for Root:
    Am I using the wrong mount command?

    What do I need to mount external files via NFS?
    Thanks
      My Computer


  2. Posts : 11,206
    Windows / Linux : Arch Linux
       #2

    ColliJim said:
    I have most of my data on a Linux machine accessible via NFS. How can I access it on my Windows 10 system?
    I have edited the registry to add Uid and Gid, and enabled the NFS service.
    The mount command eludes me. The examples I see have "-o anon" or "-o nolock" or similar. Microsoft Docs has help for mount showing -o options. When used I get an error saying "-o" is ambiguous and could be OutVariable or OutBuffer.
    If I omit -o I get prompted for Root:
    Am I using the wrong mount command?

    What do I need to mount external files via NFS?
    Thanks
    Hi there @ColliJim

    the easiest way by far is simply to make the Linux shares available to Windows via SAMBA - then you don't need to do anything at all apart from ensuring on the Linux box services nmb(d) and smb(d) are enabled and started.

    Depending on the version of Linux on your NAS box you might have to enable SMB1 on the Windows machines.

    On the Linux box install SAMBA (both client and server) and create / edit the smb.conf file which resides in /etc/samba. It's a simple text file and after editing run the command testparm form a console --that will immediately show if you have any errors. Add yourself on the Linux box to the samba users (as root type smbpasswd -a <your user id> <password>)

    here's a sample smb.conf file which you can model to get started -- I've got almost zero security in this file -but that's a good way to start testing this stuff -- if you have to meddle about with security at the same time then it's difficult to find out if the problem is with your configuration or the network security layer !!!. All lines starting with a ; or # are comments and will be ignored by the SAMBA program. You might also need to allow firewall / router to allow ports 139/445.

    You need to create a readable (at least) directory on the Linux box -- I made one /mnt/DV0 where I mount the HDD that I want shared with windows --in my case I have a RAID 0 array (/dev/md127 on my box) and on the linux box I simply mount this as mount /dev/md127 -t auto -o rw /mnt/DV0.

    Windows now sees this array as HDD0 and can read / write to it at will -- depending on who has access.

    Code:
    #================ Global Settings ===========
    [global]
    # ----------------------- Network-Related Options -------------------------
    # hosts deny = the hosts not allowed to connect. This option can also be used on
    # a per-share basis.
    #
    	workgroup = WORKGROUP
    	server string = Samba Server Version %v
    ;	smb ports = 139 445
    	netbios name = <your Linux computer host name>
    	max protocol = NT1  <====you need this if your NAS only supports SMB1===>
    ;	interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
    ;	hosts allow = 127. 192.168.12. 192.168.13.
            name resolve order = bcast host
            case sensitive = no
    # --------------------------- Logging Options -----------------------------
    #
    # log file = specify where log files are written to and how they are split.
    #
    # max log size = specify the maximum size log files are allowed to reach. Log
    # files are rotated when they reach the size specified with "max log size".
    #
    # log files split per-machine:
    	log file = /var/log/samba/log.%m
    # maximum size of 50KB per log file, then rotate:
    	max log size = 50
    	security = user
    	passdb backend = tdbsam
    
    # local master = when set to no, Samba does not become the master browser on
    # your network. When set to yes, normal election rules apply.
    #
    # os level = determines the precedence the server has in master browser
    # elections. The default value should be reasonable.
    #
    # preferred master = when set to yes, Samba forces a local browser election at
    # start up (and gives itself a slightly higher chance of winning the election).
    #
    local master = yes
    preferred master = yes
    os level = 25
    # dns proxy = no
    # auto services = global
    # interfaces = lo enp2s0f0
    # bind interfaces only = yes
    # server role = standalone server
    
    #----------------------------- Name Resolution -------------------------------
    # --------------------------- Printing Options -----------------------------
    #
    # The options in this section allow you to configure a non-default printing
    # system.
    #
    # load printers = when set you ons to the CUPS library. Setting this
    # option to raw, for example, allows you to use drivers on your Windows clients.
    #
    # printcap name = used to specify an alternative printcap file.
    #
    
    	load printers = yes
    	cups options = raw
    
    ;	printcap name = /etc/printcap
    	# obtain a list of printers automatically on UNIX System V systems:
    ;	printcap name = lpstat
    ;	printing = cups
    #========== Share Definitions ===============
    [homes]
    	comment = Home Directories
    	browseable = yes
    	writable = yes
    ;	valid users = %S
    
    [printers]
    	comment = All Printers
    	path = /var/spool/samba
    	browseable = no
    	guest ok = no
    	writable = no
    	printable = yes
    
     [HDD0]
     	comment Data disc 1
     	path = /mnt/DV0
     	writeable = yes
     	browseable = yes
    Mounting NFS drives might be more usual for some but honestly - especially on home type networks or even small office LAN's - SAMBA is the easiest way to share Linux and Windows files.

    To access Windows files from Linux ensure ntfs-3g package is installed and simply use a file browser using the network-->smbshares (or equivalent menu). click on the Windows machine and then on the Windows directory you want to access --you will normally be prompted for user and password --then you can see and access the Windows files.

    "Seemples".

    I've used NAS servers and Linux for ages --I've never had to bother with NFS mounts ever -- I think the only time these might come into play is when sharing Linux systems not using samba and then some type of import command is used -- I'm neither a Windows or Linux guru so for more info you'll have to go elsewhere --maybe on some 'nix Forums -- however I've found SAMBA more than sufficient and it's "SEEMPLES.." !!

    Cheers
    jimbo
    Last edited by Barman58; 02 Oct 2019 at 06:13.
      My Computer

  3.   My Computer


  4. Posts : 11,206
    Windows / Linux : Arch Linux
       #4

    Hi there
    Doesn't work for the OP if you actually read what he wanted , what he's tried to do and was he was actually trying to achieve.

    IMO SAMBA is still by far the easiest way of achieving what OP wants to do.

    That link also doesn't help anybody -- please if answering problems you need to learn instead of just posting a link to some incomprehensible site (most people on these Forums are quite capable of "Googling" themselves) you need to do something as follows

    a) Posters problem is xxxx
    b) to solve -- do 1) this
    2) this etc etc

    and in the steps provide links if required.

    Looking at your reply I'd be back to square -Z or worse --I'd be even more confused than when I started. !!!

    Not having a go at you per se - but in supplying solutions you need to suggest stuff that leaves the OP less confused than when they started and do basically "an idiot's guide" to how to implement the solution.

    If you've ever taught students of whatever ability you'll understand that the simpler you can explain something --even technical complex things -- then they can understand the basics and progress further.

    A simple demo of that -- just look at the last episode of that excellent TV series chernobyl -- and listen to the guy giving details of how a Soviet RBMK Nuclear reactor could explode -- even if you know ZERO about the workings of Nuclear power. !!!!

    For those interested RBMK - Wikipedia although the Chernobyl program explains it better -- really a Must see TV series if you haven't already seen it -- and those who like nuclear power -- this should be compulsory viewing!!!.

    Cheers
    jimbo
      My Computer


  5. Posts : 7
    Windows 10
    Thread Starter
       #5

    Thanks for the replies. I take it nobody knows why there is a discrepancy between Microsoft's documentation and examples I've seen so far, and the 'mount' command that came with my Windows 10 Pro.

    I don't always do things the easy way, just because.

    Thanks for the sample smb.conf. I tried it but Windows did not see the server. Both machines use "WORKGROUP." I need to learn more about SAMBA.
      My Computer


  6. Posts : 8,692
    Mac OS Catalina
       #6

    NFS is old Novell stuff, has zero to do with Windows or Microsoft. Yes, you have to know a bit about SaMBa. Plenty of wiki’s out there.
      My Computer


  7. Posts : 4,224
    Windows 10
       #7

    @bro67: NFS is a Sun technology, not a Novell technology. It was developed as part of the SunOS environment way back in 1984. I worked for Novell from 1988 until 1994 (actually, 1989 until 1994, because I came in with the Excelan team when Novell acquired that company in June 1989). See the Wikipedia article which also makes it clear that NFS became (and remains) an open standard under the aegis of the IETF through a series of RFCs (1813, 3010, 3530, 7430 and others).
    HTH,
    --Ed--
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 17:33.
Find Us




Windows 10 Forums