Posts

windows 2012 - dedup

If you have some archive data that you would like to copy onto a  win 2012 server, but dont know how to estimate the end volume size (if VM etc). Start small - about 1/2 of the total capacity of the drive. Robocopy the data onto the drive until nearly full, manually run dedupe, wait until complete, continue robocopy, repeat and rinse. There will be occasions where you will run out of disk space at that point its time to extend your disk.

Equallogic - 6.0 Feature List

http://www.dell.com/learn/us/en/04/campaigns/equallogic-software

Features introduced in release 6.0:

• Synchronous Replication • Snapshot Space Borrowing • Volume Unmap • Volume Undelete • Support for SED drives and IPsec

Features you have come to rely on:

• Data Center Bridging • Automatic load balancing • VMware® Thin Provisioning awareness • Auditing of administrative actions • Microsoft® Active Directory integration • Peer storage architecture • Rapid provisioning • Storage pools • Roles-based administration • Thin clones • SAN Data Copy Offload • SAN Zero Offload and Scalable Lock Management for VMware • Intelligent tiering of data across models that combine solid-state drive (SSD) and hard drives • Integration with the VMware® vStorage APIs • Nondisruptive array upgrades • Nondisruptive array removal • Online data and volume movement • Automatic RAID placement • Thin provisioning • Instant volume restore • Multivolume, writable snapshots • Snapshot and point-in-time replication scheduler • Volume cloning • Volume consistency sets • Auto-start disk monitoring system • Email home • Enclosure monitoring system • Performance monitoring

use nmap to port scan / find free IPS

I use angry IP scanner in windows, linux has a good util for port scanning an ip range called nmap;

Grab nmap from usual repositories

sudo nmap -sP 192.168.9.0/24 (will show hosts up and resolve mac addresses to vendors)

sudo nmap -v -sT 192.168.9.0/24 (will show hosts up and the various open ports)

sudo nmap -v -sT 192.168.9.104 (will show particular host and the various open ports)

