summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-05-08 00:32:33 +0200
committerSebastian Schmelzer2012-05-08 00:32:33 +0200
commitf94cde3bb2b43022f85e51107071fc2e83c58699 (patch)
tree8ef297022998a0b9fc46648ff2090fe752096b86
parentadd libs for dnbd3-client (diff)
downloadcore-f94cde3bb2b43022f85e51107071fc2e83c58699.tar.gz
core-f94cde3bb2b43022f85e51107071fc2e83c58699.tar.xz
core-f94cde3bb2b43022f85e51107071fc2e83c58699.zip
first working dnbd3 boot :)
-rwxr-xr-xsrc/initramfs/scripts/init23
-rw-r--r--src/installer/OpenSLX/OSExport/BlockDevice/DNBD3.pm2
2 files changed, 18 insertions, 7 deletions
diff --git a/src/initramfs/scripts/init b/src/initramfs/scripts/init
index b23337c6..ea815986 100755
--- a/src/initramfs/scripts/init
+++ b/src/initramfs/scripts/init
@@ -269,9 +269,11 @@ line in $0\nnfsserver=\"${nfsserver}\"\nnfspath=\"${nfspath}\"" \
# notation (remove leading slash from filesystem at the end)
bldhost=$(uri_token $rootfs server)
bldport=$(uri_token $rootfs port)
- bldrfst=$(uri_token $rootfs path)
- bldopt=${bldrfst%/*}
- bldrfst=${bldrfst##*/}
+ path=$(uri_token $rootfs path)
+ bldrfst=${path##*/}
+ bldopt=${path%/*}
+ echo "bldrfst $bldrfst\n"
+ echo "bldopt $bldopt\n"
;;
aoe)
echo "Not implemented yet"
@@ -554,9 +556,18 @@ if [ -n "${bldmod}" ] ; then
RDEV=/dev/dnbd0
waitfor "${RDEV}" 20000 || error "$init_nbddev"
i=0
- vid=${${blkopt#/*}%%/*}
- rid=${${${blkopt#/*}#*/}%%/*}
- dnbd3-client -h $bldhost -p $bldport -d ${RDEV} -v $vid -r $rid
+ vid=1 #${${blkopt#/*}%%/*}
+ rid=0 #${${${blkopt#/*}#*/}%%/*}
+ ls -lah /sys/block/dnbd0/net/cur_server_ip
+ [ "x" == "x$bldport" ] || bldporrt="-p $bldport"
+ tryagain=1
+ while [ "x$tryagain" == "x1" ] ; do
+ dnbd3-client -h $bldhost $bldport -d ${RDEV} -v $vid -r $rid
+ usleep 10000
+ [ "$(cat /sys/block/dnbd0/net/cur_server_ip)x" != "x" ] && tryagain=0
+ echo -n "retry: "
+ done
+ sleep 1
;;
# dnbd2 by Vito Di Leo
dnbd2)
diff --git a/src/installer/OpenSLX/OSExport/BlockDevice/DNBD3.pm b/src/installer/OpenSLX/OSExport/BlockDevice/DNBD3.pm
index 5d8845f8..e26cb800 100644
--- a/src/installer/OpenSLX/OSExport/BlockDevice/DNBD3.pm
+++ b/src/installer/OpenSLX/OSExport/BlockDevice/DNBD3.pm
@@ -85,7 +85,7 @@ sub showExportConfigInfo
"Add the following export entry to your dnbd3-server config file\n(/etc/dnbd3-server.conf):\n",
"\n",
"[$self->{'engine'}->{'export-name'}]\n",
- "filename=$self->{fs}->{'export-path'}\n",
+ "file=$self->{fs}->{'export-path'}\n",
"servers=\n",
"vid=$export->{'id'}\n",
"rid=1\n\n",