Friday, September 10, 2010

Quick HOWTO for making your own iSCSI host / SAN

I recommend a Gigabit or better network card on the system you're making into a storage host.

Procedure

1. Grab your favorite Linux: I actually did this with the 9-10-2010 version of Ubuntu from cdimage.ubuntu.com so I could try this on a BTRFS filesystem. The kernel does need to be one of the latest available.
2. sudo apt-get update && sudo apt-get install iscsitarget open-iscsi-utils
3. sudo nano /etc/default/iscitarget & change it to read ISCSITARGET_ENABLE=true
4. sudo /etc/init.d/iscsitarget restart
5. sudo rm /etc/iet/ietd.conf && sudo ln -s /etc/ietd.conf /etc/iet/ietd.conf
6. If you didn't set aside any drives for iSCSI use, you can make your own "file" drives with dd. Example: dd if=/dev/zero of=/testdrive count=10G bs=1
7. Install or run ietview as gksu: its a GTK Python interface for managing iSCSITarget.
8. After you create your iSCSI target, connect to it via Linux, Windows, or other OS. Newer operating systems can connect to it via IPv6 networks as well.

References

1. iSCSI on Wikipedia
2. dd on Wikipedia
3. iSCSITarget Homepage
4. Reddit thread

No comments:

Post a Comment