linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ENOSPC while creating snapshot
@ 2016-03-04 21:10 nexus
  2016-03-04 22:37 ` Chris Murphy
  2016-03-04 22:49 ` Roman Mamedov
  0 siblings, 2 replies; 9+ messages in thread
From: nexus @ 2016-03-04 21:10 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I'm encountering weird enospc problem while writing to filesystem and 
creating snapshot at a same time:

Steps to reproduce:

start writing data to filesystem:

# LC_ALL=C dd if=/dev/zero of=/foobar
dd: writing to '/foobar': No space left on device
3003803+0 records in
3003802+0 records out
1537946624 bytes (1.5 GB, 1.4 GiB) copied, 10.8072 s, 142 MB/s

in other terminal create read-only (or r/w - results are the same)
# btrfs sub snap -r / /.snap1
Create a readonly snapshot of '/' in '//.snap1'

while creating this snapshot, ENOSPC is produced.

Interesting is that I can reproduce this on some filesystems but not on 
others while all of available information are the same. There IS free 
space in data, metadata and global reserve.

I've tried balancing and defragmenting with no success. I've tried 
debugging by using enospc_debug but nothing is written to dmesg or any 
system log

Does anybody have a clue what may be the cause?

# uname -a
Linux interceptor 4.4.3-1-ARCH #1 SMP PREEMPT Fri Feb 26 15:09:29 CET 
2016 x86_64 GNU/Linux

# btrfs --version
btrfs-progs v4.4.1

# btrfs fi show
Label: none  uuid: 859dec5c-850c-4660-ad99-bc87456aa309
     Total devices 1 FS bytes used 116.72GiB
     devid    1 size 200.00GiB used 121.03GiB path 
/dev/mapper/vg0-btrfsroot

# btrfs fi df /
Data, single: total=117.00GiB, used=113.68GiB
System, single: total=32.00MiB, used=16.00KiB
Metadata, single: total=4.00GiB, used=3.04GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

# dmesg | tail
[   15.618995] cfg80211:  DFS Master region: ETSI
[   15.618996] cfg80211:   (start_freq - end_freq @ bandwidth), 
(max_antenna_gain, max_eirp), (dfs_cac_time)
[   15.618998] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), 
(N/A, 2000 mBm), (N/A)
[   15.619000] cfg80211:   (5150000 KHz - 5250000 KHz @ 80000 KHz, 
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[   15.619001] cfg80211:   (5250000 KHz - 5350000 KHz @ 80000 KHz, 
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   15.619002] cfg80211:   (5470000 KHz - 5725000 KHz @ 160000 KHz), 
(N/A, 2698 mBm), (0 s)
[   15.619003] cfg80211:   (57000000 KHz - 66000000 KHz @ 2160000 KHz), 
(N/A, 4000 mBm), (N/A)
[   15.792765] brcmsmac bcma0:1: brcms_ops_bss_info_changed: arp 
filtering: 1 addresses (implement)
[   20.411931] tun: Universal TUN/TAP device driver, 1.6
[   20.411938] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

# mount | grep root
/dev/mapper/vg0-btrfsroot on / type btrfs 
(rw,noatime,nodatasum,nodatacow,ssd,discard,space_cache,enospc_debug,commit=900,subvolid=5,subvol=/)

Thanks for any insight!

Best regards,

Martin Mlynar

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-05 12:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04 21:10 ENOSPC while creating snapshot nexus
2016-03-04 22:37 ` Chris Murphy
     [not found]   ` <CAJ88j0axsFA3HFc6Cr5o-dtYxLau_iDS2Mx2uVzKvF5HCe9F5Q@mail.gmail.com>
2016-03-05  2:46     ` Chris Murphy
2016-03-05  5:34       ` Duncan
2016-03-05 10:24         ` Martin Mlynář
2016-03-04 22:49 ` Roman Mamedov
2016-03-05  2:09   ` Duncan
2016-03-05 10:46     ` Filipe Manana
2016-03-05 12:29       ` Martin Mlynář

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).