Starting Nmap 6.00 ( http://nmap.org ) at 2013-07-12 11:48 NZST Initiating ARP Ping Scan at 11:48 Scanning 192.168.9.104 [1 port] Completed ARP Ping Scan at 11:48, 0.00s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 11:48 Completed Parallel DNS resolution of 1 host. at 11:48, 0.00s elapsed Initiating Connect Scan at 11:48 Scanning win2012-veeam.fritz.box (192.168.9.104) [1000 ports] Discovered open port 111/tcp on 192.168.9.104 Discovered open port 445/tcp on 192.168.9.104 Discovered open port 3389/tcp on 192.168.9.104 Discovered open port 135/tcp on 192.168.9.104 Discovered open port 139/tcp on 192.168.9.104 Discovered open port 49155/tcp on 192.168.9.104 Discovered open port 1063/tcp on 192.168.9.104 Discovered open port 2049/tcp on 192.168.9.104 Discovered open port 3260/tcp on 192.168.9.104 Completed Connect Scan at 11:48, 4.21s elapsed (1000 total ports) Nmap scan report for win2012-veeam.fritz.box (192.168.9.104) Host is up (0.00059s latency). Not shown: 991 filtered ports PORT STATE SERVICE 111/tcp open rpcbind 135/tcp open msrpc 139/tcp open netbios-ssn 445/tcp open microsoft-ds 1063/tcp open kyoceranetdev 2049/tcp open nfs 3260/tcp open iscsi 3389/tcp open ms-wbt-server 49155/tcp open unknown MAC Address: 00:50:56:9C:68:FA (VMware)

nsswitch.conf SMF config

# svccfg svc:> select dns/client svc:/network/dns/client> setprop config/search = astring: \ (“us.company.com” “eu.company.com” “companya.com” “companyb.com” “company.com” ) svc:/network/dns/client> setprop config/nameserver = net_address: \ ( 138.2.202.15 138.2.202.25 ) svc:/network/dns/client> select dns/client:default svc:/network/dns/client:default> refresh svc:/network/dns/client:default> validate svc:/network/dns/client:default> select name-service/switch svc:/system/name-service/switch> setprop config/host = astring: “files dns” svc:/system/name-service/switch> select system/name-service/switch:default svc:/system/name-service/switch:default> refresh svc:/system/name-service/switch:default> validate svc:/system/name-service/switch:default> # svcadm enable dns/client # svcadm refresh name-service/switch # grep host /etc/nsswitch.conf hosts: files dns # cat /etc/resolv.conf # # opyright (c) 2011, Oracle and/or its affiliates. All rights reserved. #

powershell - move machine types to certain OUs in active directory

-------------- select additional parameters ----------------------

Get-ADComputer -Filter * -Properties ipv4Address, OperatingSystem, OperatingSystemServicePack | Format-table name, ipv4*, operatingsystem

-------------- move script -----------------

[cmdletbinding()]

param ( [parameter(mandatory=$true)] $TargetOU )

Import-Module ActiveDirectory $Domain = [ADSI]"" $DN=$domain.distinguishedName $SourcePath = "CN=Computers," + $DN $Computers = Get-ADComputer -Filter * -SearchBase $SourcePath if(!$Computers) { write-host "No Computers are found in default container" return } foreach ($Computer in $Computers) { if(!(Move-ADObject $Computer -TargetPath $TargetOU)) { $Status = "SUCCESS" } else { $Status = "FAILED" } $OutputObj = New-Object -TypeName PSobject $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer.Name.tostring() $OutputObj | Add-Member -MemberType NoteProperty -Name SourcePath -Value $SourcePath $OutputObj | Add-Member -MemberType NoteProperty -Name DestinationPath -Value $TargetOU $OutputObj | Add-Member -MemberType NoteProperty -Name Status -Value $Status $OutputObj }

zfs share for Time machine backups

I’ve tried using a share for time machine before, but due to the nature of how time machine works it eventually consumed all the spare space that is available on that particular share.

bring on zfs quotas… (my drive on my mini mac is 100GB, so 200GB should be enough for a few variations)

zfs set quota=200G unprotected/timemachine

This adds a artificial limit to your zfs filesystem, making sure that time machine does not consume more than 200 gigabytes of space.

Why is UNRAID cool for home?

I’ve played with many storage technologies at home, ZFS being one of my favs when it comes to performance. But i’ve been looking for something that suits a typical home environment where power usage and capacity is usually more important than performance. Thats where UNRAID has come in…

UNRAID give me these advantages;

  • Different sized disks in a single pool (only requires largest disk as parity)
  • Files are distributed over all the disks - so even if you lost more than a single drive you still still have some of your data. Note : with parity drive you can handle a single drive failing without loosing anything, sorta like RAID4 - non distributed parity.
  • Power usage, since the files are stored on specific disks not all the disks need to power on to give you your file.
  • Runs on a USB stick - no large operating system required.
  • Crashplan module can be installed to provide backup options.

http://lime-technology.com/

nested hypervisor (on ESXi 5.1)

Sometimes you might want to run a hypervisor on a hypervisor for testing purposes…. this is how you pass through the required CPU extensions in ESXi 5.1

Remember you will also need to enable promiscuous mode on the networking side also.

http://www.virtuallyghetto.com/2012/08/how-to-enable-nested-esxi-other.html

There are some changes with Nested Virtualization in vSphere 5.1 also officially known as VHV (Virtual Hardware-Assisted Virtualization). If you are using vSphere 5.0 to run Nested ESXi or other nested Hypervisors, then please take a look at the instructions in this article. With vSphere 5.1, there have been a few minor changes to enable VHV.

  1. The new Virtual Hardware 9 compatibility will be required when creating your nested ESXi VM, Virtual Hardware 8 will not work if you are running ESXi 5.1 on your physical host. You will still need to enable promiscuous mode on the portgroup that will be used for your nested ESXi VM for network connectivity.
  2. vhv.allow = “true” is no longer valid for ESXi 5.1 to enable VHV. A new parameter has been introduced called vhv.enable = “true” that is now defined on a per VM basis to provide finer granularity of VHV support. This also allows for better portability between VMware’s hosted products such as VMware Fusion and Workstation as they also support the vhv.enable parameter.
  3. You can now enable VHV on a per VM basis and using the new vSphere Web Client which basically adds the vhv.enable = “true” parameter to the VM’s .VMX configuration file.

HP Gen 8 servers and networking issues - TG3 driver

There is a bug in the tg3 driver on the ESXi hosts (1gbit broadcom cards in the new hosts). If the network card is put under load and netqueue is enabled it will sometimes decide to drop all traffic. Essentially i’ve disabled netqueue and the problems have gone away…. as per this vm kb :

http://kb.vmware.com/kb/2035701

The isues will present themselves as log entires like so;

2012-11-19T18:58:52.137Z cpu17:4155)<6>tg3 : vmnic8: RX NetQ allocated on 1 2012-11-19T18:58:52.138Z cpu17:4155)<6>tg3 : vmnic8: NetQ set RX Filter: 1 [00:50:56:71:46:87 0] 2012-11-19T18:58:52.138Z cpu17:4155)<6>tg3 : vmnic7: RX NetQ allocated on 1 2012-11-19T18:58:52.138Z cpu17:4155)<6>tg3 : vmnic7: NetQ set RX Filter: 1 [00:50:56:71:46:87 0] 2012-11-19T18:59:12.139Z cpu21:4155)<6>tg3 : vmnic4: NetQ remove RX filter: 1 2012-11-19T18:59:12.139Z cpu21:4155)<6>tg3 : vmnic4: Free NetQ RX Queue: 1 2012-11-19T18:59:22.137Z cpu24:4155)<6>tg3 : vmnic4: RX NetQ allocated on 1 2012-11-19T18:59:22.138Z cpu24:4155)<6>tg3 : vmnic4: NetQ set RX Filter: 1 [00:50:56:71:46:87 0] 2012-11-19T18:59:42.138Z cpu21:4155)<6>tg3 : vmnic7: NetQ remove RX filter: 1 2012-11-19T18:59:42.138Z cpu21:4155)<6>tg3 : vmnic7: Free NetQ RX Queue: 1 2012-11-19T18:59:42.140Z cpu21:4155)<6>tg3 : vmnic4: NetQ remove RX filter: 1 2012-11-19T18:59:42.140Z cpu21:4155)<6>tg3 : vmnic4: Free NetQ RX Queue: 1 2012-11-19T19:00:02.139Z cpu28:4155)<6>tg3 : vmnic8: NetQ remove RX filter: 1

