diff options
| author | torben | 2015-04-09 19:14:12 +0200 |
|---|---|---|
| committer | torben | 2015-04-09 19:14:12 +0200 |
| commit | fede9187d803a414dc5cdfb6ec9179289c40eb92 (patch) | |
| tree | de31e16bfc402b9b6cfadd665a7e077f089f9643 | |
| parent | Adding doc to build dnbd3 (diff) | |
| download | systemd-init-fede9187d803a414dc5cdfb6ec9179289c40eb92.tar.gz systemd-init-fede9187d803a414dc5cdfb6ec9179289c40eb92.tar.xz systemd-init-fede9187d803a414dc5cdfb6ec9179289c40eb92.zip | |
Nur noch pivot_switch fehlt!
| -rw-r--r-- | readme.md | 5 | ||||
| -rwxr-xr-x | testModule/dnbd3-client | bin | 0 -> 31150 bytes | |||
| -rwxr-xr-x | testModule/dnbd3.ko | bin | 0 -> 1345285 bytes | |||
| -rw-r--r-- | testModule/module-setup.sh | 33 | ||||
| -rw-r--r-- | testModule/mount-dnbd3.sh | 15 | ||||
| -rw-r--r-- | testModule/nbd.ko | bin | 0 -> 458623 bytes |
6 files changed, 39 insertions, 14 deletions
@@ -301,3 +301,8 @@ Die kernel header Dateien liegen in: /usr/lib/modules/3.10.0-229.1.2.el7.x86_64 TOOD + +dnbd3-client -h 132.230.4.1 -i stage4/torben/test -r 1 + +> # Installiere qemu-img: @yum install qemu-img@ +> # Installiere nbd: @wget http://dl.fedoraproject.org/pub/epel/6/x86_64/nbd-2.9.20-7.el6.x86_64.rpm && rpm -Uvh nbd-2.9.20-7.el6.x86_64.rpm@ diff --git a/testModule/dnbd3-client b/testModule/dnbd3-client Binary files differnew file mode 100755 index 00000000..76924b49 --- /dev/null +++ b/testModule/dnbd3-client diff --git a/testModule/dnbd3.ko b/testModule/dnbd3.ko Binary files differnew file mode 100755 index 00000000..d7b7ce3b --- /dev/null +++ b/testModule/dnbd3.ko diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index 0f43268b..ae30de9f 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -5,24 +5,13 @@ check() { } depends() { - echo base bash kernel-modules systemd shutdown udev-rules debug qemu btrfs - return 0 -} - -install() { - # Loads globally needed useful functions or fixes some native dracut ones. - inst_simple "$moddir/library.sh" /usr/lib/test-library.sh - # NOTE: Priority has to be greater than the network cmdline parsing hooks - # since we have to modify the some kernel parameter before. - inst_hook cmdline 100 "$moddir/parse-ip.sh" - #inst_simple "$moddir/busybox" /usr/bin/busybox - #inst_hook pre-mount 20 "$moddir/setup_network.sh" - inst_multiple ping ip ifconfig sshd htop dhclient tail head cat vim touch sed + echo base network rootfs-block bash kernel-modules systemd shutdown udev-rules debug qemu btrfs return 0 } installkernel() { - instmods ip6t_rpfilter ip6t_REJEiCT ipt_REJECT xt_conntrack ebtable_nat \ + instmods dnbd3 nbd ext4 \ + ip6t_rpfilter ip6t_REJEiCT ipt_REJECT xt_conntrack ebtable_nat \ ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat \ nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle \ ip6table_security ip6table_raw ip6table_filter ip6_tables \ @@ -35,3 +24,19 @@ installkernel() { ata_generic pata_acpi ahci libahci vboxvideo drm i2c_core ata_piix \ libata vboxguest dm_mirror dm_region_hash dm_log dm_mod } + +install() { + # Loads globally needed useful functions or fixes some native dracut ones. + inst "$moddir/library.sh" /usr/lib/test-library.sh + inst "$moddir/dnbd3-client" /usr/bin/dnbd3-client + inst "$moddir/dnbd3.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko + inst "$moddir/nbd.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko + # NOTE: Priority has to be greater than the network cmdline parsing hooks + # since we have to modify the some kernel parameter before. + inst_hook cmdline 100 "$moddir/parse-ip.sh" + inst_hook pre-mount 100 "$moddir/mount-dnbd3.sh" + inst_simple "$moddir/busybox" /usr/bin/busybox + #inst_hook pre-mount 20 "$moddir/setup_network.sh" + inst_multiple lsblk ping ip ifconfig sshd htop dhclient tail head cat vim touch sed lsmod insmod qemu-img qemu-nbd sleep + return 0 +} diff --git a/testModule/mount-dnbd3.sh b/testModule/mount-dnbd3.sh new file mode 100644 index 00000000..9629a153 --- /dev/null +++ b/testModule/mount-dnbd3.sh @@ -0,0 +1,15 @@ +insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko + +dnbd3-client --daemon & +sleep 2 +local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test -r 1)" + +qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /tmp/test.qcow2 +insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko +qemu-nbd -c /dev/nbd0 /tmp/test.qcow2 +mkdir /mnt +mount /dev/nbd0 /mnt + +warn '............JAU.............' +warn '............JAU.............' +warn '............JAU.............' diff --git a/testModule/nbd.ko b/testModule/nbd.ko Binary files differnew file mode 100644 index 00000000..40b67a92 --- /dev/null +++ b/testModule/nbd.ko |
