NFS mount not working Windows Server


#1

Hi,
Have my NFS configure in Ubuntu and mapping to Windows Server

mount 'T:' do
action :mount
device '\\9.10.22.10\var\nfs\general'
end

Iam able to mount the same via in command line successfully
net use H: \9.10.22.10\var\nfs\general
Please let me know any alternate method to follow
Thanks


#2

Do you have a stacktrace ?


#3

Caused by Chef::Exceptions::Win32APIError: The network path was not found.
---- Begin Win32 API output ----
System Error Code: 53
System Error Message: The network path was not found.
---- End Win32 API output ----

C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/win32/error.rb:81:in raise!' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/win32/net.rb:305:innet_use_add_l2'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/util/windows/net_use.rb:48:in add' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/provider/mount/windows.rb:64:inmount_fs'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/provider/mount.rb:43:in block in action_mount' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/mixin/why_run.rb:52:inadd_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/provider.rb:216:in converge_by' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/provider/mount.rb:42:inaction_mount'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/provider.rb:171:in run_action' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource.rb:592:inrun_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/runner.rb:70:in run_action' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/runner.rb:98:inblock (2 levels) in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/runner.rb:98:in each' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/runner.rb:98:inblock in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource_collection/resource_list.rb:94:in block in execute_each_resource' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:114:incall_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:85:in step' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:103:initerate'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/resource_collection/resource_list.rb:92:inexecute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/runner.rb:97:in converge' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/client.rb:718:inblock in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/client.rb:713:in catch' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/client.rb:713:inconverge'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/client.rb:752:in converge_and_save' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/client.rb:286:inrun'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application.rb:274:in run_with_graceful_exit_option' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application.rb:250:inblock in run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/local_mode.rb:44:in with_server_connectivity' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application.rb:233:inrun_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application/client.rb:470:in sleep_then_run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application/client.rb:459:inblock in interval_run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application/client.rb:458:in loop' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application/client.rb:458:ininterval_run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application/client.rb:442:in run_application' C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/lib/chef/application.rb:59:inrun'
C:/opscode/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4-universal-mingw32/bin/chef-client:26:in <top (required)>' C:/opscode/chef/bin/chef-client:75:inload'
C:/opscode/chef/bin/chef-client:75:in `'


#4

Successful when in mount in PowerShell command

PS C:\Windows\system32> net use G: \9.10.22.10\var\nfs\general
The command completed successfully.


#5

Network path error makes me think of a backslash issue

Mount a remote folder in Microsoft Windows.

mount 'T:' do
action :mount
device '\\\\hostname.example.com\\folder'
end

https://docs.chef.io/resource_mount.html


#6

Seems no luck

Output

resolving cookbooks for run list: ["testing"]
[2018-08-15T12:14:31+05:30] INFO: Loading cookbooks [testing@0.1.0]
Synchronizing Cookbooks:
[2018-08-15T12:14:31+05:30] INFO: Storing updated cookbooks/testing/recipes/default.rb in the cache.

  • testing (0.1.0)
    Installing Cookbook Gems:
    Compiling Cookbooks...
    Converging 2 resources
    Recipe: testing::default
  • ruby_block[Create Directory] action run[2018-08-15T12:14:31+05:30] INFO: Processing ruby_block[Create Directory] action run (testing::default line 8)
    (skipped due to not_if)

  • mount[T:] action mount[2018-08-15T12:14:31+05:30] INFO: Processing mount[T:] action mount (testing::default line 18)

    ================================================================================
    Error executing action mount on resource 'mount[T:]'

    ArgumentError

    The network path was not found.
    ---- Begin Win32 API output ----
    System Error Code: 53
    System Error Message: The network path was not found.
    ---- End Win32 API output ----

    Resource Declaration:

    In c:/chef/cache/cookbooks/testing/recipes/default.rb

    18: mount 'T:' do
    19: action :mount
    20: device '\\hostname\var\nfs\general'
    21: end
    22:

    Compiled Resource:

    Declared in c:/chef/cache/cookbooks/testing/recipes/default.rb:18:in `from_file'

    mount("T:") do
    action [:mount]
    default_guard_interpreter :default
    mount_point "T:"
    device "\\hostname\var\nfs\general"
    device_type :device
    fsck_device "-"
    fstype "auto"
    options ["defaults"]
    dump 0
    pass 2
    username nil
    password "sensitive value suppressed"
    domain nil
    declared_type :mount
    cookbook_name "testing"
    recipe_name "default"
    supports {:remount=>false}
    end

    System Info:

    chef_version=13.10.4
    platform=windows
    platform_version=6.3.9600
    ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32]
    program_name=C:/opscode/chef/bin/chef-client
    executable=C:/opscode/chef/bin/chef-client

[2018-08-15T12:14:34+05:30] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2018-08-15T12:14:34+05:30] ERROR: Running exception handlers
Running handlers complete
[2018-08-15T12:14:34+05:30] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 05 seconds
[2018-08-15T12:14:34+05:30] INFO: Sending resource update report (run-id: ba0013e6-067b-445e-a32b-a06534bb9e15)
[2018-08-15T12:14:34+05:30] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
[2018-08-15T12:14:34+05:30] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-08-15T12:14:34+05:30] FATAL: ArgumentError: mount[T:] (testing::default line 18) had an error: ArgumentError: The network path was not found.
---- Begin Win32 API output ----
System Error Code: 53
System Error Message: The network path was not found.
---- End Win32 API output ----