1

我正在尝试将驱动器从位于另一条路径中的路径重新安装。我正在尝试使用 Chef Opscode 执行此操作。该驱动器是带有 m1.medium 类型的临时驱动器。

我在运行 chef-client 时收到此错误堆栈跟踪:

  Chef::Log.info("About to re-mount dev/xvdb in /testpath ")
  # Mount additional volumes for data, configure them via LVM
mount "/testpath" do
  device  "/dev/xvdb"
  # I am using Chef 10 and following the documentation on the mount resource
  action  [ :remount, :enable ]  
end

我看到以下日志:

[2013-11-06T01:46:08+00:00] ERROR: Running exception handlers
[2013-11-06T01:46:09+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-11-06T01:46:09+00:00] ERROR: Exception handlers complete
[2013-11-06T01:46:09+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-11-06T01:46:09+00:00] FATAL: Chef::Exceptions::UnsupportedAction: mount[/testpath] (my_cookbook::_my_recipe line 42) had an error: Chef::Exceptions::UnsupportedAction: #<Chef::Provider::Mount::Mount:0x000000046ad980> does not support :remount
4

2 回答 2

1

日志消息的相关部分

Chef::Exceptions::UnsupportedAction: #<Chef::Provider::Mount::Mount:0x000000046ad980> does not support :remount

您的设备不支持重新挂载操作。

于 2013-11-06T23:47:39.557 回答
0

So, the :remount command did not work for me but I tried :mount and that worked.

Plus I had to make sure that the directory called "/testpath" exists first...

So now I have smth like

Chef::Log.info("About to re-mount dev/xvdb in /testpath ")
  # Mount additional volumes for data, configure them via LVM
directory "/testpath" do
  owner "root"
  group "root"
  mode 00755
  action :create
end

mount "/testpath" do
  device  "/dev/xvdb"
  # I am using Chef 10 and following the documentation on the mount resource
map_point "/testpath"
  action  [ :remount, :enable ]  
end
于 2013-11-06T23:23:53.747 回答