]> git.ipfire.org Git - thirdparty/dracut.git/blame - test/TEST-17-LVM-THIN/create-root.sh
test/{10,12,13,14,17,30,31}: increase the disk sizes
[thirdparty/dracut.git] / test / TEST-17-LVM-THIN / create-root.sh
CommitLineData
61a02cac
HH
1#!/bin/sh
2# don't let udev and this script step on eachother's toes
3for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
4 > "/etc/udev/rules.d/$x"
5done
6rm -f -- /etc/lvm/lvm.conf
7udevadm control --reload
8# save a partition at the beginning for future flagging purposes
8a430ab2
HH
9sfdisk /dev/sda <<EOF
10,4M
e318ba30
LR
11,29M
12,29M
13,29M
61a02cac 14EOF
e54d9611 15udevadm settle
61a02cac
HH
16for i in sda2 sda3 sda4; do
17lvm pvcreate -ff -y /dev/$i ;
18done && \
19lvm vgcreate dracut /dev/sda[234] && \
e318ba30 20lvm lvcreate -l 17 -T dracut/mythinpool && \
61a02cac
HH
21lvm lvcreate -V1G -T dracut/mythinpool -n root && \
22lvm vgchange -ay && \
23mke2fs /dev/dracut/root && \
24mkdir -p /sysroot && \
25mount /dev/dracut/root /sysroot && \
26cp -a -t /sysroot /source/* && \
27umount /sysroot && \
28sleep 1 && \
29lvm lvchange -a n /dev/dracut/root && \
91c15bab
LR
30sleep 1
31dmsetup status |grep out_of_data_space || \
32 echo "dracut-root-block-created" >/dev/sda1
61a02cac 33poweroff -f