* btrfs - kernel warning
@ 2018-02-01 21:06 Patrik Ostrihon
2018-02-01 21:39 ` Chris Murphy
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Patrik Ostrihon @ 2018-02-01 21:06 UTC (permalink / raw)
To: linux-btrfs
Hi,
Today I saw warning in dmesg output. But I don't know what it means.
Could you help me please? Is it something dangerous for my dato on
this filesystem?
Thanks
pa3k
root@merkur:~# uname -a
Linux merkur 4.14.8-041408-generic #201712200555 SMP Wed Dec 20
10:57:38 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@merkur:~# btrfs --version
Btrfs v3.12
root@merkur:~# btrfs fi show
Label: none uuid: 96f60fa9-c20e-4a13-82b1-9074dd942eab
Total devices 2 FS bytes used 2.43TiB
devid 1 size 8.19TiB used 2.45TiB path /dev/sdc2
devid 2 size 8.19TiB used 2.45TiB path /dev/sdd2
Label: none uuid: 2da0261b-143a-4814-aacb-de46373aebe9
Total devices 2 FS bytes used 203.11GiB
devid 1 size 930.00GiB used 206.03GiB path /dev/sdc1
devid 2 size 930.00GiB used 206.01GiB path /dev/sdd1
Btrfs v3.12
root@merkur:~# btrfs fi df /usr/local/data
Data, RAID1: total=2.44TiB, used=2.43TiB
Data, single: total=8.00MiB, used=0.00
System, RAID1: total=8.00MiB, used=368.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, RAID1: total=5.00GiB, used=3.33GiB
Metadata, single: total=8.00MiB, used=0.00
unknown, single: total=512.00MiB, used=0.00
root@merkur:~# btrfs fi df /usr/local/data/hts
Data, RAID1: total=205.00GiB, used=202.90GiB
Data, single: total=8.00MiB, used=0.00
System, RAID1: total=8.00MiB, used=48.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, RAID1: total=1.00GiB, used=213.25MiB
Metadata, single: total=8.00MiB, used=0.00
unknown, single: total=211.78MiB, used=0.00
[ 4084.704514] ------------[ cut here ]------------
[ 4084.704561] WARNING: CPU: 3 PID: 1865 at
/home/kernel/COD/linux/fs/btrfs/ctree.h:1564
btrfs_update_device+0x1be/0x1d0 [btrfs]
[ 4084.704562] Modules linked in: snd_hda_codec_hdmi
snd_hda_codec_realtek snd_hda_codec_generic gpio_ich intel_powerclamp
coretemp mxl5xx i915 kvm_intel kvm video drm_kms_helper ftdi_sio drm
usbserial joydev irqbypass input_leds intel_cstate snd_hda_intel
snd_hda_codec snd_hda_core ddbridge snd_hwdep i2c_algo_bit snd_pcm
snd_timer fb_sys_fops syscopyarea snd cxd2099(C) sysfillrect soundcore
sysimgblt dvb_core lpc_ich mei_me nuvoton_cir mei mac_hid rc_core
shpchp 8021q garp mrp stp llc lp parport btrfs zstd_compress raid10
raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
hid_generic e1000e usbhid uas ptp raid6_pq usb_storage hid libcrc32c
pps_core pata_acpi raid1 raid0 multipath linear
[ 4084.704598] CPU: 3 PID: 1865 Comm: btrfs-cleaner Tainted: G
C 4.14.8-041408-generic #201712200555
[ 4084.704598] Hardware name: /DH57JG, BIOS
JGIBX10J.86A.0663.2011.1019.0408 10/19/2011
[ 4084.704599] task: ffff9803b17f8000 task.stack: ffffa6f2822f0000
[ 4084.704616] RIP: 0010:btrfs_update_device+0x1be/0x1d0 [btrfs]
[ 4084.704617] RSP: 0018:ffffa6f2822f3d40 EFLAGS: 00010206
[ 4084.704618] RAX: 0000000000000fff RBX: ffff9803b38bf9a0 RCX: 0000082fffff6e00
[ 4084.704619] RDX: 0000000000001000 RSI: 0000000000003f5c RDI: ffff980397b574c8
[ 4084.704619] RBP: ffffa6f2822f3d88 R08: ffffa6f2822f3cf0 R09: ffffa6f2822f3cf8
[ 4084.704620] R10: 0000000000001000 R11: 0000000000003000 R12: ffff980375d41000
[ 4084.704621] R13: 0000000000000000 R14: 0000000000003f3c R15: ffff980397b574c8
[ 4084.704622] FS: 0000000000000000(0000) GS:ffff9803b72c0000(0000)
knlGS:0000000000000000
[ 4084.704623] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4084.704624] CR2: 00007f883404d000 CR3: 000000001fa09003 CR4: 00000000000206e0
[ 4084.704625] Call Trace:
[ 4084.704644] btrfs_remove_chunk+0x365/0x870 [btrfs]
[ 4084.704658] btrfs_delete_unused_bgs+0x320/0x3c0 [btrfs]
[ 4084.704672] cleaner_kthread+0x159/0x170 [btrfs]
[ 4084.704676] kthread+0x125/0x140
[ 4084.704689] ? __btree_submit_bio_start+0x20/0x20 [btrfs]
[ 4084.704691] ? kthread_create_on_node+0x70/0x70
[ 4084.704694] ret_from_fork+0x25/0x30
[ 4084.704695] Code: 4c 89 ff 45 31 c0 ba 10 00 00 00 4c 89 f6 e8 1a
20 ff ff 4c 89 ff e8 82 ea fc ff e9 d3 fe ff ff 41 bd f4 ff ff ff e9
d0 fe ff ff <0f> ff eb b6 e8 c9 15 9e de 66 0f 1f 84 00 00 00 00 00 66
66 66
[ 4084.704717] ---[ end trace 4a9fc911d4199609 ]---
[ 4084.705475] ------------[ cut here ]------------
[ 4084.705516] WARNING: CPU: 2 PID: 1865 at
/home/kernel/COD/linux/fs/btrfs/ctree.h:1564
btrfs_update_device+0x1be/0x1d0 [btrfs]
[ 4084.705517] Modules linked in: snd_hda_codec_hdmi
snd_hda_codec_realtek snd_hda_codec_generic gpio_ich intel_powerclamp
coretemp mxl5xx i915 kvm_intel kvm video drm_kms_helper ftdi_sio drm
usbserial joydev irqbypass input_leds intel_cstate snd_hda_intel
snd_hda_codec snd_hda_core ddbridge snd_hwdep i2c_algo_bit snd_pcm
snd_timer fb_sys_fops syscopyarea snd cxd2099(C) sysfillrect soundcore
sysimgblt dvb_core lpc_ich mei_me nuvoton_cir mei mac_hid rc_core
shpchp 8021q garp mrp stp llc lp parport btrfs zstd_compress raid10
raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
hid_generic e1000e usbhid uas ptp raid6_pq usb_storage hid libcrc32c
pps_core pata_acpi raid1 raid0 multipath linear
[ 4084.705573] CPU: 2 PID: 1865 Comm: btrfs-cleaner Tainted: G
WC 4.14.8-041408-generic #201712200555
[ 4084.705574] Hardware name: /DH57JG, BIOS
JGIBX10J.86A.0663.2011.1019.0408 10/19/2011
[ 4084.705576] task: ffff9803b17f8000 task.stack: ffffa6f2822f0000
[ 4084.705611] RIP: 0010:btrfs_update_device+0x1be/0x1d0 [btrfs]
[ 4084.705613] RSP: 0018:ffffa6f2822f3d40 EFLAGS: 00010206
[ 4084.705616] RAX: 0000000000000fff RBX: ffff9803b1787000 RCX: 0000082fffff6e00
[ 4084.705617] RDX: 0000000000001000 RSI: 0000000000003f5c RDI: ffff980397b574c8
[ 4084.705619] RBP: ffffa6f2822f3d88 R08: ffffa6f2822f3cf0 R09: ffffa6f2822f3cf8
[ 4084.705620] R10: 0000000000001000 R11: 0000000000003000 R12: ffff980375d41000
[ 4084.705622] R13: 0000000000000000 R14: 0000000000003f3c R15: ffff980397b574c8
[ 4084.705624] FS: 0000000000000000(0000) GS:ffff9803b7280000(0000)
knlGS:0000000000000000
[ 4084.705626] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4084.705628] CR2: 00007f8834051000 CR3: 000000001fa09006 CR4: 00000000000206e0
[ 4084.705629] Call Trace:
[ 4084.705667] btrfs_remove_chunk+0x365/0x870 [btrfs]
[ 4084.705698] btrfs_delete_unused_bgs+0x320/0x3c0 [btrfs]
[ 4084.705729] cleaner_kthread+0x159/0x170 [btrfs]
[ 4084.705732] kthread+0x125/0x140
[ 4084.705762] ? __btree_submit_bio_start+0x20/0x20 [btrfs]
[ 4084.705765] ? kthread_create_on_node+0x70/0x70
[ 4084.705768] ret_from_fork+0x25/0x30
[ 4084.705771] Code: 4c 89 ff 45 31 c0 ba 10 00 00 00 4c 89 f6 e8 1a
20 ff ff 4c 89 ff e8 82 ea fc ff e9 d3 fe ff ff 41 bd f4 ff ff ff e9
d0 fe ff ff <0f> ff eb b6 e8 c9 15 9e de 66 0f 1f 84 00 00 00 00 00 66
66 66
[ 4084.705819] ---[ end trace 4a9fc911d419960a ]---
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: btrfs - kernel warning 2018-02-01 21:06 btrfs - kernel warning Patrik Ostrihon @ 2018-02-01 21:39 ` Chris Murphy 2018-02-01 21:40 ` Chris Murphy 2018-02-02 1:40 ` Qu Wenruo 2 siblings, 0 replies; 7+ messages in thread From: Chris Murphy @ 2018-02-01 21:39 UTC (permalink / raw) To: Patrik Ostrihon; +Cc: Btrfs BTRFS On Thu, Feb 1, 2018 at 2:06 PM, Patrik Ostrihon <patrik.ostrihon@gmail.com> wrote: > Hi, > > Today I saw warning in dmesg output. But I don't know what it means. > Could you help me please? Is it something dangerous for my dato on > this filesystem? Is this a persistent warning you're getting or is it a one time message? Looks like it's happening when deallocating empty block groups. I'm not sure why, but I also can't tell from the call trace which of the two Btrfs file systems it's referring to. Anyway, what I would do in order: a. Backups. Your post suggests you're worried about your data, so first order of business is to update the backups. Raid1 is not a backup. b. I'd find a relatively recent live, so that it has a relatively recent btrfs-progs, v4.11.3 or newer. Create USB stick media to boot from and run the following commands on both volumes (pick one of the two drives for each Btrfs volume; it is not a per drive check it is a per volume check and it doesn't matter which of the two drives you pick). btrfs check btrfs check --mode=lowmem The lowmem mode is a different implementation and sometimes there are different results. c. You only posted the df output for one of the two file systems. The one you posted is not completely raid1, you have some single chunks which don't appear to be used but that they're present can impact the ability to mount degraded (i.e. degraded mount might fail in this condition) btrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /usr/local/data That will leave existing raid1 block groups untouched and will effectively remove the unused single chunks. You should check the other volume and make sure all block groups are raid1. -- Chris Murphy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: btrfs - kernel warning 2018-02-01 21:06 btrfs - kernel warning Patrik Ostrihon 2018-02-01 21:39 ` Chris Murphy @ 2018-02-01 21:40 ` Chris Murphy 2018-02-02 1:40 ` Qu Wenruo 2 siblings, 0 replies; 7+ messages in thread From: Chris Murphy @ 2018-02-01 21:40 UTC (permalink / raw) To: Patrik Ostrihon; +Cc: Btrfs BTRFS Oh and to be super clear, do not use --repair with 'btrfs check' until there's a dev recommendation to try it. It should be safe, but is still sometimes fragile in the multiple device case. --- Chris Murphy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: btrfs - kernel warning 2018-02-01 21:06 btrfs - kernel warning Patrik Ostrihon 2018-02-01 21:39 ` Chris Murphy 2018-02-01 21:40 ` Chris Murphy @ 2018-02-02 1:40 ` Qu Wenruo 2018-02-02 2:09 ` Chris Murphy 2018-02-02 2:49 ` Duncan 2 siblings, 2 replies; 7+ messages in thread From: Qu Wenruo @ 2018-02-02 1:40 UTC (permalink / raw) To: Patrik Ostrihon, linux-btrfs [-- Attachment #1.1: Type: text/plain, Size: 7898 bytes --] On 2018年02月02日 05:06, Patrik Ostrihon wrote: > Hi, > > Today I saw warning in dmesg output. But I don't know what it means. > Could you help me please? Is it something dangerous for my dato on > this filesystem? > > Thanks > > pa3k > > root@merkur:~# uname -a > > Linux merkur 4.14.8-041408-generic #201712200555 SMP Wed Dec 20 > 10:57:38 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > root@merkur:~# btrfs --version > Btrfs v3.12 > > root@merkur:~# btrfs fi show > > Label: none uuid: 96f60fa9-c20e-4a13-82b1-9074dd942eab > Total devices 2 FS bytes used 2.43TiB > devid 1 size 8.19TiB used 2.45TiB path /dev/sdc2 > devid 2 size 8.19TiB used 2.45TiB path /dev/sdd2 > > Label: none uuid: 2da0261b-143a-4814-aacb-de46373aebe9 > Total devices 2 FS bytes used 203.11GiB > devid 1 size 930.00GiB used 206.03GiB path /dev/sdc1 > devid 2 size 930.00GiB used 206.01GiB path /dev/sdd1 > > Btrfs v3.12 > > > root@merkur:~# btrfs fi df /usr/local/data > > Data, RAID1: total=2.44TiB, used=2.43TiB > Data, single: total=8.00MiB, used=0.00 > System, RAID1: total=8.00MiB, used=368.00KiB > System, single: total=4.00MiB, used=0.00 > Metadata, RAID1: total=5.00GiB, used=3.33GiB > Metadata, single: total=8.00MiB, used=0.00 > unknown, single: total=512.00MiB, used=0.00 > root@merkur:~# btrfs fi df /usr/local/data/hts > Data, RAID1: total=205.00GiB, used=202.90GiB > Data, single: total=8.00MiB, used=0.00 > System, RAID1: total=8.00MiB, used=48.00KiB > System, single: total=4.00MiB, used=0.00 > Metadata, RAID1: total=1.00GiB, used=213.25MiB > Metadata, single: total=8.00MiB, used=0.00 > unknown, single: total=211.78MiB, used=0.00 > > > [ 4084.704514] ------------[ cut here ]------------ > [ 4084.704561] WARNING: CPU: 3 PID: 1865 at > /home/kernel/COD/linux/fs/btrfs/ctree.h:1564 This normally means your device size is not aligned to 4K. It's normal if your fs has some age as old mkfs.btrfs doesn't align device size. And recently kernel makes the device size alignment check more restrict, so it will cause such warning. Fortunately btrfs-progs provides offline tool to fix it. You could use "btrfs rescue fix-device-size <device>" to easily fix it. And since it's an offline tool, you need to umount your fs first. Thanks, Qu > btrfs_update_device+0x1be/0x1d0 [btrfs] > [ 4084.704562] Modules linked in: snd_hda_codec_hdmi > snd_hda_codec_realtek snd_hda_codec_generic gpio_ich intel_powerclamp > coretemp mxl5xx i915 kvm_intel kvm video drm_kms_helper ftdi_sio drm > usbserial joydev irqbypass input_leds intel_cstate snd_hda_intel > snd_hda_codec snd_hda_core ddbridge snd_hwdep i2c_algo_bit snd_pcm > snd_timer fb_sys_fops syscopyarea snd cxd2099(C) sysfillrect soundcore > sysimgblt dvb_core lpc_ich mei_me nuvoton_cir mei mac_hid rc_core > shpchp 8021q garp mrp stp llc lp parport btrfs zstd_compress raid10 > raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor > hid_generic e1000e usbhid uas ptp raid6_pq usb_storage hid libcrc32c > pps_core pata_acpi raid1 raid0 multipath linear > [ 4084.704598] CPU: 3 PID: 1865 Comm: btrfs-cleaner Tainted: G > C 4.14.8-041408-generic #201712200555 > [ 4084.704598] Hardware name: /DH57JG, BIOS > JGIBX10J.86A.0663.2011.1019.0408 10/19/2011 > [ 4084.704599] task: ffff9803b17f8000 task.stack: ffffa6f2822f0000 > [ 4084.704616] RIP: 0010:btrfs_update_device+0x1be/0x1d0 [btrfs] > [ 4084.704617] RSP: 0018:ffffa6f2822f3d40 EFLAGS: 00010206 > [ 4084.704618] RAX: 0000000000000fff RBX: ffff9803b38bf9a0 RCX: 0000082fffff6e00 > [ 4084.704619] RDX: 0000000000001000 RSI: 0000000000003f5c RDI: ffff980397b574c8 > [ 4084.704619] RBP: ffffa6f2822f3d88 R08: ffffa6f2822f3cf0 R09: ffffa6f2822f3cf8 > [ 4084.704620] R10: 0000000000001000 R11: 0000000000003000 R12: ffff980375d41000 > [ 4084.704621] R13: 0000000000000000 R14: 0000000000003f3c R15: ffff980397b574c8 > [ 4084.704622] FS: 0000000000000000(0000) GS:ffff9803b72c0000(0000) > knlGS:0000000000000000 > [ 4084.704623] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 4084.704624] CR2: 00007f883404d000 CR3: 000000001fa09003 CR4: 00000000000206e0 > [ 4084.704625] Call Trace: > [ 4084.704644] btrfs_remove_chunk+0x365/0x870 [btrfs] > [ 4084.704658] btrfs_delete_unused_bgs+0x320/0x3c0 [btrfs] > [ 4084.704672] cleaner_kthread+0x159/0x170 [btrfs] > [ 4084.704676] kthread+0x125/0x140 > [ 4084.704689] ? __btree_submit_bio_start+0x20/0x20 [btrfs] > [ 4084.704691] ? kthread_create_on_node+0x70/0x70 > [ 4084.704694] ret_from_fork+0x25/0x30 > [ 4084.704695] Code: 4c 89 ff 45 31 c0 ba 10 00 00 00 4c 89 f6 e8 1a > 20 ff ff 4c 89 ff e8 82 ea fc ff e9 d3 fe ff ff 41 bd f4 ff ff ff e9 > d0 fe ff ff <0f> ff eb b6 e8 c9 15 9e de 66 0f 1f 84 00 00 00 00 00 66 > 66 66 > [ 4084.704717] ---[ end trace 4a9fc911d4199609 ]--- > [ 4084.705475] ------------[ cut here ]------------ > [ 4084.705516] WARNING: CPU: 2 PID: 1865 at > /home/kernel/COD/linux/fs/btrfs/ctree.h:1564 > btrfs_update_device+0x1be/0x1d0 [btrfs] > [ 4084.705517] Modules linked in: snd_hda_codec_hdmi > snd_hda_codec_realtek snd_hda_codec_generic gpio_ich intel_powerclamp > coretemp mxl5xx i915 kvm_intel kvm video drm_kms_helper ftdi_sio drm > usbserial joydev irqbypass input_leds intel_cstate snd_hda_intel > snd_hda_codec snd_hda_core ddbridge snd_hwdep i2c_algo_bit snd_pcm > snd_timer fb_sys_fops syscopyarea snd cxd2099(C) sysfillrect soundcore > sysimgblt dvb_core lpc_ich mei_me nuvoton_cir mei mac_hid rc_core > shpchp 8021q garp mrp stp llc lp parport btrfs zstd_compress raid10 > raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor > hid_generic e1000e usbhid uas ptp raid6_pq usb_storage hid libcrc32c > pps_core pata_acpi raid1 raid0 multipath linear > [ 4084.705573] CPU: 2 PID: 1865 Comm: btrfs-cleaner Tainted: G > WC 4.14.8-041408-generic #201712200555 > [ 4084.705574] Hardware name: /DH57JG, BIOS > JGIBX10J.86A.0663.2011.1019.0408 10/19/2011 > [ 4084.705576] task: ffff9803b17f8000 task.stack: ffffa6f2822f0000 > [ 4084.705611] RIP: 0010:btrfs_update_device+0x1be/0x1d0 [btrfs] > [ 4084.705613] RSP: 0018:ffffa6f2822f3d40 EFLAGS: 00010206 > [ 4084.705616] RAX: 0000000000000fff RBX: ffff9803b1787000 RCX: 0000082fffff6e00 > [ 4084.705617] RDX: 0000000000001000 RSI: 0000000000003f5c RDI: ffff980397b574c8 > [ 4084.705619] RBP: ffffa6f2822f3d88 R08: ffffa6f2822f3cf0 R09: ffffa6f2822f3cf8 > [ 4084.705620] R10: 0000000000001000 R11: 0000000000003000 R12: ffff980375d41000 > [ 4084.705622] R13: 0000000000000000 R14: 0000000000003f3c R15: ffff980397b574c8 > [ 4084.705624] FS: 0000000000000000(0000) GS:ffff9803b7280000(0000) > knlGS:0000000000000000 > [ 4084.705626] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 4084.705628] CR2: 00007f8834051000 CR3: 000000001fa09006 CR4: 00000000000206e0 > [ 4084.705629] Call Trace: > [ 4084.705667] btrfs_remove_chunk+0x365/0x870 [btrfs] > [ 4084.705698] btrfs_delete_unused_bgs+0x320/0x3c0 [btrfs] > [ 4084.705729] cleaner_kthread+0x159/0x170 [btrfs] > [ 4084.705732] kthread+0x125/0x140 > [ 4084.705762] ? __btree_submit_bio_start+0x20/0x20 [btrfs] > [ 4084.705765] ? kthread_create_on_node+0x70/0x70 > [ 4084.705768] ret_from_fork+0x25/0x30 > [ 4084.705771] Code: 4c 89 ff 45 31 c0 ba 10 00 00 00 4c 89 f6 e8 1a > 20 ff ff 4c 89 ff e8 82 ea fc ff e9 d3 fe ff ff 41 bd f4 ff ff ff e9 > d0 fe ff ff <0f> ff eb b6 e8 c9 15 9e de 66 0f 1f 84 00 00 00 00 00 66 > 66 66 > [ 4084.705819] ---[ end trace 4a9fc911d419960a ]--- > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 520 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: btrfs - kernel warning 2018-02-02 1:40 ` Qu Wenruo @ 2018-02-02 2:09 ` Chris Murphy 2018-02-02 2:49 ` Duncan 1 sibling, 0 replies; 7+ messages in thread From: Chris Murphy @ 2018-02-02 2:09 UTC (permalink / raw) To: Qu Wenruo; +Cc: Patrik Ostrihon, Btrfs BTRFS On Thu, Feb 1, 2018 at 6:40 PM, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote: > Fortunately btrfs-progs provides offline tool to fix it. > You could use "btrfs rescue fix-device-size <device>" to easily fix it. > And since it's an offline tool, you need to umount your fs first. > This feature first appears in btrfs-progs v4.14. -- Chris Murphy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: btrfs - kernel warning 2018-02-02 1:40 ` Qu Wenruo 2018-02-02 2:09 ` Chris Murphy @ 2018-02-02 2:49 ` Duncan 2018-02-05 4:52 ` Duncan 1 sibling, 1 reply; 7+ messages in thread From: Duncan @ 2018-02-02 2:49 UTC (permalink / raw) To: linux-btrfs Qu Wenruo posted on Fri, 02 Feb 2018 09:40:30 +0800 as excerpted: > > On 2018年02月02日 05:06, Patrik Ostrihon wrote: >> Hi, >> >> Today I saw warning in dmesg output. But I don't know what it means. >> Could you help me please? Is it something dangerous for my dato on this >> filesystem? >> >> Thanks >> >> pa3k >> >> root@merkur:~# uname -a >> >> Linux merkur 4.14.8-041408-generic #201712200555 SMP Wed Dec 20 >> 10:57:38 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux >> >> root@merkur:~# btrfs --version Btrfs v3.12 >> >> root@merkur:~# btrfs fi show >> >> Label: none uuid: 96f60fa9-c20e-4a13-82b1-9074dd942eab >> Total devices 2 FS bytes used 2.43TiB devid 1 size 8.19TiB >> used 2.45TiB path /dev/sdc2 devid 2 size 8.19TiB used >> 2.45TiB path /dev/sdd2 >> >> Label: none uuid: 2da0261b-143a-4814-aacb-de46373aebe9 >> Total devices 2 FS bytes used 203.11GiB devid 1 size >> 930.00GiB used 206.03GiB path /dev/sdc1 devid 2 size >> 930.00GiB used 206.01GiB path /dev/sdd1 >> >> Btrfs v3.12 >> >> >> root@merkur:~# btrfs fi df /usr/local/data >> >> Data, RAID1: total=2.44TiB, used=2.43TiB Data, single: total=8.00MiB, >> used=0.00 System, RAID1: total=8.00MiB, used=368.00KiB System, single: >> total=4.00MiB, used=0.00 Metadata, RAID1: total=5.00GiB, used=3.33GiB >> Metadata, single: total=8.00MiB, used=0.00 unknown, single: >> total=512.00MiB, used=0.00 root@merkur:~# btrfs fi df >> /usr/local/data/hts Data, RAID1: total=205.00GiB, used=202.90GiB Data, >> single: total=8.00MiB, used=0.00 System, RAID1: total=8.00MiB, >> used=48.00KiB System, single: total=4.00MiB, used=0.00 Metadata, RAID1: >> total=1.00GiB, used=213.25MiB Metadata, single: total=8.00MiB, >> used=0.00 unknown, single: total=211.78MiB, used=0.00 >> >> >> [ 4084.704514] ------------[ cut here ]------------ >> [ 4084.704561] WARNING: CPU: 3 PID: 1865 at >> /home/kernel/COD/linux/fs/btrfs/ctree.h:1564 > > This normally means your device size is not aligned to 4K. > > It's normal if your fs has some age as old mkfs.btrfs doesn't align > device size. And... btrfs-progs-3.12, as reported, is _old_, certainly old enough to create both the unaligned filesystem ends, as Qu says here, as well as the unused single-chunks as a remnant of the mkfs.btrfs process, as Chris Murphy says. While in normal btrfs runtime it's the kernel version that's critical, as most runtime commands (balance, scrub...) simply call the appropriate kernel functionality to do the real work, once something goes wrong it's the btrfs-progs userspace tools that do the fixing, and btrfs-progs 3.12 is positively ancient, in btrfs terms. So you _really_ want a newer btrfs-progs if you plan on doing any repairs or the like. As CMurphy says, 4.11-ish is starting to be reasonable. But you're on the LTS kernel 4.14 series and userspace 4.14 was developed in parallel, so btrfs-progs-3.14 would be ideal. That should eliminate similar problems with newly created btrfs, since recent mkfs.btrfs neither creates those unused single chunks during the mkfs process, nor unaligned btrfs ends on the device. > And recently kernel makes the device size alignment check more restrict, > so it will cause such warning. > > > Fortunately btrfs-progs provides offline tool to fix it. > You could use "btrfs rescue fix-device-size <device>" to easily fix it. > And since it's an offline tool, you need to umount your fs first. Again, you'll certainly need something well newer than btrfs-progs 3.12 for that, tho. That's ~4.5 years outdated, right after btrfs officially removed the experimental warnings, and a _LOT_ of bugs (including both of those mentioned here) have been fixed since then! Meanwhile, reemphasizing something CMurphy said as well. I like to point out the sysadmin's first rule of backups: The true value you place on your data is defined not by any arbitrary claims, as those are just words, but rather, by the number of backups you consider it worth the time/trouble/resources to create, of that data. Given that, you can *always* rest easy when something goes wrong and the filesystem won't mount, because regardless of whether you have a backup or not, you /always/ saved what you defined as most important to you, either the data, because it was backed up, or the time/trouble/resources you would have spent on that data has it been of more than the trivial value necessary to make it worth having that backup. Similarly with backup updates, only in the case of updates it's the data in the delta between your last backup and the current state. As soon as the change to your data since the last backup becomes more valuable than the time/trouble/resources necessary to update your backup, you will do so. If you haven't, it simply means you're defining the changes since your last backup as of less value than the time/trouble/resources necessary to do that update, so again, you can *always* rest easy in the face of filesystem or device problems, because you either have it backed up, or by definition of /not/ having it backed up, it was self-evidently not worth the trouble to do so yet, so you saved what was most important to you either way. So think about your value definitions regarding your data and change them if you need to... while you still have the chance. =:^) (And the implications of the above change how you deal with a broken filesystem too. With either current backups or what you've literally defined as throw-away data due to it not being worth the trouble of backups, it makes little sense to spend more than a trivial amount of time trying to recover data from a messed up filesystem, especially given that there's no guarantee you'll get it all back undamaged even if you /do/ spend time time. It's often simpler and takes less time, as well as more success-sure, to simply blow away the defective filesystem with a fresh mkfs and restore the data from backups, since that way you know you'll have a fresh filesystem and known-good data from the backup, as opposed to no guarantees /what/ you'll end up with trying to recover/ repair the old filesystem.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: btrfs - kernel warning 2018-02-02 2:49 ` Duncan @ 2018-02-05 4:52 ` Duncan 0 siblings, 0 replies; 7+ messages in thread From: Duncan @ 2018-02-05 4:52 UTC (permalink / raw) To: linux-btrfs Duncan posted on Fri, 02 Feb 2018 02:49:52 +0000 as excerpted: > As CMurphy says, 4.11-ish is starting to be reasonable. But you're on > the LTS kernel 4.14 series and userspace 4.14 was developed in parallel, > so btrfs-progs-3.14 would be ideal. Umm... obviously that should be 4.14. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-02-05 4:55 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-02-01 21:06 btrfs - kernel warning Patrik Ostrihon 2018-02-01 21:39 ` Chris Murphy 2018-02-01 21:40 ` Chris Murphy 2018-02-02 1:40 ` Qu Wenruo 2018-02-02 2:09 ` Chris Murphy 2018-02-02 2:49 ` Duncan 2018-02-05 4:52 ` Duncan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).