Thursday, January 24, 2008

Migrating fromLVM to ext3

I'm not sure if this will work, but I'm trying to image the old version of the OS by doing a dd off of the LVM physical volume. This is what I'm trying

dd if=/dev/Ubuntu/roo bs=4k | gzip -c | nc -q 1 addr 3333
on the client side, on the target side I'm using
nc -l -p 3333 | gunzip | dd of=/dev/sda3 bs=4k

I'm not sure if the differences in the file system will mess it up, or if it will work out ok.
I suspect that it won't.

Yup, it doesn't.

Next attempt is to use tar
bin/tar cf - . | bin/gzip -c | bin/nc -q 1 addr 3333
then
nc -l -p 3333 | tar zxf -

the bins are necessary on the sending side because I am in rescue mode and the busy box app does not support all of the features. Technically I probably should not have it mounted at all, although in this case I need to have it mounted for tar to work.

Results: tar had problems with sockets, and ordering. Ordering I can fix, sockets, I'm not sure...

Thinking about it some more, this may not be feasible. The problem is that the old image thinks it has 40GB, when it is only going to have 10GB. I could probably resize the physical volume it is on, but then I still have the problem of changing it. For now I will just leave it as it is and keep an old image of it around for later.

I need to finalize the image build so I can get them distributed.

No comments: