Hello,
A customer recently brought to my attention that ZFS can get
into a situation where the filesystem is full but no files
can be removed. The workaround is to remove a snapshot and
then you should have enough free space to remove a file.
Here is a sample series of commands to reproduce the
problem.
# mkfile 1g /tmp/disk.raw
# zpool create -f zFullPool /tmp/disk2.raw
# sz=`df -k /zFullPool | awk '{ print $2 }' | tail -1`
# mkfile $((${sz}-1024))k /zFullPool/f1
# zfs snapshot [EMAIL PROTECTED]
# sz=`df -k /zFullPool | awk '{ print $2 }' | tail -1`
# mkfile ${sz}k /zFullPool/f2
/zFullPool/f2: initialized 401408 of 1031798784 bytes: No space left on
device
# df -k /zFullPool
Filesystem kbytes used avail capacity Mounted on
zFullPool 1007659 1007403 0 100% /zFullPool
# rm -f /zFullPool/f1
# ls -al /zFullPool
total 2014797
drwxr-xr-x 2 root sys 4 Jun 4 12:15 .
drwxr-xr-x 31 root root 18432 Jun 4 12:14 ..
-rw------T 1 root root 1030750208 Jun 4 12:15 f1
-rw------- 1 root root 1031798784 Jun 4 12:15 f2
# rm -f /zFullPool/f2
# ls -al /zFullPool
total 2014797
drwxr-xr-x 2 root sys 4 Jun 4 12:15 .
drwxr-xr-x 31 root root 18432 Jun 4 12:14 ..
-rw------T 1 root root 1030750208 Jun 4 12:15 f1
-rw------- 1 root root 1031798784 Jun 4 12:15 f2
At this point, the only way in which I can free up sufficient
space to remove either file is to first remove the snapshot.
# zfs destroy [EMAIL PROTECTED]
# rm -f /zFullPool/f1
# ls -al /zFullPool
total 1332
drwxr-xr-x 2 root sys 3 Jun 4 12:17 .
drwxr-xr-x 31 root root 18432 Jun 4 12:14 ..
-rw------- 1 root root 1031798784 Jun 4 12:15 f2
Is there an existing bug on this that is going to address
enabling the removal of a file without the pre-requisite
removal of a snapshot?
Thanks in advance,
Brad
--
---------------------------------------------------------------------
_/_/_/ _/ _/ _/ _/ Brad Diggs
_/ _/ _/ _/_/ _/ Communications Area Market
_/_/_/ _/ _/ _/ _/ _/ Senior Directory Architect
_/ _/ _/ _/ _/_/
_/_/_/ _/_/_/ _/ _/ Office: 972-992-0002
E-Mail: [EMAIL PROTECTED]
M I C R O S Y S T E M S
_______________________________________________
zfs-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss