We have a small RAIDZ2 pool:
root@p1c3:/small/test/rs1m# zpool list small
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  
ALTROOT
small  2.92T  2.83T  93.5G        -         -     1%    96%  1.00x  ONLINE  -
root@p1c3:/small/test/rs1m# zfs list -r small
NAME              USED  AVAIL  REFER  MOUNTPOINT
small            1.89T  2.08M   176K  /small
small/test       1.89T  2.08M   176K  /small/test
small/test/rs1m  1.89T  2.08M  1.89T  /small/test/rs1m
root@p1c3:/small/test/rs1m# ls -l
total 2024208002
-rw-r--r-- 1 root root 104857600000 Jul 24 19:06 bigfile20180724-1904.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:07 bigfile20180724-1906.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:09 bigfile20180724-1907.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:11 bigfile20180724-1909.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:12 bigfile20180724-1911.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:14 bigfile20180724-1912.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:16 bigfile20180724-1914.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:26 bigfile20180724-1924.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:27 bigfile20180724-1926.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:29 bigfile20180724-1927.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:30 bigfile20180724-1929.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:32 bigfile20180724-1930.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:33 bigfile20180724-1932.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:35 bigfile20180724-1933.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:36 bigfile20180724-1935.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:38 bigfile20180724-1936.bin
-rw-r--r-- 1 root root  88570068992 Jul 24 19:40 bigfile20180724-1938.bin
-rw-r--r-- 1 root root 104855502848 Jul 24 20:23 bigfile20180724-2021.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 20:27 bigfile20180724-2025.bin
-rw-r--r-- 1 root root  98746499072 Jul 24 20:29 bigfile20180724-2027.bin

Let's delete first two files.
root@p1c3:/small/test/rs1m# rm -f bigfile20180724-1904.bin 
bigfile20180724-1906.bin
rm: cannot remove 'bigfile20180724-1906.bin': No space left on device
root@p1c3:/small/test/rs1m# ls -l
total 1921904852
-rw-r--r-- 1 root root 104857600000 Jul 24 19:07 bigfile20180724-1906.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:09 bigfile20180724-1907.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:11 bigfile20180724-1909.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:12 bigfile20180724-1911.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:14 bigfile20180724-1912.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:16 bigfile20180724-1914.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:26 bigfile20180724-1924.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:27 bigfile20180724-1926.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:29 bigfile20180724-1927.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:30 bigfile20180724-1929.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:32 bigfile20180724-1930.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:33 bigfile20180724-1932.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:35 bigfile20180724-1933.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:36 bigfile20180724-1935.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:38 bigfile20180724-1936.bin
-rw-r--r-- 1 root root  88570068992 Jul 24 19:40 bigfile20180724-1938.bin
-rw-r--r-- 1 root root 104855502848 Jul 24 20:23 bigfile20180724-2021.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 20:27 bigfile20180724-2025.bin
-rw-r--r-- 1 root root  98746499072 Jul 24 20:29 bigfile20180724-2027.bin

As we can see first file is deleted, but second gave us the error.
Let's delete it too:
root@p1c3:/small/test/rs1m# zfs list -r small
NAME              USED  AVAIL  REFER  MOUNTPOINT
small            1.79T  97.6G   176K  /small
small/test       1.79T  97.6G   176K  /small/test
small/test/rs1m  1.79T  97.6G  1.79T  /small/test/rs1m
root@p1c3:/small/test/rs1m# rm -f bigfile20180724-1906.bin
root@p1c3:/small/test/rs1m# ls -l
total 1819601703
-rw-r--r-- 1 root root 104857600000 Jul 24 19:09 bigfile20180724-1907.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:11 bigfile20180724-1909.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:12 bigfile20180724-1911.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:14 bigfile20180724-1912.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:16 bigfile20180724-1914.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:26 bigfile20180724-1924.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:27 bigfile20180724-1926.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:29 bigfile20180724-1927.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:30 bigfile20180724-1929.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:32 bigfile20180724-1930.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:33 bigfile20180724-1932.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:35 bigfile20180724-1933.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:36 bigfile20180724-1935.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 19:38 bigfile20180724-1936.bin
-rw-r--r-- 1 root root  88570068992 Jul 24 19:40 bigfile20180724-1938.bin
-rw-r--r-- 1 root root 104855502848 Jul 24 20:23 bigfile20180724-2021.bin
-rw-r--r-- 1 root root 104857600000 Jul 24 20:27 bigfile20180724-2025.bin
-rw-r--r-- 1 root root  98746499072 Jul 24 20:29 bigfile20180724-2027.bin
root@p1c3:/small/test/rs1m# zfs list -r small
NAME              USED  AVAIL  REFER  MOUNTPOINT
small            1.69T   195G   176K  /small
small/test       1.69T   195G   176K  /small/test
small/test/rs1m  1.69T   195G  1.69T  /small/test/rs1m

Well... the task is solved, but why we can't delete them in one command?

best regards,
-Igor


------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T28a23619d83ff457-Mb951eff8d356ff451ca1e7ae
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to