Filled drive will not empty trash.

56 views
Skip to first unread message

Karel

unread,
Feb 4, 2013, 7:06:33 AM2/4/13
to zfs-...@googlegroups.com
I Accidently filled a mirrored pair of drives when I was rendering to that volume. There is 0 KB free on the drive.

Now I'm not able to delete any of the files on the drive. I get the message "The operation can’t be completed because the disk is full."

Anyone any idea of what to do? I don't have a spare disk laying around to make a copy, format and start all over...

Cheers,
K.

Lucien Pullen

unread,
Feb 4, 2013, 8:29:01 AM2/4/13
to zfs-...@googlegroups.com
Also sprach Karel at 2/4/13 6:06 AM:
> I Accidently filled a mirrored pair of drives when I was rendering to that volume. There is 0 KB free on the drive.
>
> Now I'm not able to delete any of the files on the drive. I get the message "The operation can�t be completed because the disk is full."
>
> Anyone any idea of what to do? I don't have a spare disk laying around to make a copy, format and start all over...

Do you have any snapshots you can delete? If you do, you can nuke as
many of those as necessary to free up space to resume "normal"
deleting. (If you have snapshots, those cause deletes to be
copy-on-write instead of just a normal delete, which means you need
enough space for a new directory entry as a duplicate minus the file
you are deleting. A few kilobytes really matter when you don't have
over a megabyte free!)

You could also try a rollback, but I've never tried that the couple
times I've accidentally filled up the pool.

Also, from the FreebSD mailing list[1]:

For the file you want to delete:

$ cat /dev/null >/file/to/delete

and then try deleting.

^1 <http://lists.freebsd.org/pipermail/freebsd-current/2008-January/082615.html>

Fastmail Jason

unread,
Feb 4, 2013, 8:32:37 AM2/4/13
to zfs-...@googlegroups.com
Yup, Lucien typed faster... For your next pool, quotas and reservations are you friend.


--
Jason Belec
Sent from my iPad

On 2013-02-04, at 8:29 AM, Lucien Pullen <drur...@gmail.com> wrote:

> Also sprach Karel at 2/4/13 6:06 AM:
>> I Accidently filled a mirrored pair of drives when I was rendering to that volume. There is 0 KB free on the drive.
>>
>> Now I'm not able to delete any of the files on the drive. I get the message "The operation can’t be completed because the disk is full."
>>
>> Anyone any idea of what to do? I don't have a spare disk laying around to make a copy, format and start all over...
>
> Do you have any snapshots you can delete? If you do, you can nuke as
> many of those as necessary to free up space to resume "normal"
> deleting. (If you have snapshots, those cause deletes to be
> copy-on-write instead of just a normal delete, which means you need
> enough space for a new directory entry as a duplicate minus the file
> you are deleting. A few kilobytes really matter when you don't have
> over a megabyte free!)
>
> You could also try a rollback, but I've never tried that the couple
> times I've accidentally filled up the pool.
>
> Also, from the FreebSD mailing list[1]:
>
> For the file you want to delete:
>
> $ cat /dev/null >/file/to/delete
>
> and then try deleting.
>
> ^1 <http://lists.freebsd.org/pipermail/freebsd-current/2008-January/082615.html>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "zfs-macos" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zfs-macos+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Lucien Pullen

unread,
Feb 4, 2013, 8:58:52 PM2/4/13
to zfs-...@googlegroups.com
Also sprach Fastmail Jason at 2/4/13 7:32 AM:
> Yup, Lucien typed faster... For your next pool, quotas and reservations are you friend.

I've got a quota on my pool (after accidentally filling it up... ...), but I'm not really understanding how that works. Is it that deletes aren't affected by quotas the same way?

Daniel Becker

unread,
Feb 4, 2013, 9:11:44 PM2/4/13
to zfs-...@googlegroups.com
They are; when you're over quota, you can't just delete files to drop back under quota either. However, if you have a quota in place, you (or your admin) can temporarily increase or disable the quota to allow you to delete files and free up space; in contrast, if you just fill up the entire pool instead, there is no way to temporarily add capacity, and you may not be able to recover.

Lucien Pullen

unread,
Feb 4, 2013, 9:23:07 PM2/4/13
to zfs-...@googlegroups.com
Also sprach Daniel Becker at 2/4/13 8:11 PM:
> They are; when you're over quota, you can't just delete files to drop back under quota either. However, if you have a quota in place, you (or your admin) can temporarily increase or disable the quota to allow you to delete files and free up space; in contrast, if you just fill up the entire pool instead, there is no way to temporarily add capacity, and you may not be able to recover.

Ahh, that makes sense. Keep forgetting you can just make /and/ remove quotas.

Karel

unread,
Feb 5, 2013, 7:18:05 AM2/5/13
to zfs-...@googlegroups.com
Thanks for the tip but I don't seem to have any snapshots. I do have an old usb drive laying around. Would it be possible to attach it to the pool temporarily  delete something and then remove it?

