projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
577ea5c
)
wipe beginning so that grub-install doesn't complain
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 10 May 2021 09:17:02 +0000
(11:17 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 10 May 2021 09:17:02 +0000
(11:17 +0200)
lv-insert-part.sh
patch
|
blob
|
history
diff --git
a/lv-insert-part.sh
b/lv-insert-part.sh
index
1911ed2
..
7941c24
100755
(executable)
--- a/
lv-insert-part.sh
+++ b/
lv-insert-part.sh
@@
-7,6
+7,9
@@
test -z "$1" || test ! -e "$1" && echo "Usage: $0 /path/to/lv" && exit 1
lvs --noheadings -o vg_name,name,lv_size $1 | tee /dev/stderr | while read vg_name name lv_size ; do
lvcreate -s -L $lv_size -n ${name}.snap /dev/$vg_name/$name
+ # wipe beginning so that grub-install doesn't complain
+ dd if=/dev/zero of=/dev/$vg_name/$name bs=1 count=2048
+
# create partition
echo '2048,+,L,*' | sfdisk --no-reread /dev/$vg_name/$name