openSUSE packages

Questions about how to compile, install, libraries required
Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

openSUSE packages

Post by Lazy_Kent » Sun Nov 15, 2009 1:25 pm

I made packages of fsarchiver for openSUSE. Can be found at http://software.opensuse.org/search?q=fsarchiver

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

Re: openSUSE packages

Post by admin » Mon Nov 16, 2009 7:16 pm

Thanks for creating these packages.

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 12:01 am

Do I really need e2fsprogs-devel => 1.41.4?
If so, I can't build packages for openSUSE 11.1 and 11.0. There are versions 1.41.1 for oS 11.1 and 1.40.8 for oS 11.0 in the official repositories.

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

Re: openSUSE packages

Post by admin » Wed Dec 09, 2009 7:52 am

There are two things:
1) compilation dependency. It should work with e2fsprogs-1.39
2) runtime dependency: e2fsprogs-1.41 is required for ext4

e2fsprogs >= 1.41.4 is recommended because there is a bug in older versions of e2fsprogs-1.41. An fsck is required to repair the filesystem after an e2label. Anyway, you can bypass this if an upgrade is not possible: it will work with e2fsprogs-1.41.1, and fsarchiver will run fsck after mkfs+e2label.

BTW, fsarchiver-0.6.2 has just been released.

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 12:05 pm

I see, I can create and can't restore an archive with ext4 in openSUSE 11.1 with e2fsprogs v1.41.1.
e2fsprogs-1.41.1 contains mkfs.ext4dev and fsck.ext4dev.

No variants?

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

Re: openSUSE packages

Post by admin » Wed Dec 09, 2009 12:24 pm

What error do you have when you attempt to restore an ext4 filesystem ? You can run "fsarchiver -vvvv" to produce extra debug info in the console, or "fsarchiver -dddd" to produce the same debug in the logfile. What is printed when you run "fsarchiver archinfo" on the archive which has been created ?

To recreate a filesystem, fsarchiver is using mke2fs and tune2fs so it should not be just because mkfs.ext4 is missing. The problem may be either a userland program problem or a kernel filesystem support limitation. Which kernel is that running ? If it's 2.6.27, do you know if ext4dev has been renamed ext4 in the kernel ?

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 1:09 pm

Kernel:

Code: Select all

# uname -r
2.6.27.39-0.2-pae

# lsmod | grep ext4
ext4dev               204980  0
mbcache                 7592  3 ext3,ext2,ext4dev
jbd2                   62216  1 ext4dev
crc16                   1836  1 ext4dev
Error:

Code: Select all

