[ENBD] diskless enbd-client/enbd on initrd
Peter T. Breuer
ptb at inv.it.uc3m.es
Fri Feb 24 03:12:04 MST 2006
"Also sprach Rudolph Bott:"
> Starting enbd-client...
> enbd-client 572: client says target 0 is 172.16.20.1:1111
> mount: No such device or address
> pivot_root: Device or resource busy
Here is your problem. A mount fails, and then a pivot root fails. You
want to strace this part of the procedure and pin the problem down
further.
> -- snip --
> if ((pid =3D fork())) {
> waitpid(pid,NULL,0);
> } else {
> fprintf(stderr, "Loading enbd module...\n");
> system("/bin/insmod /modules/enbd.ko");
> perror("exec");
>=20
> fprintf(stderr, "Starting enbd-client...\n");
> execl("/bin/enbd-client", "enbd-client", "172.16.20.1:1111", "-n",=
=20
> "1", "-i", "xenoo", "/dev/nda", NULL);
> perror("exec");
> }
You forked a process to connect to the enbd server, but did not wait
for it (you waited for the parent to die instead - that'll happen
rapidly since near the first thing the client does is go daemon).
> if (mount("/dev/nda", "/mnt", "ext3", MS_RDONLY, "")) {
> perror("mount");
> }
And here the mount dies probably because there is no device yet, but
you want to strace it and see why it returns EBUSY. The man page says
that either /dev/nda is mounted already, or /mnt is occupied or
referenced. You want to strace and see some more.
Specialfile is already mounted. Or, it cannot be remounted read-only,
because it still holds files open for writing. Or, it cannot be
mounted on dir because dir is still busy (it is the working direc=AD
tory of some task, the mount point of another device, has open files,
etc.).
If I were you I'd pipe from the client and see when it's ready. r lok
at /proc/nbdinfo.
It maybe is a good idea to make the client daemon stay in foreground
for a while, until it knows the status of its child's connect. I
thought it almost did that (by accident) as it is, just to get error
messages to the console, but it's not deliberate. I could make it so.
Peter
More information about the ENBD
mailing list