11 lines
208 B
Bash
Executable File
11 lines
208 B
Bash
Executable File
#!/bin/bash
|
|
VG="vg0"
|
|
TS=`date +%Y%m%dT%H%M%S`
|
|
set -xe
|
|
while read -r line;
|
|
do
|
|
DISK=`echo $line|cut -d' ' -f1`
|
|
SIZE=`echo $line|cut -d' ' -f2`
|
|
lvcreate --snapshot --name "$DISK-$TS" -L $SIZE $VG/$DISK;
|
|
done
|