Skip to content

Commit 21a49bc

Browse files
committed
Merge pull request #110 from xapi-project/remove-activate
xenvm: remove old 'activate' command (use 'lvchange' instead)
2 parents 334be51 + dd40e70 commit 21a49bc

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

xenvm/xenvm.ml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,6 @@ let create config name size =
8383
(let size_in_bytes = Int64.mul 1048576L size in
8484
Client.create ~name ~size:size_in_bytes ~tags:[])
8585

86-
let activate config lvname path pv =
87-
let module Devmapper = (val !Xenvm_common.dm : Devmapper.S.DEVMAPPER) in
88-
set_uri config None;
89-
Lwt_main.run
90-
(Client.get_lv ~name:lvname
91-
>>= fun (vg, lv) ->
92-
(* To compute the targets, I need to be able to map PV ids
93-
onto local block devices. *)
94-
Mapper.read [ pv ]
95-
>>= fun devices ->
96-
let targets = Mapper.to_targets devices vg lv in
97-
let name = Mapper.name_of vg lv in
98-
Devmapper.create name targets;
99-
Devmapper.mknod name path 0o0600;
100-
return ())
101-
10286
let host_create copts (vg_name,_) host =
10387
let t =
10488
get_vg_info_t copts vg_name >>= fun info ->
@@ -257,21 +241,6 @@ let create_cmd =
257241
Term.(pure create $ copts_t $ lvname $ size),
258242
Term.info "create" ~sdocs:copts_sect ~doc ~man
259243

260-
let activate_cmd =
261-
let doc = "Activate a logical volume on the host on which the daemon is running" in
262-
let man = [
263-
`S "DESCRIPTION";
264-
`P "Activates a logical volume";
265-
] in
266-
let path =
267-
let doc = "Path to the new device node" in
268-
Arg.(required & pos 0 (some string) None & info [] ~docv:"PATH" ~doc) in
269-
let physical =
270-
let doc = "Path to the (single) physical PV" in
271-
Arg.(required & pos 1 (some string) None & info [] ~docv:"PV" ~doc) in
272-
Term.(pure activate $ copts_t $ lvname $ path $ physical),
273-
Term.info "activate" ~sdocs:copts_sect ~doc ~man
274-
275244
let host_connect_cmd =
276245
let doc = "Connect to a host" in
277246
let man = [
@@ -341,7 +310,7 @@ let default_cmd =
341310
let cmds = [
342311
Lvresize.lvresize_cmd;
343312
Lvresize.lvextend_cmd;
344-
format_cmd; create_cmd; activate_cmd;
313+
format_cmd; create_cmd;
345314
shutdown_cmd; host_create_cmd; host_destroy_cmd;
346315
host_list_cmd;
347316
host_connect_cmd; host_disconnect_cmd; benchmark_cmd;

0 commit comments

Comments
 (0)