# fsarchiver restfs -vvvv -j2 /mnt/backup/images/opensuse-factory-2009-12-09.fsa id=0,dest=/dev/sda3
fsarchiver.c#329,main(): Files smaller than 65536 will be packed with other small files
============= extracting filesystem 0 =============
dico.c#161,dico_get_generic(): error5: not found
Current fsarchiver version: 0.6.2.0
Minimum fsarchiver version: 0.5.9.0
filesystem=[ext4]
fsbytestotal=[18.68 GB]
fsbytesused=[4.44 GB]
common.c#280,exec_command(): argv[0]=[mke2fs]
common.c#280,exec_command(): argv[1]=[-V]
common.c#286,exec_command(): system(which mke2fs 1>/dev/null 2>/dev/null)=0
executing [mke2fs -V]...
command [mke2fs -V] returned 0
common.c#280,exec_command(): argv[0]=[which]
common.c#280,exec_command(): argv[1]=[mke2fs]
common.c#286,exec_command(): system(which which 1>/dev/null 2>/dev/null)=0
executing [which mke2fs]...
command [which mke2fs] returned 0
common.c#280,exec_command(): argv[0]=[mke2fs]
common.c#280,exec_command(): argv[1]=[-V]
common.c#286,exec_command(): system(which mke2fs 1>/dev/null 2>/dev/null)=0
executing [mke2fs -V]...
command [mke2fs -V] returned 0
the filesystem type determined by the original filesystem features is [ext4]
the filesystem type to create considering the command options is [ext4]
--> feature [has_journal]=YES
--> feature [resize_inode]=YES
--> feature [dir_index]=YES
--> feature [filetype]=YES
--> feature [extent]=YES
--> feature [journal_dev]=NO
--> feature [flex_bg]=YES
--> feature [large_file]=YES
--> feature [sparse_super]=YES
--> feature [uninit_bg]=YES
features: mkfs_options+=[-O has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg]
mke2fs version detected: 1.41.1
mke2fs version required: 1.41.0
exec: mke2fs -V
common.c#280,exec_command(): argv[0]=[mke2fs]
common.c#280,exec_command(): argv[1]=[/dev/sda3]
common.c#280,exec_command(): argv[2]=[-q]
common.c#280,exec_command(): argv[3]=[-r]
common.c#280,exec_command(): argv[4]=[1]
common.c#280,exec_command(): argv[5]=[-L]
common.c#280,exec_command(): argv[6]=[openSUSE_11.2]
common.c#280,exec_command(): argv[7]=[-b]
common.c#280,exec_command(): argv[8]=[4096]
common.c#280,exec_command(): argv[9]=[-I]
common.c#280,exec_command(): argv[10]=[256]
common.c#280,exec_command(): argv[11]=[-O]
common.c#280,exec_command(): argv[12]=[has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg]
common.c#286,exec_command(): system(which mke2fs 1>/dev/null 2>/dev/null)=0
executing [mke2fs /dev/sda3  -q  -r 1  -L 'openSUSE_11.2'  -b 4096  -I 256  -O has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg ]...
command [mke2fs /dev/sda3  -q  -r 1  -L 'openSUSE_11.2'  -b 4096  -I 256  -O has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg ] returned 0
common.c#280,exec_command(): argv[0]=[tune2fs]
common.c#280,exec_command(): argv[1]=[/dev/sda3]
common.c#280,exec_command(): argv[2]=[-U]
common.c#280,exec_command(): argv[3]=[52bf5c15-8861-4d8f-8503-e170809d4817]
common.c#286,exec_command(): system(which tune2fs 1>/dev/null 2>/dev/null)=0
executing [tune2fs /dev/sda3  -U 52bf5c15-8861-4d8f-8503-e170809d4817 ]...
command [tune2fs /dev/sda3  -U 52bf5c15-8861-4d8f-8503-e170809d4817 ] returned 0
common.c#280,exec_command(): argv[0]=[e2fsck]
common.c#280,exec_command(): argv[1]=[-fy]
common.c#280,exec_command(): argv[2]=[/dev/sda3]
common.c#286,exec_command(): system(which e2fsck 1>/dev/null 2>/dev/null)=0
executing [e2fsck -fy /dev/sda3]...
command [e2fsck -fy /dev/sda3] returned 1
fs_ext2.c#286,extfs_mkfs(): command [e2fsck -fy /dev/sda3] failed
extract.c#1216,extractar_filesystem_extract(): cannot format the filesystem ext4 on partition /dev/sda3
extract.c#1414,do_extract(): extract_filesystem(0) failed
extract.c#1468,do_extract(): THREAD-MAIN2: exit error
extract.c#1472,do_extract(): THREAD-MAIN2: exit
thread_archio.c#755,thread_reader_fct(): THREAD-READER: queue_set_end_of_queue(&g_queue, true)
thread_archio.c#763,thread_reader_fct(): THREAD-READER: exit
thread_comp.c#283,compression_function(): THREAD-COMP: exit success
extract.c#1483,do_extract(): THREAD-MAIN2: queue is now empty
thread_comp.c#283,compression_function(): THREAD-COMP: exit success

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 1:15 pm

Filesystem is created:

Code: Select all

# mount -t ext4dev /dev/sda3 /mnt/sda3

# mount
...
/dev/sda3 on /mnt/sda3 type ext4dev (rw)

# ls -lR /mnt/sda3
/mnt/sda3:
total 16
drwx------ 2 root root 16384 Dec  9 15:57 lost+found

/mnt/sda3/lost+found:
total 0

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

Re: openSUSE packages

Post by admin » Wed Dec 09, 2009 1:21 pm

The problem is that e2fsck returned a non null status, which means that e2fsck failed.
==> command [e2fsck -fy /dev/sda3] returned 1

To create the filesystem, fsarchiver runs three things:
1) mke2fs
2) tune2fs (to restore the original uuid)
3) e2fsck (required because of a bug in tune2fs with e2fsprogs <= 1.41.4)

Can you run these three commands again by hand (you have the complete command line in these logs) and see why e2fsck fails. If we can get e2fsck to work (and return a status = 0) it should be ok.

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 3:20 pm

Well. First I run in zsh and got:

Code: Select all

# mke2fs /dev/sda3  -q  -r 1  -L 'openSUSE_11.2'  -b 4096  -I 256  -O has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg
zsh: no matches found: has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg
Quoted options:

Code: Select all

# mke2fs /dev/sda3 -q -r 1 -L 'openSUSE_11.2' -b 4096 -I 256 -O 'has_journal,resize_inode,dir_index,filetype,extent,^journal_dev,flex_bg,large_file,sparse_super,uninit_bg'

# tune2fs /dev/sda3  -U 52bf5c15-8861-4d8f-8503-e170809d4817
tune2fs 1.41.1 (01-Sep-2008)

# e2fsck -fy /dev/sda3
e2fsck 1.41.1 (01-Sep-2008)
Group descriptor 0 checksum is invalid.  Fix? yes

Group descriptor 1 checksum is invalid.  Fix? yes

Group descriptor 2 checksum is invalid.  Fix? yes

... (from 2 to 150)

Group descriptor 150 checksum is invalid.  Fix? yes

Group descriptor 151 checksum is invalid.  Fix? yes

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Inode bitmap differences:  -(8193--8394) -(8396--15197) -(15199--24751) -(24753--38594) -(38596--38636) -(38638--38644) -(38646--38658) -(38660--38662) -(38664--38710) -(38712--38723) -(38725--38735) -(38737--38768) -(38770--39001) -(39003--39044) -(39046--41760) -(41762--41916) -41918 -(41925--41926) -(41928--41931) -41934 -41946 -(41961--41962) -(41964--42022) -(42024--42110) -(42112--42113) -42122 -42125 -42127 -42132 -(42141--42566) -42568 -(42570--42572) -(42574--42575) -(42581--42583) -(42585--42659) -(42662--43018) -(43020--43033) -(43035--43059) -(43061--43241) -(43243--43247) -(43249--43259) -(43262--43517) -43519 -(43523--43524) -(43528--43530) -(43532--44441) -(44443--44495) -(44497--44525) -44543 -44625 -(44644--44738) -(44740--45633) -(45635--45796) -45798 -(45802--45804) -(45807--45808) -45811 -(45815--45816) -45825 -45828 -45831 -45833 -45838 -45849 -45863 -(45869--45989) -(45991--45994) -(45996--45997) -(45999--46000) -(46002--46003) -(46007--46009) -46014 -(46016--46017) -46023 -(46027--46028) -(46030--46032) -46038 -(46040--46081) -(46083--46084) -(46086--46088) -(46090--46092) -(46094--46095) -46097 -(46099--46101) -46106 -46108 -46110 -46112 -(46116--46118) -(46120--46122) -(46124--46128) -(46130--46133) -46137 -(46142--46143) -(46146--46149) -46154 -(46157--46159) -(46165--46166) -46169 -46174 -46176 -(46178--46179) -46185 -46188 -46190 -46192 -(46194--46198) -46200 -(46204--46205) -(46207--46211)
... (a lot of numbers)
-1245166 -(1245169--1245170) -1245174 -(1245177--1245178) -1245182
Fix? yes


openSUSE_11.2: ***** FILE SYSTEM WAS MODIFIED *****
openSUSE_11.2: 11/1245184 files (0.0% non-contiguous), 122177/4976133 blocks

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

Re: openSUSE packages

Post by admin » Wed Dec 09, 2009 3:33 pm

The correct version if with the quotes.

e2fsck says it has repaired the filesystem. What is the return status of that command when you run it by hand ?
You can do an

Code: Select all

echo $?
just after e2fsck in the shell.

According to "man e2fsck", I got this:
The exit code returned by e2fsck is the sum of the following conditions:
0 - No errors
1 - File system errors corrected
2 - File system errors corrected, system should be rebooted
4 - File system errors left uncorrected
8 - Operational error
16 - Usage or syntax error
32 - E2fsck canceled by user request
128 - Shared library error
It sounds I should change the code so that the return status 1 should be considered as correct.
I have create a small patch that fixes that problem in fsarchiver-0.6.2:
http://pastebin.com/f50da1bbb

As a consequence, it will work when e2fsck returns either 0 or 1.

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 4:14 pm

echo $? returns 1
Will try the patch.

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

Re: openSUSE packages

Post by admin » Wed Dec 09, 2009 4:17 pm

That's good news, the patch should fix your problem.
I will commit that in SVN for fsarchiver-0.6.3.

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: openSUSE packages

Post by Lazy_Kent » Wed Dec 09, 2009 4:38 pm

Starting restore now. Seems it works. Thanks!

update:
Restored successfully.

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

Re: openSUSE packages

Post by admin » Wed Dec 09, 2009 4:59 pm

Very good. Thanks for having helped to fix that bug.

Post Reply