Changes

From Amahi Wiki
Jump to: navigation, search
110 bytes removed ,  02:02, 16 February 2012
no edit summary
Preliminary (manual) suport for [http://en.wikipedia.org/wiki/This is going to be the howto on how to install a ISCSI iSCSI] in server on F14 with Amahi 6.
From [http://forums.amahi.org/viewtopic.php?f=5&p=13885#p13885 this forums post].First of all the usual warnings
'''WARNINGDisclaimer: this page may have some items does not cover misuse, accident, lightning, flood, tornado, tsunami, volcanic eruption, earthquake, hurricanes, or other acts of God, neglect, damage from improper use, incorrect line voltage, unauthorized use, unauthorized repair, improper installation, typos, broken antenna or marred cabinet, missing or altered serial numbers, electromagnetic radiation from nuclear blasts, sonic boom vibrations, customer adjustments that are not covered in this list, and incidents owing to an airplane crash, ship sinking or taking on water, motor vehicle crashing, dropping the setup'''item, falling rocks, leaky roof, broken glass, disk failure, accidental file deletions, mud slides, forest fire, hitting of a deer, milk coming out of your nose due to laughing while drinking, or projectiles, which can include, but are not limited to, arrows, bullet shots, BBs, shrapnel, lasers, napalm, torpedoes, emissions of X-rays, Alpha, Beta and Gamma rays, knives, stones, etc.
= Server side =This disclaimer may not be copied or reproduced in any form
Set up an iSCSI server on without the Amahi box:expressed written consent of whoever I stole it from.
{{Code|root@host# yum install scsi-target-utils}}
Set up 1 Logical Volume (LV) now that will be exported as an iSCSI LUN. The below output shows my LV created for time machine (hence we have the name lvtime).legal stuff covered , let's get started
{{Code|root@host# lvs <nowiki>|</nowiki> grep timelvtime vg00 -wi-ao 500.00g}}Installing the ISCSI server
Export the LV: add it to /etc/tgt/targets.conf (note that there's a convention on how to export these!){{Code|<target iqn.2010-08.local.bonabo:galileo.lun1> backing-store /dev/vg00/lvtime</target>}}Log into your amahi box via ssh and become root
The name convention for iSCSI LUNs is usually as follows but a vendor can change it at will, it's a convention not a requirement.then install kernel headers and gcc
Below how the name comes together, the parts are connected by dots, the lun name is separated by a colon.yum install kernel-headers kernel-devel gcc
fixed data: iqn -> iqn<br>date now we going to download the LUN was created: year-month -> 2012-02<br>your domainname inverted: domain.your -> com.home<br>the LUN name: this is what the vendor usually provides -> lun1<br>install script i wrote
so that would make the following targetwget http:iqn//dl.2012-02dropbox.com/u/57179706/iscsi/install.home:lun1sh
Start the iSCSI target daemon and make sure it starts at boot time:then run sh ./install.sh
{{Code|root@host# service tgtd start; chkconfig tgtd this should have now installed the ISCSI server on}}your Amahi box
Check the exported LUN(s):Configuration and creation of an ISCSI disk image
{{Code|root@host# tgt-admin -s}}the easiest way to get an iscsi target is to create an image file
= Client side =we are doing this by typing :
''Linux'' mkdir /var/hda/files/iscsi dd if=/dev/zero of=/var/hda/files/iscsi/disk.img bs=1M count=0 seek=2560000
quick how-to for connecting to iSCSI storage (implies that iscsi-initiator-utils are installed!):scan for new LUNs:{{Code|root@host# iscsiadm -m discovery -t sendtargets -p <NAS IP>}}you can name the disk.img whatever you want and the numbers behind seek is the size of the image disk which in our case is 250 gigs
login and make the connection persistent{{Code|root@host# iscsiadm -m node -T iqnnow if we look in /var/hda/files/iscsi/ we will find a file called disk.2012-02.<domain>.<your>:<LUNname> -p <NAS IP> -l}}img
you should see a new device, you can partition it now{{Code|root@host# fdisk /dev/<new device>root@host# partprobe /dev/<new device>}}Configuring the ISCSI server to serve your disk image
Create LVM stuff if you want we have to, otherwise create edit the filesystem as you would normally doconfig file in /etc/iet/ietd.conf (use your favorite editor)
''Mac OSX'' I installed [http://www.studionetworksolutions.com/products/product_detail.php?pi=11 globalSAN iSCSI Initiator] for OS X by Studio Network Solutions (free community supported) iSCSI client for OS X) on Leave everything as it is exept at the Mac.bottom we add
I configured it to "see" the iSCSI lun (just type in the Target iqn IIRC); since it's presented to the OS as a normal .2012-02.com.domain:disk you need to partition the drive first (it's a blank disk as far as the Mac is concerned). Then configure Time Machine to use that disk and you're done!img
''Windows''Lun 0 Path=/var/hda/files/iscsi/disk.img,Type=fileio
I'll leave that to someone else.save and exit your editor  start/restart your ISCSI server  service iscsi-target restart done
21

edits