scripts-backup/snapshot_lvm.sh
2025-02-03 02:51:33 +01:00

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