Network Storage Server
Freenas 8 is open source storage OS base on freebsd that could be used to build network storage server for home, small business or other according our need. You can see on my previous blog about how to make installation and configuration freenas 8, it’s easy integrated freenas with another operating system for example windows file sharing(CIFS). Why freenas? The simple answer is cheap, power full, easy to configure.
One of features freenas is support SAN/NAS that would make possible for us to build network storage server base on iSCSI the freenas, further more with the iSCSI freenas we could share storage block on the freenas to linux or windows. Assume we have ready freenas installation, next step to build network storage server is make sure iSCSI services have active, then make configuration iSCSI freenas like below :
Login freenas server http://ip_freenas_server/ after that go to services then make sure iSCSI ON then click setting (on the righ)
iSCSI Freenas Activation
iSCI Freenas Setting
iSCI Freenas setting panel consists of Target Configuration, Targets, Device Extents, Extents, Associated Targets, Authentication, Authorized Initiator and Portal. Just as note this tutorial for newbies, ok.
Next step: from Target Global Configuration I just do change Base Name on the last line for example iqn.2012-03.xxx.xxx after that click Portals then add portal don’t make change except Comment then you will get group id, next step click Authentication and add iSCSI User (fill according you need), next step Authorized Initiator then Add Authorized Initiator on this step just fill Comment, after that go to Targets and Add Target, fill Target Name: isq-xx, Target Alias : name_target_alias, Type : Disk, Target Flags: read-write, Portal Group ID: 1, Initiator Group ID: 1 then OK. Next step click Extents and then Add Extents fill all according your name and storage location and block storage size that want to be share as network storage, after that click Associated Targets then choose drop down (Target and Extent: according that we have build before). For your note: you can do more advance configuration to get more secure and high performance.
Integration Network Storage Freenas to Centos 5
Installation iSCSI on centos can be done with yum or rpm package, if you are using yum can do done with command :
Centos5# yum install iscsi-initiator-utils
If using my configuration you don’t need to make configuration on the iscsid.conf,if needed you just add following line on the iscsi.conf (#vi /etc/iscsi/iscsid.conf
)
node.session.auth.username = your_user
node.session.auth.password = your_auth_password
discovery.sendtargets.auth.username = your_user
discovery.sendtargets.auth.password = your_auth_password
after that start iSCSI on centos
Centos5# /etc/init.d/isci start
After iSCSI installed and configured just discovery direct to ip network storage freenas
Centos5#iscsiadm -m discovery -t sendtargets -p (ip_freenas)
Note: if you have iscsi on the linux and iSCSI service running you can following command :
Centos5# iscsiadm -m discovery -t sendtargets -p ip_freenas -l
With command above we can discovered without restarting the iSCSI (network storage server) then check log to make sure your freenas network storage have been detected :
#tail –f /var/log/message
#fdisk –l
Then after that make partition you can use fdisk to make partition on the centos
#fdisk /dev/sdd
Command help centos: press m
Then make disk primary
Then format the storage partition
After all finished, now we should mounting it
# mkdir /Network_Storage_directory
#mount /dev/sdd1 / Network_Storage_directory
Network Storage Freenas Conclusion
On the tutorial above just base of how to build network storage server base on iSCSI Freenas and integrated to centos, you can do more configuration to get the best performance and security of network storage server. And for deep knowladge of the freenas can be found on the network storage documentation.