On Sun, Jan 10, 2016 at 3:14 PM, Henk Slager <eye1tm@xxxxxxxxx> wrote: > On Sat, Jan 9, 2016 at 9:26 PM, Hugo Mills <hugo@xxxxxxxxxxxxx> wrote: >> On Sat, Jan 09, 2016 at 09:00:47PM +0100, cheater00 . wrote: >>> Hello, >>> I can repeatedly trigger this bug by making the "data" portion fill >>> up. If you remember the partition is 6 TB but in btrfs filesystem df >>> Data is shown as only 2TB when in fact it should be nearly 6TB. So >>> this has nothing to do with kernel bugs. The filesystem on disk is >>> structured incorrectly. How do i fix this? How do I make "Data" >>> bigger? What is it exactly? >> >> This is *exactly* the behaviour of the known kernel bug. The bug is >> that the FS *should* be extending the data allocation when it gets >> near to full, and it's not. There is no way of manually allocating >> more (because the FS should be doing it automatically). There is no >> known way of persuading the FS to it when it isn't. > > Probably this is 'the' bug we talk about: > https://bugzilla.kernel.org/show_bug.cgi?id=74101 Yes, would seem like it. > Size of the fs is much smaller, but also problem occurs when fill-level is <50% > > btrfs fs resize did nothing you mention, but AFAIK you should see > something in dmesg when you do that. I remounted (to make the filesystem rw again) and got the attached log. There are some errors in there. But bear in mind that this disk has been hanging on in ro mode for a few days now. I did this: # btrfs fi resize -1T Media Resize 'Media' of '-1T' # btrfs filesystem resize -1G Media Resize 'Media' of '-1G' # btrfs filesystem resize -1T Media Resize 'Media' of '-1T' # btrfs filesystem resize max Media Resize 'Media' of 'max' and it resulted in the following lines in dmesg: [189115.919160] BTRFS: new size for /dev/sdc1 is 4901661835264 [189177.306291] BTRFS: new size for /dev/sdc1 is 4900588093440 [189181.950289] BTRFS: new size for /dev/sdc1 is 3801076465664 [189232.064357] BTRFS: new size for /dev/sdc1 is 6001173463040 (note the device changed from sdd to sdc when I rebooted last) > And what is the output of gdisk -l /dev/sdd , just to check? (the device changed to sdc since I've rebooted) # gdisk -l /dev/sdc GPT fdisk (gdisk) version 0.8.8 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sdc: 11721045168 sectors, 5.5 TiB Logical sector size: 512 bytes Disk identifier (GUID): 0DEF5509-8730-4AB4-A846-79DA3C376F66 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 11721045134 Partitions will be aligned on 2048-sector boundaries Total free space is 3181 sectors (1.6 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 11721043967 5.5 TiB 8300 > Have you had the fs already filled up to e.g. 95% before or has is > always been not more than 2TiB? It has never been more than 2TB, I've had it for quite some time now but it's always hovered around 1TB. > Why are the single (empty )profiles for metadata and system still > there? They should have been removed already by the various balancing > operations that are advised in the btrfs-wiki. Not sure. Would this happen automatically? Or is this something I should have done? I have another fs on the same model/size disk, which isn't exhibiting this bug, and it has those profiles as well. Here's what both look like: buggy fs ("Media"): Data, single: total=1.98TiB, used=1.98TiB System, DUP: total=8.00MiB, used=240.00KiB System, single: total=4.00MiB, used=0.00B Metadata, DUP: total=5.50GiB, used=3.49GiB Metadata, single: total=8.00MiB, used=0.00B GlobalReserve, single: total=512.00MiB, used=0.00B non-buggy fs: Data, single: total=5.43TiB, used=5.40TiB System, DUP: total=8.00MiB, used=608.00KiB System, single: total=4.00MiB, used=0.00B Metadata, DUP: total=12.50GiB, used=11.21GiB Metadata, single: total=8.00MiB, used=0.00B GlobalReserve, single: total=512.00MiB, used=0.00B > What is the output of btrfs check /dev/sdd ? The usb resets > mentioned might have introduced some errors to the fs (that is what I > have experienced at least, but it depends on timing etc) I'll run that overnight and report tomorrow. > What you could try is to create an image+'copy' of the fs with > btrfs-image just after you get ENOSPC abd then do various tests with > that (make sure unmount or even better unplug the physical hdd!). Like > mounting and then try to add a file, convert all metadata + system > from dup to single and then try to add a file. It all doesn't give > real space, but it might give hints to what could be wrong. I can't do that because I would have to buy an extra disk which is 300 euro. > If you somehow manage to reduce the fs by lets say 100G and also the > partition, you could install or copy a newer linux+kernel to > partition(s) in that 100G space and boot from there. let me try finding the latest kernel then. There are backports.
[188936.772198] BTRFS error (device sdc1): cleaner transaction attach returned -30 [188936.776188] ------------[ cut here ]------------ [188936.776215] WARNING: CPU: 3 PID: 623 at /home/kernel/COD/linux/fs/btrfs/inode.c:8968 btrfs_destroy_inode+0x298/0x2c0 [btrfs]() [188936.776217] Modules linked in: ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c nls_utf8 isofs pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) cuse ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables x_tables usblp snd_hda_codec_hdmi hp_wmi sparse_keymap snd_hda_codec_idt snd_hda_codec_generic intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp dm_multipath snd_hda_intel snd_hda_codec coretemp snd_hda_core kvm_intel radeon snd_hwdep hid_logitech_hidpp kvm snd_pcm i915 snd_seq_midi crc32_pclmul snd_seq_midi_event snd_rawmidi aesni_intel aes_i586 ttm xts snd_seq lrw drm_kms_helper snd_seq_device gf128mul snd_timer ablk_helper drm joydev cryptd bnep rfcomm snd input_leds i2c_algo_bit fb_sys_fops rtsx_pci_ms bluetooth serio_raw soundcore syscopyarea memstick sysfillrect sysimgblt hp_accel mei_me lis3lv02d lpc_ich wmi shpchp input_polldev mei video mac_hid nfsd auth_rpcgss nfs_acl parport_pc nfs ppdev lockd lp grace sunrpc parport fscache binfmt_misc hid_generic hid_logitech_dj usbhid hid btrfs xor uas usb_storage raid6_pq rtsx_pci_sdmmc ahci r8169 sdhci_pci psmouse libahci sdhci rtsx_pci mii fjes [188936.776312] CPU: 3 PID: 623 Comm: umount Tainted: G W OE 4.3.0-040300rc7-generic #201510260712 [188936.776314] Hardware name: Hewlett-Packard HP Pavilion dv6 Notebook PC/17FA, BIOS F.02 10/03/2011 [188936.776317] 00000000 00000000 e831dddc c13610e8 00000000 e831de0c c1068107 c1957804 [188936.776322] 00000003 0000026f f8ae5c34 00002308 f8a6e248 f8a6e248 ceabb1e4 00000002 [188936.776326] ea887800 e831de1c c10681e2 00000009 00000000 e831de4c f8a6e248 e831de38 [188936.776331] Call Trace: [188936.776338] [<c13610e8>] dump_stack+0x41/0x59 [188936.776343] [<c1068107>] warn_slowpath_common+0x87/0xc0 [188936.776360] [<f8a6e248>] ? btrfs_destroy_inode+0x298/0x2c0 [btrfs] [188936.776375] [<f8a6e248>] ? btrfs_destroy_inode+0x298/0x2c0 [btrfs] [188936.776379] [<c10681e2>] warn_slowpath_null+0x22/0x30 [188936.776393] [<f8a6e248>] btrfs_destroy_inode+0x298/0x2c0 [btrfs] [188936.776397] [<c1201fe8>] ? fsnotify_destroy_marks+0x58/0x70 [188936.776400] [<c11dd8df>] destroy_inode+0x2f/0x60 [188936.776402] [<c11dda0a>] evict+0xfa/0x170 [188936.776405] [<c11ddc23>] iput+0x153/0x1c0 [188936.776419] [<f8a44b64>] btrfs_put_block_group_cache+0x94/0xd0 [btrfs] [188936.776434] [<f8a569b1>] close_ctree+0x131/0x300 [btrfs] [188936.776437] [<c11ddab7>] ? dispose_list+0x37/0x50 [188936.776440] [<c11de769>] ? evict_inodes+0x139/0x150 [188936.776450] [<f8a27056>] btrfs_put_super+0x16/0x20 [btrfs] [188936.776454] [<c11c6850>] generic_shutdown_super+0x60/0xe0 [188936.776458] [<c11ab1ed>] ? kfree+0x12d/0x140 [188936.776462] [<c116df00>] ? unregister_shrinker+0x40/0x50 [188936.776465] [<c11c6af1>] kill_anon_super+0x11/0x20 [188936.776475] [<f8a27f65>] btrfs_kill_super+0x15/0xf0 [btrfs] [188936.776479] [<c11c6c4d>] deactivate_locked_super+0x3d/0x70 [188936.776482] [<c11c70b7>] deactivate_super+0x57/0x60 [188936.776485] [<c11e1d49>] cleanup_mnt+0x39/0x90 [188936.776488] [<c11e1de0>] __cleanup_mnt+0x10/0x20 [188936.776491] [<c10822cf>] task_work_run+0x7f/0xa0 [188936.776495] [<c10035e5>] prepare_exit_to_usermode+0xf5/0x120 [188936.776498] [<c1003646>] syscall_return_slowpath+0x36/0x120 [188936.776501] [<c11e3365>] ? SyS_oldumount+0x75/0xb0 [188936.776506] [<c1743786>] syscall_exit_work+0x7/0xc [188936.776509] ---[ end trace dc3cf6814526c7c8 ]--- [188936.777408] ------------[ cut here ]------------ [188936.777426] WARNING: CPU: 3 PID: 623 at /home/kernel/COD/linux/fs/btrfs/inode.c:8968 btrfs_destroy_inode+0x298/0x2c0 [btrfs]() [188936.777427] Modules linked in: ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c nls_utf8 isofs pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) cuse ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables x_tables usblp snd_hda_codec_hdmi hp_wmi sparse_keymap snd_hda_codec_idt snd_hda_codec_generic intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp dm_multipath snd_hda_intel snd_hda_codec coretemp snd_hda_core kvm_intel radeon snd_hwdep hid_logitech_hidpp kvm snd_pcm i915 snd_seq_midi crc32_pclmul snd_seq_midi_event snd_rawmidi aesni_intel aes_i586 ttm xts snd_seq lrw drm_kms_helper snd_seq_device gf128mul snd_timer ablk_helper drm joydev cryptd bnep rfcomm snd input_leds i2c_algo_bit fb_sys_fops rtsx_pci_ms bluetooth serio_raw soundcore syscopyarea memstick sysfillrect sysimgblt hp_accel mei_me lis3lv02d lpc_ich wmi shpchp input_polldev mei video mac_hid nfsd auth_rpcgss nfs_acl parport_pc nfs ppdev lockd lp grace sunrpc parport fscache binfmt_misc hid_generic hid_logitech_dj usbhid hid btrfs xor uas usb_storage raid6_pq rtsx_pci_sdmmc ahci r8169 sdhci_pci psmouse libahci sdhci rtsx_pci mii fjes [188936.777502] CPU: 3 PID: 623 Comm: umount Tainted: G W OE 4.3.0-040300rc7-generic #201510260712 [188936.777504] Hardware name: Hewlett-Packard HP Pavilion dv6 Notebook PC/17FA, BIOS F.02 10/03/2011 [188936.777505] 00000000 00000000 e831dddc c13610e8 00000000 e831de0c c1068107 c1957804 [188936.777510] 00000003 0000026f f8ae5c34 00002308 f8a6e248 f8a6e248 d40395b4 00000002 [188936.777515] ea887800 e831de1c c10681e2 00000009 00000000 e831de4c f8a6e248 e831de38 [188936.777520] Call Trace: [188936.777524] [<c13610e8>] dump_stack+0x41/0x59 [188936.777527] [<c1068107>] warn_slowpath_common+0x87/0xc0 [188936.777542] [<f8a6e248>] ? btrfs_destroy_inode+0x298/0x2c0 [btrfs] [188936.777556] [<f8a6e248>] ? btrfs_destroy_inode+0x298/0x2c0 [btrfs] [188936.777559] [<c10681e2>] warn_slowpath_null+0x22/0x30 [188936.777572] [<f8a6e248>] btrfs_destroy_inode+0x298/0x2c0 [btrfs] [188936.777575] [<c1201fe8>] ? fsnotify_destroy_marks+0x58/0x70 [188936.777578] [<c11dd8df>] destroy_inode+0x2f/0x60 [188936.777581] [<c11dda0a>] evict+0xfa/0x170 [188936.777583] [<c11ddc23>] iput+0x153/0x1c0 [188936.777597] [<f8a44b64>] btrfs_put_block_group_cache+0x94/0xd0 [btrfs] [188936.777611] [<f8a569b1>] close_ctree+0x131/0x300 [btrfs] [188936.777614] [<c11ddab7>] ? dispose_list+0x37/0x50 [188936.777617] [<c11de769>] ? evict_inodes+0x139/0x150 [188936.777628] [<f8a27056>] btrfs_put_super+0x16/0x20 [btrfs] [188936.777631] [<c11c6850>] generic_shutdown_super+0x60/0xe0 [188936.777634] [<c11ab1ed>] ? kfree+0x12d/0x140 [188936.777637] [<c116df00>] ? unregister_shrinker+0x40/0x50 [188936.777640] [<c11c6af1>] kill_anon_super+0x11/0x20 [188936.777650] [<f8a27f65>] btrfs_kill_super+0x15/0xf0 [btrfs] [188936.777653] [<c11c6c4d>] deactivate_locked_super+0x3d/0x70 [188936.777656] [<c11c70b7>] deactivate_super+0x57/0x60 [188936.777659] [<c11e1d49>] cleanup_mnt+0x39/0x90 [188936.777662] [<c11e1de0>] __cleanup_mnt+0x10/0x20 [188936.777665] [<c10822cf>] task_work_run+0x7f/0xa0 [188936.777668] [<c10035e5>] prepare_exit_to_usermode+0xf5/0x120 [188936.777671] [<c1003646>] syscall_return_slowpath+0x36/0x120 [188936.777674] [<c11e3365>] ? SyS_oldumount+0x75/0xb0 [188936.777679] [<c1743786>] syscall_exit_work+0x7/0xc [188936.777682] ---[ end trace dc3cf6814526c7c9 ]--- [188939.222403] BTRFS info (device sdc1): disk space caching is enabled [189002.588577] BTRFS info (device sdc1): The free space cache file (2159324168192) is invalid. skip it [189002.588577]
