File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -138,21 +138,22 @@ module VolumeManager = struct
138138 let myvg, myvg_u = Lwt. task ()
139139 let lock = Lwt_mutex. create ()
140140
141- let vgopen ~devices : devices' =
141+ let vgopen ~devices =
142142 Lwt_list. map_s
143143 (fun filename -> Block. connect filename >> = function
144144 | `Error _ -> fatal_error_t (" open " ^ filename)
145145 | `Ok x -> return x
146- ) devices'
146+ ) devices
147147 >> = fun devices' ->
148148 let module Label_IO = Lvm.Label. Make (Block ) in
149149 Lwt_list. iter_s
150- (fun device ->
150+ (fun ( filename , device ) ->
151151 Label_IO. read device >> = function
152152 | `Error (`Msg m ) ->
153153 error " Failed to read PV label from device: %s" m;
154154 fail (Failure " Failed to read PV label from device" )
155155 | `Ok label ->
156+ info " opened %s: %s" filename (Lvm.Label. to_string label);
156157 begin match Lvm.Label.Label_header. magic_of label.Lvm.Label. label_header with
157158 | Some `Lvm ->
158159 error " Device has normal LVM PV label. I will only open devices with the new PV label." ;
@@ -163,7 +164,7 @@ module VolumeManager = struct
163164 error " Device has an unrecognised LVM PV label. I will only open devices with the new PV label." ;
164165 fail (Failure " Device has wrong PV label" )
165166 end
166- ) devices'
167+ ) ( List. combine devices devices')
167168 >> = fun () ->
168169 Vg_IO. connect ~flush_interval: 5. devices' `RW >> |= fun vg ->
169170 Lwt. wakeup_later myvg_u vg;
You can’t perform that action at this time.
0 commit comments