vmware - copy networking port groups to another host

You might be able to do this via “host profiles” but if you do not have the licensing for it, this is the alternative. Very handy if you have over 50 or so port groups. It can be re-run to add to additional hosts as needed.

Install powercli, run the following to obtain your current list of virtual port groups off existing host;

Get-VirtualPortGroup -VirtualSwitch vSwitch0 -VMHost esx-01

Grab the output and place into CSV file or copy straght into Excel…

When Is A Trunk Not A Trunk?

Very good article here - http://networkingnerd.net/2011/02/02/when-is-a-trunk-not-a-trunk/

Particuly like setting of Native vLAN and tagged networks over an HP trunk;

So, if HP refers to an uplink carrying multiple VLANs are a tagged port, then does HP have a “trunk”? In fact they do. In HPvania, a trunk is a logical construct that aggregates multiple ports into one logical link. For those of you that might be out there scratching your heads about this one, this means that when you “trunk” a group of ports on an HP switch, you are creating one LACP link from up to four individual ports. This kind of configuration should look like this:

tinycore - autostart rdesktop

The directory for that purpose is hidden directly in your user folder, e.g. /home/tc/.X.d Create a file in there called rdesktop and put in it a command like

while x=0 do sleep 5 /usr/local/bin/rdesktop -f 192.168.1.100 done

Remember to make file executable with chmod

vmware - updating vcenter email alert for monitoring

