Thread (2 messages) 2 messages, 2 authors, 2012-09-29

Re: [uml-devel] strange behaviour of ubd

From: richard -rw- weinberger <hidden>
Date: 2012-09-29 17:47:46

On Sat, Sep 29, 2012 at 7:31 PM, James McMechan
[off-list ref] wrote:
quoted
Date: Thu, 27 Sep 2012 09:38:58 +1000
From: nippur@tpg.com.au
To: James_McMechan@hotmail.com
Subject: strange behaviour of ubd

Hello James,
I have been using User Mode Linux since 2004 as virtual lab for studying.
I have always used ubdb,c,d and so on to have more than a "bare" file
system
to play with: a good file system without an access to a cdrom,dvd,usb and
so
on is not very interesting ( and Internet is not always available).
I am a little frustrated because "ubd" is working only for "root_fs" : no
It appears that you are backing your ubd device with a physical drive
Nothing wrong with that, but it is not a case I use much,
you should be able to use any virtual block device not backed directly to
hardware
virtual drives that are mapped to hardware it appears may need to be fixed
to
use an alternate method of finding out how big the drive is and possibly
fixing
up the special ioctl calls like eject.
quoted
cdrom, no dvd and so on ( I am using debian squeeze 64bit). I have
verified
similar behavior with debian testing (kernel 3.2.x). I have been playing
with
every combination of parameter of activation.
The result : linux ubda=root_fs ubdb=/dev/cdrom does not work AT ALL.
I will have to try this, is it only ubdb that is failing or does it take
down ubda also?
quoted
It worked, I have already used with kernel 2.4.x.
It used to work when the host system was running 2.4.x for example debian
running on a real machine and running a UML on top. Correct?
I have run very recent kernels on top of very old host systems. A 2.4.18
host
for example, running a 3.2 UML on top.
quoted
Internet is full of crappy/obsolete stuff.
Everyone is avoiding (on purpose i guess) to talk about this: only
examples
about swap !!!
No, I expect people just don't think to do it this way very often.
Last time I backed with physical drives I had a 30 drive RAID array that was
throwing ICRC errors every day or so and dropping a drive. Since ICRC is
basically harmless (checksum error on a IDE/SATA cable, it retries) this was
a hassle for no gain so I ran my recovery inside a UML since it could not to
it
in a read only fashion before another ICRC came in and broke the entire
RAID array.
quoted
I am writing to you because I have found a "dirty" trick and it is working
better than expected.

file : ubd_kern.c function ubd_add ( ) line number 831 : I have simply
enclosed the goto in a comment.



833 err = ubd_file_size(ubd_dev, &ubd_dev->size);
834 if(err < 0){
835 *error_out = "Couldn't determine size of device's file";
836 /* goto out; */ MODIFIED by me !!!!
837 }
838
Yes, we should have a better solution however.
Maybe checking the errno and trying a different command to
find the drive size on physical drives (or virtual drives in a enclosing
uml)
quoted
well ... is working bloody well.

If you want I can be more accurate if this is not enough for you .... ?!?!
Please fix this problem ( ... mine is just a trick, of course).

Thanks for your attention.
Kind Regards.
So, what exactly does not work?
And since when?
Please provide a test case.

-- 
Thanks,
//richard

------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help