Exporting local hard disk partitions via nbd
Ray <[email protected]> Thu, 29 Sep 2005 23:02:04 -0700
| Newsgroups | gmane.linux.pxes.devel |
|---|---|
| Message-ID | <[email protected]> |
I don't know if it's of any use to anyone else but I just modifed the
/etc/init.d/rcS init file to export all local ide disk partitions via
nbd-server and it seems to work OK. All I did was to take the bit of code
from the section that mounts these partitions locally, copied it, and
replaced the mount line with one that starts nbd-server. Is this the right
way to do this?
In any event here is the bit that I added starting at line 1696 in rcS:
if [ "$NBD_SERVER_ENABLED" -eq 1 ]
then
for p in $HD/part*
do
if [ "$p" = "$HD/part\*" ]
then
break
fi
n=${p##*part}
t=`file $p 2>/dev/null`
if [ "$?" -eq 0 -a -n "$t" ]
then
# mount -t $t -o ro $p /mnt/hd${n}
nbd-server 901${n} $p &
bootmsg -n " (part${n} exported as $p)"
fi
done
fi
--
Ray
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl