You are not logged in.

#1 2012-06-22 21:46:33

seniorsassycat
Member
Registered: 2011-08-27
Posts: 76

What's the state of btrfs fsck?

The man page for btrfsck states that the tool is in too early a stage for usage, and should only be used for review, but the wiki makes it sound usable. Should I be trying to use it?

I'm trying to get btrfs fsck to work on boot, Ive linked btrfsck to fsck.btrfs and mkinitcpio compiles the image fine. Then I touched forcefsck on the root directory and /home which are the mount points of my two btrfs partitions. On reboot I got the following error when fsck.btrfs was ran

:: Checking Filesystems    [BUSY] fsck.btrfs: invalid option -- 'a'
usage: btrfsck dev
Btrfs Btrfs v0.19
\002/dev/sda1: 34/52208 files (11.8% non-contiguous), 36470/208812 blocks              
fsck.btrfs: invalid option -- 'a'
usage: btrfsck dev
Btrfs Btrfs v0.19
   [DONE] 

It seems btrfsck expects the device as an argument but is passes something else.

Last edited by seniorsassycat (2012-06-22 21:48:05)

Offline

#2 2012-06-25 06:03:46

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: What's the state of btrfs fsck?

I too would like to know the answer to the question. The wiki says its pretty stable, but I couldn't get the btrfsck tool to work. I want to create a raid 10 array with 4 3TB drives.

Offline

#3 2012-06-25 14:26:56

seniorsassycat
Member
Registered: 2011-08-27
Posts: 76

Re: What's the state of btrfs fsck?

What problems did you have with it?

Offline

#4 2012-06-26 00:03:34

helloworld1
Member
Registered: 2010-12-26
Posts: 72

Re: What's the state of btrfs fsck?

You don't need it. The integrity is  ensured in the kernel side.

Offline

#5 2012-06-26 00:08:55

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: What's the state of btrfs fsck?

helloworld1 wrote:

You don't need it. The integrity is  ensured in the kernel side.

Yeah... because that worked out so well for ZFS...

http://www.osnews.com/story/22423

the btrfsck tool exists, in some format, and will heal corrupted data structures in the FS. It is not compatible with the /sbin/fsck helper as it doesn't respond to the flags that /sbin/fsck expects to exist (aka you shouldn't try to symlink or rename it to fsck.btrfs).

Last edited by falconindy (2012-06-26 00:09:18)

Offline

#6 2012-06-26 16:38:46

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: What's the state of btrfs fsck?

seniorsassycat wrote:

What problems did you have with it?

I was overclocking my system using mprime and my btrfs root became corrupted. I tried using btrfsck, but it could not repair the damage. This was about two months ago. I had to restore from backups.

Offline

#7 2012-06-27 17:15:35

adee
Member
From: The Moon
Registered: 2009-11-10
Posts: 110

Re: What's the state of btrfs fsck?

demizer wrote:
seniorsassycat wrote:

What problems did you have with it?

I was overclocking my system using mprime and my btrfs root became corrupted. I tried using btrfsck, but it could not repair the damage. This was about two months ago. I had to restore from backups.

Did you try to mount it with -o recovery flag? That walks back in the tree root history (btrfs saves snapshots every 30 seconds). Btrfsck supposed to be used only if all those recovery points are corrupted.

Offline

#8 2012-06-29 03:17:28

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: What's the state of btrfs fsck?

adee wrote:
demizer wrote:
seniorsassycat wrote:

What problems did you have with it?

I was overclocking my system using mprime and my btrfs root became corrupted. I tried using btrfsck, but it could not repair the damage. This was about two months ago. I had to restore from backups.

Did you try to mount it with -o recovery flag? That walks back in the tree root history (btrfs saves snapshots every 30 seconds). Btrfsck supposed to be used only if all those recovery points are corrupted.

Did not even know about that option. Thanks for the tip. It's pretty easy for me to restore from backup than try to fix the filesystem errors. I learned that you should probably not test overclocking while using an experimental filesystem.

Offline

#9 2012-08-02 16:44:58

mumpf
Member
From: Switzerland
Registered: 2006-09-05
Posts: 95

Re: What's the state of btrfs fsck?

In the wiki https://wiki.archlinux.org/index.php/Us … trfs-progs they recommend the AUR-package

"There is the btrfs-progs-unstable in [extra], but I recommend you to install btrfs-progs-git from AUR"

Offline

#10 2012-08-02 16:48:42

mumpf
Member
From: Switzerland
Registered: 2006-09-05
Posts: 95

Re: What's the state of btrfs fsck?

falconindy wrote:

the btrfsck tool exists, in some format, and will heal corrupted data structures in the FS. It is not compatible with the /sbin/fsck helper as it doesn't respond to the flags that /sbin/fsck expects to exist (aka you shouldn't try to symlink or rename it to fsck.btrfs).

does it mean, that this hint (cannot rembember where I found it)
sudo ln -s /usr/bin/btrfsck /sbin/fsck.btrfs
is a bad idea?

Offline

Board footer

Powered by FluxBB