File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,27 @@ let vgs_offline =
4747 )
4848 )
4949
50+ let lvchange_offline =
51+ " lvchange vg/lv --offline: check that we can activate volumes offline" > ::
52+ fun () ->
53+ with_temp_file (fun filename' ->
54+ with_loop_device filename' (fun loop ->
55+ xenvm [ " vgcreate" ; vg; loop ] |> ignore_string;
56+ xenvm [ " set-vg-info" ; " --pvpath" ; loop; " -S" ; " /tmp/xenvmd" ; vg; " --local-allocator-path" ; " /tmp/xenvm-local-allocator" ; " --uri" ; " file://local/services/xenvmd/" ^ vg ] |> ignore_string;
57+ file_of_string " test.xenvmd.conf" (" ( (listenPort ()) (listenPath (Some \" /tmp/xenvmd\" )) (host_allocation_quantum 128) (host_low_water_mark 8) (vg " ^ vg^ " ) (devices (" ^ loop^ " )))" );
58+ xenvmd [ " --config" ; " ./test.xenvmd.conf" ; " --daemon" ] |> ignore_string;
59+ Xenvm_client.Rpc. uri := " file://local/services/xenvmd/" ^ vg;
60+ Xenvm_client. unix_domain_socket_path := " /tmp/xenvmd" ;
61+ finally
62+ (fun () ->
63+ xenvm [ " lvcreate" ; " -n" ; " test" ; " -L" ; " 3" ; vg ] |> ignore_string;
64+ ) (fun () ->
65+ xenvm [ " shutdown" ; " /dev/" ^ vg ] |> ignore_string
66+ );
67+ xenvm [ " lvchange" ; " -ay" ; vg ^ " /test" ; " --offline" ] |> ignore_string;
68+ )
69+ )
70+
5071let pvremove =
5172 " pvremove <device>: check that we can make a PV unrecognisable" > ::
5273 (fun () ->
@@ -69,6 +90,7 @@ let pvremove =
6990let no_xenvmd_suite = " Commands which should work without xenvmd" > ::: [
7091 vgcreate;
7192 vgs_offline;
93+ lvchange_offline;
7294 pvremove;
7395]
7496
You can’t perform that action at this time.
0 commit comments