Bug 131081 - [zfs] User cannot delete a file when a ZFS dataset is full.
Summary: [zfs] User cannot delete a file when a ZFS dataset is full.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: K. Macy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-28 14:20 UTC by Victor Sudakov
Modified: 2009-05-18 05:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2009-01-28 14:20:01 UTC
When a user exceeds the disk quota configured for a dataset, the
dataset becomes unusable: the user cannot even delete her own files
from it to free some disk space.

Fix: 

A workaround: 
echo . > bigfile
This workaround is not helpful unless the user has shell access to the system.
How-To-Repeat: 
$ zfs list -o quota,mountpoint d01/home
QUOTA  MOUNTPOINT
   6G  /home
$ pwd
/home/sudakov
$ dd if=/dev/zero of=bigfile bs=1m
dd: bigfile: Disc quota exceeded
2869+0 records in
2868+1 records out
3007447040 bytes transferred in 88.749210 secs (33887029 bytes/sec)
$ rm bigfile 
rm: bigfile: Disc quota exceeded
$
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-01-28 15:37:54 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 K. Macy freebsd_committer freebsd_triage 2009-05-17 06:49:18 UTC
State Changed
From-To: open->feedback



1) do you have snapshots? 

2) could you try: http://svn.freebsd.org/base/user/kmacy/ZFS_MFC/ 


Comment 3 K. Macy freebsd_committer freebsd_triage 2009-05-17 06:49:18 UTC
Responsible Changed
From-To: freebsd-fs->kmacy



1) do you have snapshots? 

2) could you try: http://svn.freebsd.org/base/user/kmacy/ZFS_MFC/
Comment 4 Victor Sudakov 2009-05-17 12:50:36 UTC
kmacy@FreeBSD.org wrote:
> Synopsis: [zfs] User cannot delete a file when a ZFS dataset is full.
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: kmacy
> State-Changed-When: Sun May 17 05:49:18 UTC 2009
> State-Changed-Why: 
> 
> 
> 1) do you have snapshots?

No, I don't.

[sudakov@vas ~] zfs list
NAME        USED  AVAIL  REFER  MOUNTPOINT
d01        96,7G  9,57G   795K  /d01
d01/home   4,71G  3,29G  4,71G  /home
d01/media  90,4G  9,57G  90,4G  /msdos
d01/ports   895M  9,57G   895M  /usr/ports
d01/soft    764M  9,57G   764M  /usr/local
d01/swap     90K  9,57G    90K  -
[sudakov@vas ~] dd if=/dev/zero of=bigfile bs=1m
dd: bigfile: Disc quota exceeded
3369+0 records in
3368+1 records out
3532128256 bytes transferred in 115.604244 secs (30553621 bytes/sec)
[sudakov@vas ~] rm bigfile
rm: bigfile: Disc quota exceeded
[sudakov@vas ~] 

> 
> 2) could you try: http://svn.freebsd.org/base/user/kmacy/ZFS_MFC/

Excuse me, what should I do with this?

I could try a patch against 7.1-RELEASE if you give me one.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov@sibptus.tomsk.ru
Comment 5 K. Macy freebsd_committer freebsd_triage 2009-05-17 21:19:43 UTC
On Sun, May 17, 2009 at 4:50 AM, Victor Sudakov
<sudakov@sibptus.tomsk.ru> wrote:
> kmacy@FreeBSD.org wrote:
>> Synopsis: [zfs] User cannot delete a file when a ZFS dataset is full.
>>
>> State-Changed-From-To: open->feedback
>> State-Changed-By: kmacy
>> State-Changed-When: Sun May 17 05:49:18 UTC 2009
>> State-Changed-Why:
>>
>>
>> 1) do you have snapshots?
>
> No, I don't.
>
> [sudakov@vas ~] zfs list
> NAME =A0 =A0 =A0 =A0USED =A0AVAIL =A0REFER =A0MOUNTPOINT
> d01 =A0 =A0 =A0 =A096,7G =A09,57G =A0 795K =A0/d01
> d01/home =A0 4,71G =A03,29G =A04,71G =A0/home
> d01/media =A090,4G =A09,57G =A090,4G =A0/msdos
> d01/ports =A0 895M =A09,57G =A0 895M =A0/usr/ports
> d01/soft =A0 =A0764M =A09,57G =A0 764M =A0/usr/local
> d01/swap =A0 =A0 90K =A09,57G =A0 =A090K =A0-
> [sudakov@vas ~] dd if=3D/dev/zero of=3Dbigfile bs=3D1m
> dd: bigfile: Disc quota exceeded
> 3369+0 records in
> 3368+1 records out
> 3532128256 bytes transferred in 115.604244 secs (30553621 bytes/sec)
> [sudakov@vas ~] rm bigfile
> rm: bigfile: Disc quota exceeded
> [sudakov@vas ~]
>
>>
>> 2) could you try: http://svn.freebsd.org/base/user/kmacy/ZFS_MFC/
>
> Excuse me, what should I do with this?
>
> I could try a patch against 7.1-RELEASE if you give me one.

I don't envision a patch for 7.1-RELEASE. This is a MFC to 7-STABLE.
FWIW, I am not able to reproduce this in a VM.

-Kip
Comment 6 K. Macy freebsd_committer freebsd_triage 2009-05-17 21:45:55 UTC
State Changed
From-To: feedback->closed



ZFS v13 reserves enough space to delete files.
Comment 7 Victor Sudakov 2009-05-18 05:09:11 UTC
Kip Macy wrote:
> FWIW, I am not able to reproduce this in a VM.

I hope you were not working as root. 
I also cannot reproduce the problem when trying as root. The problem
can be reproduced only under an ordinary user.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov@sibptus.tomsk.ru
Comment 8 K. Macy freebsd_committer freebsd_triage 2009-05-18 05:13:10 UTC
No. What happens now is that the dd just becomes infinitely slow and
never quite fills up the pool.

-Kip

On Sun, May 17, 2009 at 9:09 PM, Victor Sudakov
<sudakov@sibptus.tomsk.ru> wrote:
> Kip Macy wrote:
>> FWIW, I am not able to reproduce this in a VM.
>
> I hope you were not working as root.
> I also cannot reproduce the problem when trying as root. The problem
> can be reproduced only under an ordinary user.
>
> --
> Victor Sudakov, =A0VAS4-RIPE, VAS47-RIPN
> sip:sudakov@sibptus.tomsk.ru
>



--=20
When bad men combine, the good must associate; else they will fall one
by one, an unpitied sacrifice in a contemptible struggle.

    Edmund Burke