Skip to contentSkip to conversation

Errors in btrfsck after converting ext2 FS to btrfs.

DISCUSSION Prasad Joshi 2 participants 4 messages Oct 18, 2009 – Oct 19, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

I tried using the btrfs-convert utility to convert the ext2 fs to btrfs. After the conversion was over, just to verify the correctness of operation, ran btrfsck on the device. It showed errors 800. I am not sure what does it mean, so thought of repoting it on mailing list.

# btrfsck /dev/sdb
root 256 inode 257 errors 800
found 1105965056 bytes used err is 1
total csum bytes: 192576
total tree bytes: 459956224
total fs tree bytes: 449585152
btree space waste bytes: 191448023
file data blocks allocated: 843206656
referenced 843206656
Btrfs v0.19-3-g6f3cf25-dirty

I also found that, after the conversion of FS from ext2 to btrfs %usage gone up drastically. I mean before the conversion ext2 FS was 22% full but then converted btrfs is 64% used.

Steps Followed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1. Created an ext2 filesystem of size 2G
2. Created about 178 files of size 1M in a directory. FS was 11% full after the operation.
3. In another directory create near about 1 Lac files of very small size (2K). I kept on creating files till the number of available inodes were exhausted.

# fsck /dev/sdb
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
/dev/sdb: clean, 131072/131072 files, 188721/524288 blocks

At this point df -kh output showed that FS as 22% full

4. Tried to convert the ext2 FS to btrfs using btrfs-convert utility

# btrfs-convert /dev/sdb
creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.

5. Ran btrfsck.

6. Mounted the file system

# df -kh
=46ilesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use% M=
ounted on
=2E...
=2E...
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 251M=A0 104K=A0 2=
51M=A0=A0 1% /dev/shm
/dev/sdb=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0 1.3G=A0 740M=A0=
 64% /mnt/fs

As you can see df displays FS is 64% full, when infact before conversion it was onlly 22% full. Why is so much increase in percentage usage?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 6 lines · Prasad Joshi

Hi,

I tried using the btrfs-convert utility to convert the ext2 fs to btrfs. After the conversion was over, just to verify the correctness of operation, ran btrfsck on the device. It showed errors 800. I am not sure what does it mean, so thought of repoting it on mailing list=

=2E

Quoted 11 lines
# btrfsck /dev/sdb
root 256 inode 257 errors 800
found 1105965056 bytes used err is 1
total csum bytes: 192576
total tree bytes: 459956224
total fs tree bytes: 449585152
btree space waste bytes: 191448023
file data blocks allocated: 843206656
referenced 843206656
Btrfs v0.19-3-g6f3cf25-dirty

"root 256 inode 257" is the ext2 image file. Checksum for file extents = in
the ext2 image file is very special, so btrfsck treat it as error. This=
error
has no harm, it will go away after deleting the ext2 image file.

Quoted 29 lines

I also found that, after the conversion of FS from ext2 to btrfs %usage gone up drastically. I mean before the conversion ext2 FS was 22% full but then converted btrfs is 64% used.

Steps Followed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1. Created an ext2 filesystem of size 2G
2. Created about 178 files of size 1M in a directory. FS was 11% full after the operation.
3. In another directory create near about 1 Lac files of very small size (2K). I kept on creating files till the number of available inodes were exhausted.

# fsck /dev/sdb
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
/dev/sdb: clean, 131072/131072 files, 188721/524288 blocks

At this point df -kh output showed that FS as 22% full

4. Tried to convert the ext2 FS to btrfs using btrfs-convert utility

# btrfs-convert /dev/sdb
creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.
Quoted 6 lines

5. Ran btrfsck.

6. Mounted the file system

# df -kh
Filesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use% M=

ounted on

Quoted 3 lines

....
....
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 251M=A0 104K=A0=

251M=A0=A0 1% /dev/shm

Quoted 1 line

/dev/sdb=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0 1.3G=A0 740M=A0=

64% /mnt/fs

Quoted 4 lines

As you can see df displays FS is 64% full, when infact before conversion it was onlly 22% full. Why is so much increase in percentage usage?

This is a accounting bug, it's already fixed in btrfs-progs-unstable tr= ee.

Yan, Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 1 line · Zheng

On Sun, Oct 18, 2009 at 10:35 PM, Prasad Joshi <prasadjoshi124@gmail.=

Quoted 6 lines · com> wrote:
Quoted 6 lines

Hi,

I tried using the btrfs-convert utility to convert the ext2 fs to btrfs. After the conversion was over, just to verify the correctness of operation, ran btrfsck on the device. It showed errors 800. I am not sure what does it mean, so thought of repoting it on mailing lis=

t.

Quoted 12 lines
Quoted 11 lines
# btrfsck /dev/sdb
root 256 inode 257 errors 800
found 1105965056 bytes used err is 1
total csum bytes: 192576
total tree bytes: 459956224
total fs tree bytes: 449585152
btree space waste bytes: 191448023
file data blocks allocated: 843206656
referenced 843206656
Btrfs v0.19-3-g6f3cf25-dirty
Quoted 1 line

"root 256 inode 257" is the ext2 image file. Checksum for file extent=

s in

Quoted 1 line

