let devices = devices @ get "sd" filter in
(* Search for cciss. *)
- let rex = Pcre.regexp "^cciss!c(\\d)d(\\d)$" in
+ let rex = Pcre.regexp "^cciss!c(\\d+)d(\\d+)$" in
let filter name =
try
let subs = Pcre.exec ~rex name in
(match config_root_filesystem with
| Part (dev, p) ->
let snapshot_dev = snapshot_name dev in
- sh ("mount " ^ quote ("/dev/mapper/" ^ snapshot_dev) ^ " /mnt/root")
+ sh ("mount "
+ ^ quote ("/dev/mapper/" ^ snapshot_dev ^ p)
+ ^ " /mnt/root")
| (LV _) as lv ->
(* The LV will be backed by a snapshot device, so just mount
with Not_found -> assert false (* internal error *) in
let () =
- printf (f_ "\nSending /dev/%s (%.3f GB) to remote machine\n\n%!")
- origin_dev ((Int64.to_float size) /. (1024.*.1024.*.1024.)) in
+ printf (f_ "\nSending %s (%.3f GB) to remote machine\n\n%!")
+ (dev_of_block_device origin_dev)
+ ((Int64.to_float size) /. (1024.*.1024.*.1024.)) in
(* Open the snapshot device. *)
let fd = openfile ("/dev/mapper/" ^ snapshot_dev) [O_RDONLY] 0 in