I have 2 drives in a mirror setup.

Cheers,
Karel.

Simon Casady

unread,
Feb 5, 2013, 8:23:54 AM2/5/13
to zfs-...@googlegroups.com
No, you can't ever shrink a pool.
Have you tried to truncate a file ? as in :
> file_to_delete

Fastmail Jason

unread,
Feb 5, 2013, 9:01:23 AM2/5/13
to zfs-...@googlegroups.com
You can also try overwriting the last few files if you know what they are with NULL to free up space.

cp -f /dev/null /pathToBigFile
Now rm the trash.

--
Jason Belec
Sent from my iPad

On 2013-02-05, at 8:23 AM, Simon Casady <capc...@gmail.com> wrote:

No, you can't ever shrink a pool.
Have you tried to truncate a file ? as in :
file_to_delete

On Tue, Feb 5, 2013 at 6:18 AM, Karel <kar...@gmail.com> wrote:
Thanks for the tip but I don't seem to have any snapshots. I do have an old
usb drive laying around. Would it be possible to attach it to the pool
temporarily  delete something and then remove it?

I have 2 drives in a mirror setup.

Cheers,
Karel.


On Monday, February 4, 2013 2:29:01 PM UTC+1, Lucien wrote:

Also sprach Karel at 2/4/13 6:06 AM:
I Accidently filled a mirrored pair of drives when I was rendering to
that volume. There is 0 KB free on the drive.

Now I'm not able to delete any of the files on the drive. I get the
message "The operation can�t be completed because the disk is full."

Karel D.C.

unread,
Feb 5, 2013, 10:51:16 AM2/5/13
to zfs-...@googlegroups.com
Thanks for the link that did the trick!

gmason@dev-intel07:~> ls -lah testfile1
-rw-r--r-- 1 gmason staff 16M 2009-03-23 10:44 testfile1
gmason@dev-intel07:~> > testfile1
gmason@dev-intel07:~> ls -lah testfile1
-rw-r--r-- 1 gmason staff 0 2009-03-23 11:41 testfile1
gmason@dev-intel07:~> rm testfile1
gmason@dev-intel07:~> ls -lah testfile1
/bin/ls: testfile1: No such file or directory





--



Warmoesstraat 90
1210 Brussels
Belgium
+1 347 265 89 68 (USA)
+32 486 424 715 (BE)




Daniel Becker

unread,
Feb 5, 2013, 10:52:06 AM2/5/13
to zfs-...@googlegroups.com, zfs-...@googlegroups.com
You can't remove a VDEV from a pool, so that won't work. Did you try truncating files as per Lucien's suggestion?

On Feb 5, 2013, at 4:18 AM, Karel <kar...@gmail.com> wrote:

Thanks for the tip but I don't seem to have any snapshots. I do have an old usb drive laying around. Would it be possible to attach it to the pool temporarily  delete something and then remove it?

I have 2 drives in a mirror setup.

Cheers,
Karel.

On Monday, February 4, 2013 2:29:01 PM UTC+1, Lucien wrote:
Also sprach Karel at 2/4/13 6:06 AM:
> I Accidently filled a mirrored pair of drives when I was rendering to that volume. There is 0 KB free on the drive.
>
> Now I'm not able to delete any of the files on the drive. I get the message "The operation can�t be completed because the disk is full."
>
> Anyone any idea of what to do? I don't have a spare disk laying around to make a copy, format and start all over...

Do you have any snapshots you can delete? If you do, you can nuke as
many of those as necessary to free up space to resume "normal"
deleting. (If you have snapshots, those cause deletes to be
copy-on-write instead of just a normal delete, which means you need
enough space for a new directory entry as a duplicate minus the file
you are deleting. A few kilobytes really matter when you don't have
over a megabyte free!)

You could also try a rollback, but I've never tried that the couple
times I've accidentally filled up the pool.

Also, from the FreebSD mailing list[1]:

For the file you want to delete:

  $ cat /dev/null >/file/to/delete

and then try deleting.

^1 <http://lists.freebsd.org/pipermail/freebsd-current/2008-January/082615.html>

--

Jason

unread,
Feb 5, 2013, 10:54:25 AM2/5/13
to zfs-...@googlegroups.com
Excellent news! Now build a new pool with better settings and migrate across. You'll be happier for it. ;)

Jason
Sent from my iPhone




--

<kareldc.jpg>


Warmoesstraat 90
1210 Brussels
Belgium
+1 347 265 89 68 (USA)
+32 486 424 715 (BE)



Daniel Becker

unread,
Feb 5, 2013, 10:55:04 AM2/5/13
to zfs-...@googlegroups.com, zfs-...@googlegroups.com
Note that this is effectively the same as truncating (/dev/null returns one NUL, unlike /dev/zero).

Jason

unread,
Feb 5, 2013, 12:20:39 PM2/5/13
to zfs-...@googlegroups.com
Yup. 


Jason
Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages