From: rjones Date: Mon, 10 Sep 2007 18:33:32 +0000 (+0100) Subject: Make 'snapshot' use our standard names. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=ec30750022c2f6cb15a88606d1c85d0d3205ea61;p=virt-p2v.git Make 'snapshot' use our standard names. --- diff --git a/virt-p2v.sh b/virt-p2v.sh index fa2e705..92b840f 100755 --- a/virt-p2v.sh +++ b/virt-p2v.sh @@ -3,9 +3,9 @@ # virt-p2v.sh is a shell script which performs a physical to # virtual conversion of local disks. # -# By Richard W.M. Jones -# # Copyright (C) 2007 Red Hat Inc. +# Written by Richard W.M. Jones +# # $Id$ export PATH=/usr/sbin:/sbin:/usr/local/bin:/usr/kerberos/bin:/usr/bin:/bin @@ -74,7 +74,7 @@ function word_in_list { # Create a device-mapper snapshot of a device with ramdisk overlay. # Example: -# snapshot /dev/sda1 snap +# snapshot sda1 snap # creates a snapshot of /dev/sda1 called /dev/mapper/snap @@ -83,10 +83,10 @@ function snapshot { local dev=$1 name=$2 # Get size of the device in sectors. - local sectors=`blockdev --getsize $dev` + local sectors=`blockdev --getsize /dev/$dev` dmsetup create ${name}_org \ - --table="0 $sectors snapshot-origin $dev" + --table="0 $sectors snapshot-origin /dev/$dev" dmsetup create $name \ --table="0 $sectors snapshot /dev/mapper/${name}_org /dev/ram1 n 64" } @@ -407,7 +407,9 @@ done clear # Mount the root filesystem(s) using device-mapper snapshots. - +# For example, if asked to examine VolGroup00/LogVol00, then +# we might find that it is located on physical device sda, and +# the snapshot in that case will be called sda_snap.