Create files to introduce with ZFS

Hello,

To learn ZFS, i try to create pool .
and for that i want create 10 files with 512MB (because i dont have multiple disks and multiple controllers)

ADMIT THAT THIS IS TEN HIGH-PERFORMANCE HARD DRIVES

To get this 10 files,all of them have the same size : 512MB,

I do these commands :

$ mkdir test_zfs
 $ cd test_zfs
 $ for i in $(seq 0 9); \
 >do dd if=/dev/zero of=./disque_$i bs=1M count=512; \
 >done;

But that gives me an error!
Someone can tell me pls why dont wokr on SOLARIS 10?

i can easily create create 10 files with 512MB on other linux (debian,ubuntu..)

Please help me!

man mkfile

i need to know why it doesnt worked in solaris 10?

---------- Post updated at 05:15 PM ---------- Previous update was at 05:03 PM ----------

what should i do with mkfile?

$mkfile 500m disc1
$mkfile 500m disc2
.
.
.
any scrypt pls?

Thank you

for i in (0 1 2 3 4 5 6 7 8 9)
do mkfile 500m disc$i
done

(not tested!)

This should be better:

for i in 0 1 2 3 4 5 6 7 8 9
do mkfile 500m disc$i
done
1 Like

'seq' does not exist in Solaris.

This url may help. Chi Hung Chan: ZFS on 48 Disks without X4500

1 Like

thanks chihung,

your URL is really helpful for me!

thanks to everybody!

---------- Post updated at 09:25 AM ---------- Previous update was at 06:07 AM ----------

i've a real problem!!

when i do :

#for i in c{0,1,2,3,4,5}t{0,1,2,3,4,5,6,7}d0

>do

 > mkfile 100m $i 
>done

i received this result :

#ls /test_zfs
c{0,1,2,3,4,5}t{0,1,2,3,4,5,6,7}d0

Any help please?
i need to get rather like this :
c0t0d0 c0t1d0...................

try to use another shell like bash or ksh. the standard shell (sh) might not understand { and }.

1 Like

You shouldn't use /bin/sh on Solaris 10 and older. Anyway, here is a portable workaround:

for c in 0 1 2 3 4 5
do
  for t in 0 1 2 3 4 5 6 7
  do
    mkfile 100m c${c}t${d}d0 
  done
done
1 Like

Thanks jlliagre,

You are right!! sh dont recognize {}