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,1,1,1,1  

 3. mount  
 # cd /etc/iscsi  
 # ln -s iscsi.conf  
 # iscsiadm -m node -T -p --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

 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):  


 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.     nis1 nis1.nisdomainname     nis2 nis2.nisdomainname  
 # domainname nisdomainname  
 # domainname > /etc/defaultdomain  
 # cat /etc/defaultdomain  
 # ypinit -c  
 Add the following hosts:  
 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   
 # ypcat hosts  
 # ypcat passwd  
 a scad of stuff  
 If you're using automounts:  
 # svcadm enable filesystem/autofs