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/

Thursday, June 5, 2014

find & cpio for sol10 zone backup

sigh.
 flararch is not a friend of solaris zones. what to use?  
 cpio, of course. but let's just forget those mounted local filesystems and yeah,   
 those shared local libraries would be evil, too.  
 # zoneadm list -civ |grep myzone  
 2 myzone     running  /export/zones/myzone     solaris8 shared  
 # zlogin -S myzone init 5 (physical power-off)  
 # find export/zones/myzone -fstype lofs -prune -o -local | cpio -oc -O /flar.arch/myzone.cpio  
 10958208 blocks  
 # ls -l flar.arch/myzone.cpio  
 -rwxr-xr-x  1 root   root   5610602496 Jun 5 09:52 flar.arch/myzone.cpio  
 5.5G yeah. that's about right.  

Wednesday, June 4, 2014

i spent my afternoon doing nothing

not really.

 ian [15:24] if you're doing sol10sparc installs, please make sure this is in your /etc/default/init file (please):  

 TZ=US/Eastern  
 CMASK=022  
 LANG=en_US.UTF-8  

 ian [15:24]   and make sure these packages have been installed:  
 ian [15:24]   SUNWi1cs SUNWi15cs SUNWnamos SUNWeuluf  
 
 ian [15:24]    if you run this: /usr/sbin/pkgchk SUNWi1cs  

 ian [15:24]   it should come up with NOTHING  

 ian [15:25]   and that's been my afternoon.  

 ian [15:25]   making nothing happen. :grinning:  

solaris 10 nis client

it never ends, does it?
 solaris 10 nis domain client  
 Add a client to the new NIS domain  
 /etc/hosts to include entries for the NIS master and all slaves.  
 10.10.10.1     nis1 nis1.nisdomainname  
 10.10.10.2     nis2 nis2.nisdomainname  
 # domainname nisdomainname  
 # domainname > /etc/defaultdomain  
 # cat /etc/defaultdomain  
 nisdomainname  
 # ypinit -c  
 Add the following hosts:  
 nis_master  
 nis_slave  
 nis_other_slave  
 nis_master-a   (other interface, if available)  
 nis_slave-a   (other interface, if available)  
 nis_other_slave-a   (other interface, if available)  
 Edit nsswitch.nis and copt it over to nsswitch.conf  

* nb: when doing ypinit, the hostname is the NAME not the IP address
  in /etc/hosts oh yes.
 ..............  
 # /etc/nsswitch.nis:  
 passwd:   files nis  
 group:   files nis  
 # consult /etc "files" only if nis is down.   
 hosts:   files dns nis  
 ipnodes:  files  
 networks:  files nis  
 protocols: files nis  
 rpc:    files nis  
 ethers:   files nis  
 netmasks:  files nis    
 bootparams: files nis   
 publickey: files nis  
 netgroup:  nis  
 automount: nis files  
 aliases:  files nis  
 # for efficient getservbyname() avoid nis  
 services:  files nis  
 sendmailvars:  files  
 printers:    user files nis  
 auth_attr: files nis  
 prof_attr: files nis  
 project:  files nis  
 ..............  
 # cp nsswitch.conf nsswitch.conf.orig ; mv nsswitch.nis nsswitch.conf  
 # /etc/init.d/nscd stop ; /etc/init.d/nscd start  
 Start NIS  
 # svcadm enable nis/client  
 # ypwhich   
 nis_master  
 # ypcat hosts  
 # ypcat passwd  
 a scad of stuff  
 If you're using automounts:  
 # svcadm enable filesystem/autofs