summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-05-30 23:19:04 +0200
committerDirk von Suchodoletz2007-05-30 23:19:04 +0200
commit2c997e1c360bebf1c4ec0c45c7ee968e1d608c52 (patch)
tree31599bfc328c69ee3100b127d4848babfe03e282 /initramfs/initrd-stuff/init
parentFix for mkdxsinitrd (see r1114) and several testing stuff ... (diff)
downloadcore-2c997e1c360bebf1c4ec0c45c7ee968e1d608c52.tar.gz
core-2c997e1c360bebf1c4ec0c45c7ee968e1d608c52.tar.xz
core-2c997e1c360bebf1c4ec0c45c7ee968e1d608c52.zip
Extended slx init to handle dnbd2 blockdevices (stuff developed by Vito
di Leo, not released yet). Could be a drop in replacement for nbd (failover capabilities, no client tool needed, just handled via /sys interface) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1117 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init14
1 files changed, 13 insertions, 1 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index 0303d392..9c87ce79 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -198,7 +198,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
echo -e "\n# nfs root information gotten via kernel command \
line in $0\n#nfsroot=\"${nfsserver}:${nfspath}\"\n" >> /etc/machine-setup
;;
- *nbd)
+ *nbd*)
nbdmod=$srvproto
# get settings for nbd-client, filesystem equals to path in URI
# notation
@@ -389,6 +389,18 @@ if [ -n "${nbdmod}" ] ; then
# switch off unneeded block read ahead
echo "0" > /sys/block/nbd0/queue/read_ahead_kb
;;
+ # dnbd2 by Vito di Leo
+ dnbd2)
+ RDEV=/dev/vnbd0
+ waitfor "${RDEV}" 20000 || error "$init_nbddev"
+ echo $nbdhost $nbdport > /sys/block/vnbd0/server0/sock
+ echo 1 > /sys/block/vnbd0/config/vid
+ echo 1 > /sys/block/vnbd0/config/rid
+ echo 1 > /sys/block/vnbd0/config/running
+ echo noop > /sys/block/vnbd0/queue/scheduler
+ # switch off unneeded block read ahead
+ echo "0" > /sys/block/vnbd0/queue/read_ahead_kb
+ ;;
# dnbd by Thorsten Zitterell
dnbd)
# quickhack