the ext2 image file is very special, so btrfsck treat it as error. Th=

is error

Quoted 1 line

has no harm, =A0it will go away after deleting the ext2 image file.

OKay thanks.

Quoted 10 lines
Quoted 10 lines

I also found that, after the conversion of FS from ext2 to btrfs %usage gone up drastically. I mean before the conversion ext2 FS was 22% full but then converted btrfs is 64% used.

Steps Followed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1. Created an ext2 filesystem of size 2G
2. Created about 178 files of size 1M in a directory. FS was 11% ful=

l

Quoted 20 lines
Quoted 20 lines

after the operation.
3. In another directory create near about 1 Lac files of very small size (2K). I kept on creating files till the number of available inodes were exhausted.

# fsck /dev/sdb
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
/dev/sdb: clean, 131072/131072 files, 188721/524288 blocks

At this point df -kh output showed that FS as 22% full

4. Tried to convert the ext2 FS to btrfs using btrfs-convert utility

# btrfs-convert /dev/sdb
creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.
Quoted 6 lines
Quoted 6 lines

5. Ran btrfsck.

6. Mounted the file system

# df -kh
Filesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use% =

Mounted on

Quoted 3 lines
Quoted 3 lines

....
....
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 251M=A0 104K=A0=

251M=A0=A0 1% /dev/shm

Quoted 1 line
Quoted 1 line

/dev/sdb=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0 1.3G=A0 740M=

=A0 64% /mnt/fs

Quoted 6 lines
Quoted 4 lines

As you can see df displays FS is 64% full, when infact before conversion it was onlly 22% full. Why is so much increase in percentage usage?

This is a accounting bug, it's already fixed in btrfs-progs-unstable =

tree.

I am using the latest btrfs-progs-unstable tree. I had cloned the git repository, I used the same updated repository. Is there any other repository than the one declared on Wiki Page?

I used cloned repo from
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstabl=
e.git

Thanks,
Prasad

Quoted 3 lines

Yan, Zheng

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

On Mon, Oct 19, 2009 at 3:17 PM, Prasad Joshi <[email protected]=

Quoted 2 lines

wrote:
On Mon, Oct 19, 2009 at 7:56 AM, Yan, Zheng <[email protected]> wrote=

:

Quoted 1 line
Quoted 1 line

On Sun, Oct 18, 2009 at 10:35 PM, Prasad Joshi <prasadjoshi124@gmail=

Quoted 4 lines · =2Ecom> wrote:
Quoted 4 lines
Quoted 4 lines

Hi,

I tried using the btrfs-convert utility to convert the ext2 fs to btrfs. After the conversion was over, just to verify the correctnes=

s

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

of operation, ran btrfsck on the device. It showed errors 800. I am not sure what does it mean, so thought of repoting it on mailing li=

st.

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
# btrfsck /dev/sdb
root 256 inode 257 errors 800
found 1105965056 bytes used err is 1
total csum bytes: 192576
total tree bytes: 459956224
total fs tree bytes: 449585152
btree space waste bytes: 191448023
file data blocks allocated: 843206656
referenced 843206656
Btrfs v0.19-3-g6f3cf25-dirty
Quoted 1 line
Quoted 1 line

"root 256 inode 257" is the ext2 image file. Checksum for file exten=

ts in

Quoted 1 line
Quoted 1 line

the ext2 image file is very special, so btrfsck treat it as error. T=

his error

Quoted 6 lines
Quoted 1 line

has no harm, =A0it will go away after deleting the ext2 image file.

OKay thanks.

Quoted 4 lines
Quoted 4 lines

I also found that, after the conversion of FS from ext2 to btrfs %usage gone up drastically. I mean before the conversion ext2 FS wa=

s

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

22% full but then converted btrfs is 64% used.

Steps Followed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1. Created an ext2 filesystem of size 2G
2. Created about 178 files of size 1M in a directory. FS was 11% fu=

ll

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

after the operation.
3. In another directory create near about 1 Lac files of very small size (2K). I kept on creating files till the number of available inodes were exhausted.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
# fsck /dev/sdb
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
/dev/sdb: clean, 131072/131072 files, 188721/524288 blocks

At this point df -kh output showed that FS as 22% full

4. Tried to convert the ext2 FS to btrfs using btrfs-convert utilit=

y

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
# btrfs-convert /dev/sdb
creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

5. Ran btrfsck.

6. Mounted the file system

# df -kh
Filesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use%=

Mounted on

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

....
....
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 251M=A0 104K=A0=

251M=A0=A0 1% /dev/shm

Quoted 1 line
Quoted 1 line
Quoted 1 line

/dev/sdb=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0 1.3G=A0 740=

M=A0 64% /mnt/fs

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

As you can see df displays FS is 64% full, when infact before conversion it was onlly 22% full. Why is so much increase in percentage usage?

This is a accounting bug, it's already fixed in btrfs-progs-unstable=

tree..

Quoted 5 lines

I am using the latest btrfs-progs-unstable tree. I had cloned the git repository, I used the same updated repository. Is there any other repository than the one declared on Wiki Page?
I used cloned repo from
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unsta=

ble.git

It's not accounting bug. I guess it's due to small file packing. Please try using
-n option.

Yan, Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html