md1 and md2 are both 5 gig. md2 will eventually be much smaller.
Changing lseek to lseek64 in cow_sys.h results in the same error.
[EMAIL PROTECTED]:~# uml_mkcow -f /dev/md1 /dev/md2
cow bitmap lseek failed : errno = 22
write_cow_header: Invalid argument
Here is the results of the same command after adding the printf to cow.c
[EMAIL PROTECTED]:~/tools# uml_mkcow -f /dev/md1 /dev/md2
cow bitmap lseek failed : errno = 22
bitmap_offset_out -1080912056, data_offset_out -1080912064
write_cow_header: Invalid argument
For what it is worth, I have been using umls with block devices (md's and
LVMs included) for some time, I just can't seem to get the cow stuff
working.
--
Jason
The place where you made your stand never mattered. Only that you were there..
And still on your feet.
On Thu, 4 Aug 2005, Blaisorblade wrote:
On Wednesday 03 August 2005 23:01, Jason Clark wrote:
Here is the output trying to use /dev/md1 as my cow file and
/mnt/cow/rootfs.cow as my backing file
[EMAIL PROTECTED]:/mnt# linux ubd0=/dev/md1,/mnt/cow/rootfs.cow
...
[42949373.530000] Console initialized on /dev/tty0
[42949373.530000] Initializing software serial port version 1
[42949373.570000] Failed to read COW header from COW file "/dev/md1",
errno = 22
[42949373.570000] Failed to open '/dev/md1', errno = 22
[42949373.570000] VFS: Cannot open root device "98:0" or
unknown-block(98,0)
[42949373.570000] Please append a correct "root=" boot option
[42949373.570000] Kernel panic - not syncing: VFS: Unable to mount root fs
on unknown-block(98,0)
[42949373.570000]
[42949373.570000] EIP: 0073:[<b7e85551>] CPU: 0 Not tainted ESP:
007b:b7e5afb0 EFLAGS: 00000246
...
I get the same results trying to use a block device. Attemping a uml_mkcow
with md1 as my cow and md2 as my backing file generates the following
[EMAIL PROTECTED]:/mnt# uml_mkcow /dev/md1 /dev/md2
open COW file: File exists
[EMAIL PROTECTED]:/mnt# uml_mkcow -f /dev/md1 /dev/md2
cow bitmap lseek failed : errno = 22
write_cow_header: Invalid argument
Let me guess - your md1 file is *big* (more than 2G), right? Or it isn't set
up well (but I leave that as an exercise to the reader).
I think I found that for uml_utilities: tools/moo/cow_sys.h ->
cow_seek_file,
replace lseek with lseek64 and recompile - I guess the offset got truncated.
For the UML kernel, unless it's unreasonably old, that should not be the
problem, although something on those lines may have happened...
Inside cow.c:init_cow_file, where the first error is printed, can you add a
debug "printf" statement for the offset to check it's reasonable, and do a
strace on the thing to see if the problem.
Another hypotesis (which is strange for me, but just off the top of my head):
has UML problems because HD can't be sparse files? lseek should work as well,
but who knows...
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user