I’ve used the following powershell script to assist with setting up a consistant email alert on various vmware envionrments.

# Usage ; # Please manually connect to vCenter, use "Connect-VIServer" -- this promotes usernames and passwords not beings saved with script. # Update below variable with email(s) use comma as delimita $MailtoAddresses= “[email protected]”

#—-These Alarms will send a single email message and not repeat —- $LowPriorityAlarms=“Timed out starting Secondary VM”,` “No compatible host for Secondary VM”,` “Virtual Machine Fault Tolerance vLockStep interval Status Changed”,` “Migration error”,` “Exit standby error”,` “License error”,` “Virtual machine Fault Tolerance state changed”,` “VMKernel NIC not configured correctly”,` “Unmanaged workload detected on SIOC-enabled datastore”,` “Host IPMI System Event Log status”,` “Host Baseboard Management Controller status”,` “License user threshold monitoring”,` “Datastore capability alarm”,` “Storage DRS recommendation”,` “Storage DRS not supported on host”,` “Datastore is in multiple datacenters”,` “Insufficient vSphere HA failover resources”,` “License capacity monitoring”,` “Pre-4.1 host connected to SIOC-enabled datastore”,` “Virtual machine cpu usage”,` “Virtual machine memory usage”,` “License inventory monitoring”

squid - reverse proxy

Great guide here - http://www.classhelper.org/articles/reverse-proxy-server-squid-debian/installing-squid-proxy-server.shtml

I’ve modified slightly for Ubuntu, but almost identical.

apt-get install squid cp /etc/squid3/squid.conf /etc/squid3/squid.bak rm /etc/squid3/squid.conf nano /etc/squid/squid.conf

http_port 80 defaultsite=www.yoursite.com vhost forwarded_for on refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 cache_peer 192.168.0.13 parent 80 0 no-query no-digest originserver name=web1 acl sites_web1 dstdomain www.yoursite.com yoursite.com cache_peer_access web1 allow sites_web1 cache_peer 192.168.0.14 parent 80 0 no-query no-digest originserver name=web2 acl sites_web2 dstdomain www.anothersite.com anothersite.com cache_peer_access web2 allow sites_web2 acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 443 # https acl Safe_ports port 1025-65535 # unregistered ports acl CONNECT method CONNECT http_access allow sites_web1 http_access allow sites_web2 http_access allow manager all http_access allow manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports #http_access deny all access_log /var/log/squid3/access.log cache_mgr [email protected]

KMS count

Getting the KMS count up over the initial threshold is a pain when you only have one server or one workstation to start with. Typically you need at least 5 servers or 25 client machine requesting activation before it will work.

This guy here as created a nice .exe that will trick KMS into thinking it has received all the required requests…

http://forums.mydigitallife.info/threads/39665-KMS-Client-Emulator-for-Increasing-KMS-Server-Client-Count

KMS Client

vmware - list all IPs on guest machines

If DNS is failing you…. You can run the following powercil script to list all IP’s to virtual machines within vmware….

$IPaddresses = @()

foreach($vm in Get-VM){ $vm.Guest.VmName | %{ $IPaddresses += $_ } $vm.Guest.IPAddress | %{ $IPaddresses += $_ } }

 

$IPaddresses

cron job to re prioitize tasks

I’m using the following crontab script to renice my squid process….

Put following in script and  call via cron (i’m doing every 10 mins)

*/10 * * * * /home/user/renice.sh

(renice.sh)

renice -15 $(ps -C squid3 -o pid=) renice -15 $(ps -C unlinkd -o pid=)

opensolaris - setting up dhcp

You’ll need these two packages installed;

SUNWdhcs, SUNWdhcm

First ensure that the DHCP service is running. Go into the “services” gui and tick the box to enable the DHCP server.

now from commandline run…

dhcpmgr
  1. From edit menu choose “network wizard”, step through the wizard (defautls are o.k i you have a fixed IP already assigned to your opensolaris box)
  2. From edit menu choose “address wizard”

If you step through the wizard (the following is an example of what i have choosen)