Allocating data

The following script creates a large number of files to demonstrate the benefit of allocating data:

 	i=1
 	while [ $i -lt 1000 ]
 	do
 	   	dd if=/dev/zero of=/mnt1/$i bs=65536 count=1
 	   	i='expr $i + 1'
 	done

Before the script completes, vol1 runs out of space even though space is still available on the vol2 volume:

	 # fsvoladm list /mnt1	
  devid   size					used			avail			name
	 0		     51200			 51200		0			    vol1
	 1		     51200			 221			 50979			vol2

The solution is to assign an allocation policy that allocates user data from the vol1 volume to vol2 if space runs out.

You must have system administrator privileges to create, remove, change policies, or set file system or Storage Checkpoint level policies. Users can assign a pre-existing policy to their files if the policy allows that.

Policies can be inherited for new files. A file will inherit the allocation policy of the directory in which it resides if you run the fsapadm assignfile -f inherit command on the directory.

Allocating data from vol1 to vol2