I’m using a 1TB disk on Freenas 0.71 that I will divide into several partitions.
#unmount partitions created earlier
umount /dev/da1p1
umount /dev/da1p2
umount /dev/da1p3
# clean the disk
gpt destroy /dev/da1
# create a primary disk
gpt create /dev/da1
# Create the partitions.
# You need 2097152 sectors per GB(for standard disk/512 bytes per sector).
# i.e. for 120GB we do the math 2097152 * 120 = 251658240:
# Add first partition (da1p1) 500GB
gpt add -s 1048576000 /dev/da1
newfs -L DATA /dev/da1p1
# Add second partition (da1p2) 200GB
gpt add -s 419430400 /dev/da1
newfs -L BACKUP /dev/da1p2
# What’s left over is for the third partition (da1p3)
gpt add /dev/da1
newfs -L iSCSI /dev/da1p3
You can adjust and run this as a script.
Then go to the webgui and:
- add the disk
- mount the three partitions (I just used default settings)
Now you can:
- Create a SMB share on a partition
- Create a iSCSI target on a partition. This one needs more explanation:
– create a SMB share on the partition
– create an empty file (ie names iscsi)
– create a portal group and initiator group
– create an iSCSI extend that points to the file you created earlier
– create an iSCSI target
Leave a Reply