From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Schmitter Subject: Re: block-nbd script and example config Date: Thu, 20 Oct 2005 10:15:05 +0200 Message-ID: <43575209.7030902@yahoo.de> References: <4356C389.1080804@us.ibm.com> <2b6116b30510191752w41c8f88bq11937c9d1688f454@mail.gmail.com> <43570E19.5070509@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <43570E19.5070509@us.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony Liguori Cc: Ian Pratt , Xen development list , Kurt Garloff , Nicholas Lee List-Id: xen-devel@lists.xenproject.org Anthony Liguori wrote: > Nicholas Lee wrote: > >>> The only thing to think about is how do handle file devices with spaces >>> in the filename. This is going to be common I think. >>> >> >> Since it's a python variable can't you just run a validator on config >> import and throw an exception if the devive block doesn't exist. >> Noting that device paths including special characters need to be >> enclosured in "...". >> >> ie. export=phy:"/dev/vgname/bob your uncle; mate! device", ... >> >> > Double quotes are actually valid characters in a filename although > rarely used. > > A more bold way of approaching this would be to adopt a more qemu like > syntax of: > > hda1="/dev/vgname/bob you uncle; mate1" > hda2="/root/rockhopper.img" > > We could use stat to figure out whether something was a file or a > device and use the appropriate script (file or phy). For everything > else, we could use explicit urls such as: > > hda3="nbd://rockhopper.austin.ibm.com:1025" > > I like the syntax a lot but I'm not sure that marking a device > read-only works nicely anymore. We could have a single readonly > attribute like: > > readonly=['hda1', 'hda2'] For readonly i would suggest a kind of following syntax: hda1:r="/dev/..." hda2:w="/dev/.." Arnd ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de