Monday, June 23, 2014

vmfs, iscsi and ubuntu 12 lts

 tiredmachine is an openfiler system. it is really really old.   
 i need to transfer the data held on its isci volumes to an ubuntu box.  
 it happens to be used to hold stuff from a large vmware instance.   
 and you know and i know that vmware formats filesystems as vmfs. of course it does.  
 1. ubuntu 11+ can mount vmfs volumes.  
 # apt-get install vmfs-tools  
 
2. as opposed to scping via a third party system, just mount the iscsi device.  
 # apt-get install open-iscsi  
 # iscsiadm -m discovery -t sendtargets -p 192.168.5.237:3260  
 192.168.0.137:3260,1 iqn.2006-01.com.openfiler:tsn.03324693a08d-tiredmachine-dev  
 192.168.1.137:3260,1 iqn.2006-01.com.openfiler:tsn.03324693a08d-tiredmachine-dev  
 10.97.137.137:3260,1 iqn.2006-01.com.openfiler:tsn.03324693a08d-tiredmachine-dev  
 192.168.5.137:3260,1 iqn.2006-01.com.openfiler:tsn.03324693a08d-tiredmachine-dev  

 3. mount  
 # cd /etc/iscsi  
 # ln -s iscsi.conf iqn.2006-01.com.openfiler:tsn.03324693a08d-tiredmachine-dev.iscsi  
 # iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.03324693a08d-tiredmachine-dev -p 192.168.5.137:3260 --login  
 # dmesg | grep sd  
 [16660848.292295] sd 4:0:0:0: Attached scsi generic sg3 type 0  
 [16660848.294926] sd 4:0:0:0: [sdd] 3725983744 512-byte logical blocks: (1.90 TB/1.73 TiB)  
 [16660848.295566] sd 4:0:0:0: [sdd] Write Protect is off  
 [16660848.295570] sd 4:0:0:0: [sdd] Mode Sense: 77 00 00 08  
 [16660848.295965] sd 4:0:0:0: [sdd] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA  
 [16660848.298281] sdd: sdd1  
 [16660848.300081] sd 4:0:0:0: [sdd] Attached SCSI disk  

 # vmfs-fuse /dev/sdd1 /opt/tiredbox/

No comments: