3
I'm trying to recreate file system metadata on a virtual disk. I can save this metadata using e2image, and the e2image man page tells me I can use e2image -I
to restore the file system. Unfortunately, the man page doesn't provide any information on how to use this argument. I've tried the following (command results indented for easier reading):
msk $ e2image /dev/nbd1 -I test.qcow2
e2image 1.42.5 (29-Jul-2012)
e2image: Wrong magic number for Ext2 Image Header while trying to open test.qcow2
msk $ sudo e2image /dev/nbd1 -I test.qcow2
e2image 1.42.5 (29-Jul-2012)
e2image: Wrong magic number for Ext2 Image Header while trying to open test.qcow2
msk $ sudo e2image test.qcow2 -I /dev/nbd1
e2image 1.42.5 (29-Jul-2012)
e2image: Wrong magic number for Ext2 Image Header while trying to open /dev/nbd1
My filesystem is in fact ext4, however the man page says the following:
The e2image program will save critical ext2, ext3, or ext4
I used the following command to create the image:
sudo e2image -Q /dev/mapper/nbd0p1 test.qcow2
Hi, thanks a lot for your answer. I did come to this conclusion about metadata after doing some reading about file systems. And thanks for the clarification re: command-line switches. – mkingston – 2013-09-15T21:10:14.480
In fact, for the record, file metadata is something I don't really want to keep, because I wanted to replace my files in the partition without consideration for their address on the device. So in conclusion, e2image is not really the tool I want to use. Thanks again for a clear answer, anyway. – mkingston – 2013-09-15T21:12:26.647