Change multiple dataset quota size ZFS
2 min read

Change multiple dataset quota size ZFS

If you are using TrueNAS UI, it'll take long time to edit dataset quota size for multiple dataset.

Instead using TrueNAS UI, you can done that by using CLI. Here is the solution.

$ zfs set quota=$value $datasetname1 $datasetname2 $datasetname3
$ zfs get quota nas_jkt2/cp_b1 nas_jkt2/cp_c1 nas_jkt2/cp_c1 nas_jkt2/cp_c3 nas_jkt2/cp_d1 nas_jkt2/cp_d2 nas_jkt2/cp_e1 nas_jkt2/cp_f1 nas_jkt2/cp_f2 nas_jkt2/cp_f3 nas_jkt2/cp_f4 nas_jkt2/cp_l1 nas_jkt2/cp_l2 nas_jkt2/cp_l3 nas_jkt2/cp_m1 nas_jkt2/cp_m2 nas_jkt2/cp_m3 nas_jkt2/cp_m4 nas_jkt2/cp_n1 nas_jkt2/cp_p1 nas_jkt2/cp_r1 nas_jkt2/cp_r2 nas_jkt2/cp_s1 nas_jkt2/cp_s2 nas_jkt2/cp_t1 nas_jkt2/cp_t2 nas_jkt2/cp_w1 nas_jkt2/cp_z1 nas_jkt2/cp_z2
NAME                        PROPERTY  VALUE  SOURCE
nas_jkt2/cp_b1     quota     1T     local
nas_jkt2/cp_c1     quota     1T     local
nas_jkt2/cp_c2     quota     1T     local
nas_jkt2/cp_c3     quota     1T     local
nas_jkt2/cp_d1     quota     1T     local
nas_jkt2/cp_d2     quota     1T     local
nas_jkt2/cp_e1     quota     1T     local
nas_jkt2/cp_f1     quota     1T     local
nas_jkt2/cp_f2     quota     1T     local
nas_jkt2/cp_f3     quota     1T     local
nas_jkt2/cp_f4     quota     1T     local
nas_jkt2/cp_l1     quota     1T     local
nas_jkt2/cp_l2     quota     1T     local
nas_jkt2/cp_l3     quota     1T     local
nas_jkt2/cp_m1     quota     1T     local
nas_jkt2/cp_m2     quota     1T     local
nas_jkt2/cp_m3     quota     1T     local
nas_jkt2/cp_m4     quota     1T     local
nas_jkt2/cp_n1     quota     1T     local
nas_jkt2/cp_p1     quota     1T     local
nas_jkt2/cp_r1     quota     1T     local
nas_jkt2/cp_r2     quota     1T     local
nas_jkt2/cp_s1     quota     1T     local
nas_jkt2/cp_s1     quota     1T     local
nas_jkt2/cp_t1     quota     1T     local
nas_jkt2/cp_t2     quota     1T     local
nas_jkt2/cp_w1     quota     1T     local
nas_jkt2/cp_z1     quota     1T     local
nas_jkt2/cp_z2     quota     1T     local

$ zfs set quota=1.5T nas_jkt2/cp_b1 nas_jkt2/cp_c1 nas_jkt2/cp_c1 nas_jkt2/cp_c3 nas_jkt2/cp_d1 nas_jkt2/cp_d2 nas_jkt2/cp_e1 nas_jkt2/cp_f1 nas_jkt2/cp_f2 nas_jkt2/cp_f3 nas_jkt2/cp_f4 nas_jkt2/cp_l1 nas_jkt2/cp_l2 nas_jkt2/cp_l3 nas_jkt2/cp_m1 nas_jkt2/cp_m2 nas_jkt2/cp_m3 nas_jkt2/cp_m4 nas_jkt2/cp_n1 nas_jkt2/cp_p1 nas_jkt2/cp_r1 nas_jkt2/cp_r2 nas_jkt2/cp_s1 nas_jkt2/cp_s2 nas_jkt2/cp_t1 nas_jkt2/cp_t2 nas_jkt2/cp_w1 nas_jkt2/cp_z1 nas_jkt2/cp_z2

$ zfs get quota nas_jkt2/cp_b1 nas_jkt2/cp_c1 nas_jkt2/cp_c1 nas_jkt2/cp_c3 nas_jkt2/cp_d1 nas_jkt2/cp_d2 nas_jkt2/cp_e1 nas_jkt2/cp_f1 nas_jkt2/cp_f2 nas_jkt2/cp_f3 nas_jkt2/cp_f4 nas_jkt2/cp_l1 nas_jkt2/cp_l2 nas_jkt2/cp_l3 nas_jkt2/cp_m1 nas_jkt2/cp_m2 nas_jkt2/cp_m3 nas_jkt2/cp_m4 nas_jkt2/cp_n1 nas_jkt2/cp_p1 nas_jkt2/cp_r1 nas_jkt2/cp_r2 nas_jkt2/cp_s1 nas_jkt2/cp_s2 nas_jkt2/cp_t1 nas_jkt2/cp_t2 nas_jkt2/cp_w1 nas_jkt2/cp_z1 nas_jkt2/cp_z2
NAME                        PROPERTY  VALUE  SOURCE
nas_jkt2/cp_b1     quota     1.50T     local
nas_jkt2/cp_c1     quota     1.50T     local
nas_jkt2/cp_c2     quota     1.50T     local
nas_jkt2/cp_c3     quota     1.50T     local
nas_jkt2/cp_d1     quota     1.50T     local
nas_jkt2/cp_d2     quota     1.50T     local
nas_jkt2/cp_e1     quota     1.50T     local
nas_jkt2/cp_f1     quota     1.50T     local
nas_jkt2/cp_f2     quota     1.50T     local
nas_jkt2/cp_f3     quota     1.50T     local
nas_jkt2/cp_f4     quota     1.50T     local
nas_jkt2/cp_l1     quota     1.50T     local
nas_jkt2/cp_l2     quota     1.50T     local
nas_jkt2/cp_l3     quota     1.50T     local
nas_jkt2/cp_m1     quota     1.50T     local
nas_jkt2/cp_m2     quota     1.50T     local
nas_jkt2/cp_m3     quota     1.50T     local
nas_jkt2/cp_m4     quota     1.50T     local
nas_jkt2/cp_n1     quota     1.50T     local
nas_jkt2/cp_p1     quota     1.50T     local
nas_jkt2/cp_r1     quota     1.50T     local
nas_jkt2/cp_r2     quota     1.50T     local
nas_jkt2/cp_s1     quota     1.50T     local
nas_jkt2/cp_s1     quota     1.50T     local
nas_jkt2/cp_t1     quota     1.50T     local
nas_jkt2/cp_t2     quota     1.50T     local
nas_jkt2/cp_w1     quota     1.50T     local
nas_jkt2/cp_z1     quota     1.50T     local
nas_jkt2/cp_z2     quota     1.50T     local