[ENBD] diskless enbd-client/enbd on initrd
Peter T. Breuer
ptb at inv.it.uc3m.es
Thu Feb 23 09:37:35 MST 2006
"Also sprach Rudolph Bott:"
> > Yes, but my question about how you chroot or umount the original root
> > while the clients are running on it stands.
You're not answering to this point (which I have put about three
or four times now :().
> > with the question I put a couple of times now! How can you chroot while
> > the client daemons are running on the original root? At the very least
> > they have the /dev/nda* entries open, no? That's what the error seemed
> > to indicate.
> the initrd. There is no chroot or whatsoever; its a simple call to
> pivot_root(), which swaps the "roots" (initrd and rootfs on nbd). The
> The error messages you see are
> generated by the function perror(),
Use set -x in the script if you want to see where the error occurs. As
I said, I suppose it occurs at a mount or chroot or whatever, since the
client is running on the old root and has the old device open, and thus
several things will have a reference count above zero! I am looking for
confirmation of that.
> And since the mount fails (because there is nothing "behind" /dev/nda),
So the mount does fail, as I guessed? I suppose for the reason
I guessed.
> pivot_root fails, too.
Indeed.
> I Hope that clarified some things ;)
I didn't need anything clarified - I am trying (and failing miserably)
to direct your attention to the question of how you expect the mount or
chroot or pivot root or whatever it is to succeed when the client is
running on the old root and has several things open there!
When you have answered that question (and it is a question about your
expectations), we will make some progress, I think!
(in the expectation that the answer is "I didn't think about that", and
"I don't know what effect that would have on the various operations I
am trying to do", I urge you to check, using set -x, as I suggested,
exactly what the command is that is failing, and to go on from there
to strace that command, getting the precise error value - which is
EBUSY, I suppose; I would suggest, guessing again as to what is going on, that you don't attempt to dismount the old root at all, if you are
trying to do that - just leave it; if it was a ramdisk, live with it
for the moment :-).
Peter
More information about the ENBD
mailing list