FS attributes creation after extraction of the archive

Please ask questions here if you are not familiar with fsarchiver
Post Reply
bobbysch
Posts: 26
Joined: Mon Jun 15, 2009 8:46 pm

FS attributes creation after extraction of the archive

Post by bobbysch » Sun Nov 01, 2009 12:44 am

Hello,

I'd know when extracting a FSA archive, does fsarchiver recreate the same attributes than the original FS ?
For ex. attributes like these (giving by dumpe2fs) : has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize

Thanks for your great work.

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: FS attributes creation after extraction of the archive

Post by admin » Sun Nov 01, 2009 10:45 pm

The "extfs features" are really critical and it has been an important part of the development of the extfs support.

It preserves the extfs attributes called features in order to prevent that sort of scenario:
Let's consider we use a recent fsarchiver to backup an old rhel-4 filesystem. This old rhel4 is running linux-2.6.9 which is not aware of the recent extfs features. If fsarchiver was just doing an mke2fs with the default features in mke2fs-1.41 the filesystem would be restored with features that rhel4 does not support, and it would not boot.

Also it was important to preserve the features, because this is the only way to differentiate ext2 / ext3 / ext4.

You can see in fs_ext2.c how it's implemented. Anyway, there are other attributes that are not preserved yet: such as the maximum number of mounts between two fsck.

bobbysch
Posts: 26
Joined: Mon Jun 15, 2009 8:46 pm

Re: FS attributes creation after extraction of the archive

Post by bobbysch » Mon Nov 02, 2009 1:36 pm

That's very exact ! I had the bad surprise to see this problem once.
Do features like : inode size, block size, inodes per group, block per group ... are preserved ?

bobbysch
Posts: 26
Joined: Mon Jun 15, 2009 8:46 pm

Re: FS attributes creation after extraction of the archive

Post by bobbysch » Mon Nov 02, 2009 2:00 pm

One more stupid question :
For ex. with shell script, we can examine all the FS features (given by tune2fs) before archiving, then recreate these same features after restoring the archive. It's quite easy.

No offense : I don't know C language, but why you don't implement that in your code ?

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: FS attributes creation after extraction of the archive

Post by admin » Tue Nov 03, 2009 10:14 pm

I try to preserve all the features, but the list is not 100% complete yet.

Post Reply