Bug 217686 - ERROR: error during balancing '/mnt/pnt': Read-only file system
Summary: ERROR: error during balancing '/mnt/pnt': Read-only file system
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: BTRFS virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-19 21:47 UTC by Greyson Christoforo
Modified: 2023-07-20 01:11 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
journal prints (82.68 KB, text/plain)
2023-07-19 21:47 UTC, Greyson Christoforo
Details

Description Greyson Christoforo 2023-07-19 21:47:14 UTC
Created attachment 304668 [details]
journal prints

Hi. My kernel is Arch Linux kernel 6.4.3-arch1-2

I had a btrfs file system that was like this:
```
# btrfsck --readonly /dev/nvme2n1p6
Opening filesystem to check...
Checking filesystem on /dev/nvme2n1p6
UUID: 8d...
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 241980678144 bytes used, no error found
total csum bytes: 229635788
total tree bytes: 3186114560
total fs tree bytes: 2615017472
total extent tree bytes: 247808000
btree space waste bytes: 621915705
file data blocks allocated: 465312006144
 referenced 300238901248

# mount /dev/nvme2n1p6 /mnt/pnt
# btrfs scrub start -Bd /mnt/pnt

Scrub device /dev/nvme2n1p6 (id 1) done
Scrub started:    Wed Jul 19 13:37:44 2023
Status:           finished
Duration:         0:04:22
Total to scrub:   225.36GiB
Rate:             880.80MiB/s
Error summary:    no errors found
# btrfs fi show /mnt/pnt
Label: 'btrfsRoot'  uuid: 8d...
	Total devices 1 FS bytes used 225.36GiB
	devid    1 size 281.07GiB used 261.49GiB path /dev/nvme2n1p6
# btrfs filesystem df /mnt/pnt
Data, single: total=255.46GiB, used=222.39GiB
System, single: total=32.00MiB, used=48.00KiB
Metadata, single: total=6.00GiB, used=2.97GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
```

I want to convert the metadata to the dup profile. So I ran
`btrfs balance start -mconvert=dup /mnt/pnt`

my fs then turned read-only and the attached (journal.log) ominous stuff appeared in my journal. I think that's bug!
Comment 1 Bagas Sanjaya 2023-07-20 01:11:12 UTC
(In reply to Greyson Christoforo from comment #0)
> Created attachment 304668 [details]
> journal prints
> 
> Hi. My kernel is Arch Linux kernel 6.4.3-arch1-2
> 
> I had a btrfs file system that was like this:
> ```
> # btrfsck --readonly /dev/nvme2n1p6
> Opening filesystem to check...
> Checking filesystem on /dev/nvme2n1p6
> UUID: 8d...
> [1/7] checking root items
> [2/7] checking extents
> [3/7] checking free space tree
> [4/7] checking fs roots
> [5/7] checking only csums items (without verifying data)
> [6/7] checking root refs
> [7/7] checking quota groups skipped (not enabled on this FS)
> found 241980678144 bytes used, no error found
> total csum bytes: 229635788
> total tree bytes: 3186114560
> total fs tree bytes: 2615017472
> total extent tree bytes: 247808000
> btree space waste bytes: 621915705
> file data blocks allocated: 465312006144
>  referenced 300238901248
> 
> # mount /dev/nvme2n1p6 /mnt/pnt
> # btrfs scrub start -Bd /mnt/pnt
> 
> Scrub device /dev/nvme2n1p6 (id 1) done
> Scrub started:    Wed Jul 19 13:37:44 2023
> Status:           finished
> Duration:         0:04:22
> Total to scrub:   225.36GiB
> Rate:             880.80MiB/s
> Error summary:    no errors found
> # btrfs fi show /mnt/pnt
> Label: 'btrfsRoot'  uuid: 8d...
>       Total devices 1 FS bytes used 225.36GiB
>       devid    1 size 281.07GiB used 261.49GiB path /dev/nvme2n1p6
> # btrfs filesystem df /mnt/pnt
> Data, single: total=255.46GiB, used=222.39GiB
> System, single: total=32.00MiB, used=48.00KiB
> Metadata, single: total=6.00GiB, used=2.97GiB
> GlobalReserve, single: total=512.00MiB, used=0.00B
> ```
> 
> I want to convert the metadata to the dup profile. So I ran
> `btrfs balance start -mconvert=dup /mnt/pnt`
> 
> my fs then turned read-only and the attached (journal.log) ominous stuff
> appeared in my journal. I think that's bug!

Do you have this issue on v6.1.y stable series?

Note You need to log in before you can comment on or make changes to this bug.