Friday, February 22, 2013

Resolve lotus winmail.dat issues with Office 365 and Outlook 2013 using powershell

A customer who uses Lotus would always receive a winmail.dat attachment when I sent them a file using Outlook 2013 and Office 365.  If I sent using the Office 365 webmail there was never an issue. 

In order to fix this problem I disabled TNEF encoding for all messages sent to all domains outside my organization in Office 365 using Powershell

From my research, I found the steps needed from four websites:


Here is a condensed version of the instructions:

Open Powershell as administrator and make sure you can excuted scripts
PS C:\Windows\system32> Get-ExecutionPolicy
PS C:\WINDOWS\system32> Set-Executionpolicy -ExecutionPolicy Unrestricted

Store your office 365 credentials (email@domain.com)
PS C:\WINDOWS\system32> $Cred = Get-Credential

Create the powershell connection to office 365 and disable TNEF
 PS C:\WINDOWS\system32> $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
PS C:\WINDOWS\system32> Import-PSSession $s
PS C:\WINDOWS\system32> Set-RemoteDomain Default -TNEFEnabled $false

Remove powershell connection
PS C:\WINDOWS\system32> Remove-PSSession $s
Close powershell

Tuesday, February 19, 2013

Why do you think having reliable Internet and network access is important to a restaurant?


Why do you think having reliable Internet and network access is important to a restaurant?

• Download recipes?
• Watch a howto cooking video on youtube?

While these may seem useful, there are much more critical reasons for restaurants to have reliable technology.

Some examples are:

• A computer in the back room is used to store all pricing and accounting information
• Cash registers and receipt printers use the wireless network to talk to each other and go anywhere (such as seasonal outdoor bar)
• Security cameras for safety and security use the WiFi and Internet to allow an owner to see what's going on at anytime, anywhere, via their iPhone
• Internet access is used for all credit card transactions, if the internet goes down, so do credit cards
• Public WiFi is provided for guests to use for events, conferences etc.  If they can't show a presentation or video that is on the Internet, that can ruin the event.

So today I challenge you to think of someone who's business relies on information technology.  Think about what they do and how they do it.  If they use computers or networks for anything critical, they are a good fit for FiskIT.

And remember, even a restaurant has mission critical needs for I.T.!

www.fiskinfotech.com
412-697-1197

Sunday, February 17, 2013

Introduction to Microsoft Visio with some great tips for owner-operated businesses

A great introduction to Microsoft Visio with a fun storyline and some examples of solutions to some real world challenges!  Great to watch all of them straight through, then review each one, make notes and give it a try.  Run into a problem?  Contact FiskIT for some additional clarity.  www.fiskinfotech.com


Episode 1: Create an Office Layout diagram using Visio

Episode 2: Create an Organization chart using Visio

Episode 3: Create a Network Diagram in Visio

Episode 4: Create a Web site map

Episode 5: Create a workflow diagram in Visio

Episode 6: Create a timeline in Visio

Wednesday, February 6, 2013

FiskIT Cheat Sheet - Asterisk 11, FreePBX 2.10.0 on Amazon EC2 Cloud Small Instance

Building a state of the art business VoIP phone system using linux, free software and Amazon EC2 Cloud services. No hardware needed. To learn more about this and other amazing I.T. services, contact FiskIT today! www.fiskinfotech.com

Install initially based on instructions from these sites
http://www.freepbx.org/trac/wiki/UbuntuServer
http://wiki.freepbx.org:8090/pages/viewpage.action?pageId=1409028
http://ubuntuforums.org/showthread.php?t=1986217

Create new instance
     In AWS Console EC2 Dashboard   
          Launch Instance
          Choose Classic Wizard and continue
          Select Ubuntu Server 12.04.1 LTS 64bit
          Change instance type to M1 Small (T1 Micro does not have enough umpf for ivr and whatnot) and continue
          Check box Prevention against accidental termination and continue
          Edit the Storage Device Configuration, uncheck Delete on Termination, hit Save then continue
          Under Name, add a server name for the value
          Choose an existing key pair or create a new key (save this to your desktop and also save a copy somewhere safe.  If you loose it, you wont be able to gain access to the vm ever again)
          Create a new security group
               Group name: voip server
               Group description: voip server rules
               Rules to add:
                    http: 0.0.0.0/0
                    https: 0.0.0.0/0
                    ssh: 0.0.0.0/0
                    udp 5060-5061: 0.0.0.0/0
                    udp 10000-20000: 0.0.0.0/0
               Continue, Launch, Close
Connect to the instance
     In AWS Console, EC2 Dashboard, Instances, right click on the instance and choose Connect
          For private key path, enter the path to the pem file you saved when you created a new key in the previous steps
          Launch ssh client
Update your system:
     apt-get update && sudo apt-get upgrade -y
     reboot
Install the packages
     apt-get -y install php5-mysql php-db mysql-server libapache2-mod-php5 php5-gd php-pear php-DB sox curl build-essential linux-headers-`uname -r` openssh-server apache2 mysql-client bison flex php5 php5-curl php5-cli libncurses5-dev libssl-dev libmysqlclient15-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git subversion gcc
          Set mysql root passwd when prompted
     pear install db
Download Software
     cd /usr/src/
     wget https://iksemel.googlecode.com/files/iksemel-1.4.tar.gz
     wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
     wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
     wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
Install dependencies for google voice
     cd /usr/src
     tar xf iksemel-1.4.tar.gz
     cd iksemel-1.4
     ./configure
     make all install 
For the localization to work properly you may have to edit /etc/php5/apache2/php.ini and modify as follow (leny/sid):
     ; PHP's built-in default is text/html
     default_mimetype = "text/html"
     ;default_charset = "ISO-8859-1"
     default_charset = "utf8";
Compile and install DAHDI.
     cd /usr/src
     tar xvfz dahdi-linux-complete-current.tar.gz
     cd dahdi-linux-complete-2.6.1+2.6.1
     make all
     make install
     make config
Compile and install LIBPRI.
     cd /usr/src
     tar xvfz libpri-1.4-current.tar.gz
     cd libpri-1.4.14
     make
     make install
Compile and install Asterisk
     cd /usr/src
     tar xvfz asterisk-11-current.tar.gz
     cd asterisk-11.2.1
     ./configure
     contrib/scripts/get_mp3_source.sh
     make menuselect
     make
     make install
     make config
Install Asterisk-Extra-Sounds
     cd /var/lib/asterisk/sounds
     wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz
     tar xfz asterisk-extra-sounds-en-gsm-current.tar.gz
     rm asterisk-extra-sounds-en-gsm-current.tar.gz
Setup permissions for asterisk.asterisk
     adduser asterisk --disabled-password --no-create-home --gecos "Asterisk User"
     chown asterisk. /var/run/asterisk
     chown -R asterisk. /etc/asterisk
     chown -R asterisk. /var/{lib,log,spool}/asterisk
     chown -R asterisk. /usr/lib/asterisk
     mkdir /var/www/html
     chown -R asterisk. /var/www/
Modify Apache
     sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php.ini
     cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
     sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
     service apache2 restart
     nano /etc/apache2/sites-enabled/000-default
     Change /var/www to /var/www/html
Download and untar FrePBX
     cd /usr/src
     wget http://mirror.freepbx.org/freepbx-2.10.0.tar.gz
     tar zxvf freepbx-2.10.0.tar.gz
     cd freepbx-2.10.0
Configure Asterisk database in MYSQL and set permissions
     export ASTERISK_DB_PW=amp109
     mysqladmin -u root -p create asterisk
     mysqladmin -u root -p create asteriskcdrdb
     mysql -u root -p asterisk < SQL/newinstall.sql
     mysql -u root -p asteriskcdrdb < SQL/cdr_mysql_table.sql
     mysql -u root -p -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
     mysql -u root -p -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
     mysql -u root -p -e "flush privileges;"
     nano /etc/asterisk/manager.conf
          make sure password for admin is amp109
Patch safe_asterisk script
     sed -i "s|#!/bin/sh|#!/bin/bash|" /usr/sbin/safe_asterisk
#     nano /usr/sbin/safe_asterisk
#          SAFE_AST_BACKGROUND=1
Start asterisk
./start_asterisk start
Create symbolic link for agi-bin
ln -s /usr/share/asterisk/agi-bin /var/lib/asterisk/agi-bin
Install FreePBX
     ./install_amp
     log into fbpx portal via http://host/
     Go into advanced settings, make sure password for admin is amp109
     Apply
Wrapping up
     purchase an elastic IP and assign to the instance
     point a domain voip.domain.com to your IP
     log into freepbx via http:// with the username admin and password admin
Install FreePBX Modules
     Under administration, module admin, install the additional modules you want/need, upgrade already installed if available
Setup Extensions, groups, ivr, etc
Setup trunks
    

Thursday, March 15, 2012

Make cell phones send calls to trixbox asterisk voicemail

We have people travelling internationally who are using different SIM cards for different countries on unlocked iphones. Different people use the SIMS so we don't want them to setup voicemail on each SIM each time they travel somewhere or hand off the phone.

So what I am doing is forwarding voicemail to my asterisk (trixbox) pbx. This can be done with RDNIS if your system supports it. The way I accomplished this though was through forwarding calls destined for voicemail to a specific DID I have on my asterisk system and setup the incoming route for the DID to go directly to the users office voicemail. They then get emailed the voicemail message.

Using the following call forwarding codes, I have the user forward voicemail calls to the DID I setup in asterisk.

Here is how I forward the calls on the cell phone (on the iphone, push and hold down 0 to get a + symbol):

No Answer Forward: **61*+ 1 DIDNUMBER # [SEND]
Unreachable Forward:**62*+ 1 DIDNUMBER # [SEND]
Busy Forward* * 67 * + 1 DIDNUMBER # [SEND]

This worked for me on AT&T.

Monday, February 6, 2012

CHROOT to remote fedora 16 install on SAN via iscsiadm

The goal of this post is to help you gain access to a CHROOT environment of a F16 install which was installed to a SAN via iscsi.

While working on installing fedora to a diskless system using iscsi root and boot, my system would not boot. I needed a way to access the system in chroot so I could reinstall grub with the proper iscsi boot config. Everything discussed here is Fedora 16 64bit. I am using an EMC VNXe 3100 SAN. For this demonstration, I do not have chap enabled so it is not discussed here.

Boot the Fedora 16 Live CD USB
  • Boot Fedora 16 Live USB. I had some problems getting mine to boot so see blog entry http://ispman.blogspot.com/2012/02/boot-fedora-16-64-bit-live-boot-from.html
  • Open a terminal window and su
Connect to the SAN via iSCSI using iscsiadm
  • Edit /etc/iscsi/initiatorname.iscsi and put in the iqn your machine is going to initiate iscsi as. In my case: InitiatorName=iqn.1986-03.com.ibm:06LEJE8.linux Note: The initiator name also needs programmed in your SAN to allow connections from the IQN.
  • Reload iscsi:
#/etc/init.d/iscsi restart
  • Setup your ethernet card to have an IP on the SAN network:
# ifconfig eth0 172.16.10.100/24
  • Add the network card you are going to use for iscsi to the iscsi database:
# iscsiadm -m iface -I eth0 -o new
New interface eth0 added
  • Add the iscsi target to your isci database using iscsiadm: iscsiadm -m node -T -p -o new
# iscsiadm -m node -T iqn.1992-05.com.emc:apm001140005820000-10-vnxe -p 172.16.10.18 -o new

Starting iscsid:

New iSCSI node [tcp:[hw=,ip=,net_if=,iscsi_if=default] 172.16.10.18,3260,-1 iqn.1992-05.com.emc:ap001140005820000-10-vnxe] added
  • Now log into the iscsi target: iscsiadm -m node -T -p -l

# iscsiadm -m node -T iqn.1992-05.com.emc:ap001140005820000-10-vnxe -p 172.16.10.18 -l

Logging in to [iface: default, target: iqn.1992-05.com.emc:apm00114005820000-10-vnxe, portal: {172.16.10.18,3260]

Login to [iface: default, target: iqn.1992-05.com.emc:apm00114005820000-10-vnxe, portal: {172.16.10.18,3260] successful

  • Ensure the session is up and running

# iscsiadm -m session -P 3

  • Using dmesg, find what device your iscsi drive was attached to. In my case it was sdb
  • I used LVM when I installed to the iscsi target before so I have to bring up the lv's

#fdisk -l /dev/sdb

  • Use lvs to find the VG name

#lvs

  • Make the lv active

#vgchange -a y VolGroup

  • Make your temporary mountpoint

#mkdir /mnt/sysimage

  • Mount the root partition to sysimage. For me, lvs told me the name was lv_root, then mount the rest

#mount /dev/VolGroup/lv_root /mnt/sysimage

#mount -t tmpfs none /mnt/sysimage/tmp

#mount -t tmpfs none /mnt/sysimage/var/lock

#mount -t tmpfs none /mnt/sysimage/var/lib/iscsi

#mount --bind /dev /mnt/sysimage/dev

#mount -t proc none /mnt/sysimage/proc

  • Mount the boot partition of the drive which for me was sdb2

#mount /dev/sdb2 /mnt/sysimage/boot

  • Begin the chroot

#chroot /mnt/sysimage

#source /etc/profile


Boot Fedora 16 64 bit live boot from usb ibm hs22

I was not able to boot to a Fedora 64bit live usb stick. I downloaded the 64bit live iso and used the windows version of Fedora Live USB Created. The boot would drop out saying no root device.


From: http://www.fedoraforum.org/forum/showthread.php?p=1476942


nk1eto Offline
Registered User
Join Date: May 2011
Posts: 1
linuxfirefox
Re: Lenovo S205 won't boot any Live USB Fedora distro

I was having this same exact problem on a Lenovo x120e Thinkpad, Fedora liveUSB created with unetbootin. Solved it by:

1. Find your USB disk label. When in the debug shell, run
Code:
ls /dev/disk/by-label/ UDISK
My label was UDISK. The fedora installer by default expects the label to be Fedora-15-x86_64-Live-Desktop (or similar)
2. Reboot and edit the GRUB boot command.
Code:
hit ENTER to view GRUB menu. hit 'e' to edit commands before booting. hit 'e' to edit top entry. change LABEL=Fedora-15-x86_64-Live-Desktop to LABEL= (also remove 'quiet rhgb' for verbosity) hit ENTER to accept and 'b' to boot.
that should do it.

Last edited by nk1eto; 28th May 2011 at 03:23 PM.

Tuesday, January 10, 2012

Specify different network policies for different ssid's on a single cisco ap

From looking at the log file for NPS (to find your log file go to server manager, roles, network policy and access services, NPS, Accounting) I was able to see that when I connect to different ssids (single cisco access point, multiple ssids and vlans), the log shows me the mac address of the virtual ap I connect to. I tried to find this mac address on my cisco ap but couldnt so I connected to the different ssid's, looked at the log to get them.

For example:
"VMDC01","IAS",01/10/2012,10:00:41,1,"seegrid\bfisk","SEEGRID\bfisk","0023.050c.e751","0811.9688.ffb0",,,"pghap2","192.168.10.25",51105,9,"192.168.10.25","pghap02",,,19,,,1,11,"SGA Wireless",0,"311 1 192.168.10.4 01/10/2012 13:30:09 192",,,,"Microsoft: Secured password (EAP-MSCHAP v2)",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"SGA",1,,,,

After my username bfisk, you will see the mac for the vap and for my client computer connecting to the wifi. Looking at the logs I found one ssid = e751 and the other was e750.

I then created network policies, one for each ssid/vlan and used the condition Called Station ID = e751$ for the one ssid, e750$ for the other ssid. Added the different domain group conditions for each and presto, working like a champ.

Downfall to this is if you have multple ap's you will need to do the same for each ap to get all the mac addresses. I couldnt find the vap mac using show int.

Tuesday, November 23, 2010

Received Error: 452 4.4.2 Mailbox Full Microsoft SMTP Virtual Server (Server 2008r2)

Emails were bouncing back to a sharepoint list of mine. After further digging I found out there is a little switch in the smtp server setup that puts a quote on a mailbox. I recommend removing this for anyone accepting email into email enabled lists in sharepoint.

Here was the message I was receiving from my exchange server (which forward mail addressed to @sharepoint.seegrid.company to the sharepoint smtp server):

Delivery is delayed to these recipients or groups:

fieldstatus@sharepoint.seegrid.company (fieldstatus@sharepoint.seegrid.company)

Subject: FW: test

This message hasn't been delivered yet. Delivery will continue to be attempted.

The server will keep trying to deliver this message for the next 1 days, 19 hours and 59 minutes. You'll be notified if the message can't be delivered by that time.


So I telnetted to the sharepoint server running the built in Microsoft SMTP Server that comes with Windows Server 2008 R2 and go the following error:

220 sharepoint.seegrid.company Microsoft ESMTP MAIL Service, Version: 7.5.7600.1
6544 ready at Tue, 23 Nov 2010 14:42:17 -0500
ehlo
250-sharepoint.seegrid.company Hello [192.168.10.89]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
mail from: bfisk@seegrid.com
250 2.1.0 bfisk@seegrid.com....Sender OK
rcpt to: fieldstatus@sharepoint.seegrid.company
452 4.2.2 Mailbox full

After searching around I found the following at: http://www.dawkco.com/software/support/sir200212191418.txt

Disable the SMTP Drop Directory Quota setting
=============================================
1. Open Internet Services Manager
a. Expand the local computer node
b. Expand SMTP Virtual Server node
c. Select the Domains node under the SMTP Virtual Server node
2. In the right-hand pane, Right-click on the Local (Default) domain name
in the list of domains
a. Select Properties
b. CLEAR the "Enable drop directory quota" checkbox
c. Click OK
3. Stop, and then re-Start the SMTP Virtual Server to force the change to
take effect immediately.

Wednesday, November 10, 2010

Restoring an exchange 2010 mailbox using DPM 2010

Overview:

DPM server backs up exchange server database every morning at 1am. We had to recover a user mailbox from the week before. DPM uses VSS writer to backup the exchange database. This means even when you want to restore a single mailbox, DPM will restore the entire mailbox database for the date you choose to an exchange recovery database and then you pull out that users data. The instructions below assume only that you already have DPM setup and backing up your exchange server.

My setup:

Primary VM Server:
  • Windows server 2008 R2 enterprise
  • Dual quad 3ghz xeon ibm x3550
  • 48gb ram
  • 2 750gb drives raid 0 which are c: and d: drive
  • c: is os, d: is virtual memory for server
  • 4 1tb drives raid 5 which is e: drive
  • 4 active windows server 2008 r2 virtual machines with virtual hard drives on e:

Exchange VM:

  • 16gb ram
  • 300gb virtual hard disk (c:)
  • 150gb virtual hard disk (d:)

DPM Server:

  • Windows server 2008 r2
  • DPM 2010
  • Single core2duo 2.8ghz
  • 8gb ram
  • 2 1tb drives raid0 (c: os)
  • 16tb drobo connected via gigabit eth (backup destination)

Backup schedule:

  • Backup exchange database every morning at 8am

The Process:

  1. Using exchange powershell, create a recovery database on your exchange server. Make sure you create the database on a drive where you will have enough space to recover the entire mailbox database backup. In my case, my mailbox database was 80gb. You only have to create a recovery database once. You can use it over and over again for your restore. Syntax: new-mailboxdatabase -Recovery -Name RDB1 -Server vmexchange01 -EDBFilePath "d:\rdb1\database\rdb1.edb" -LogFolderPath "d:\rdb1\Logs"
  2. Set the database so it can be overwritten. You will need to do this everytime before you go to recover a mailbox as once the recovery is done, the flag will be removed automatically. Syntax: set-mailboxdatabase -Identity rdb1 -AllowFileRestore 1
  3. Open DPM Console, select the Recovery tab
  4. Select the exchange database, the date you wish to recover from
  5. Right click on the mailbox you wish to recover and choose recover
  6. Confirm that you are recovering the correct mailbox and date and click Next
  7. Choose Recover mailbox to an Exchange server database and click Next
  8. Enter in your exchange server, in my case it is vmexchange01 and specify the database name, in my case, RDB1
  9. Uncheck SAN Recovery, set a notification for when the restore is complete, click Next
  10. Confirm the settings and click Next
  11. The restore is now in progress. You can close the status window if you wish and monitor through the Monitoring tab
  12. You will notice that DPM will start recovering the entire mailbox database for the date you specified to you recovery database on the exchange server. As soon as you see some data transferred, the size of the recover database on the server be set to the size of the recovery. This will help you gauge how long the recover will take
  13. Once the recovery is complete, you will then need to transfer the users recovered mailbox to an active user on the exchange server. In my case, I am going to recover the mailbox of "Brian Fisk" to a folder called "Recovered Backup" under the exchange user ittest. THIS WILL NOT OVERWRITE THEIR MAILBOX, it will add a folder at the same level as Inbox called Recovered Backup
  14. Syntax: New-MailboxRestoreRequest -SourceDatabase "rdb1" -SourceStoreMailbox 'Brian Fisk' -TargetMailbox ittest@seegrid.com -TargetRootFolder 'Recovered Backup' -AllowLegacyDNMismatch
  15. When prompted, hit Y to recover the mailbox
  16. You will now see a folder called 'Recovered Backup' under the mailbox

Thursday, May 21, 2009

Resizing LVM Volumes in Linux under vmware or native

This is a great set of instructions by David Maphis on how to resize an LVM volume in Linux. I just used these instructions to expand my linux virtual machine hard drive under vmware fusion. OS was Fedora core 6 using lvm. Vmware I used was VMware fusion for the mac but this applies to any linux system using lvm.

Under my vm settings in VMware fusion I expanded the disk to be larger and then followed these instructions for the linux side of things. Obviously the vm has to be shutdown before you mess with the hd size in vmware but all of the linux steps I did on the live system within Xwindows. LV's are great!

Here are David's instructions. You can skip his intro if you are not using vmware server. I injected some notes which you will find in bold.

URL to original pdf: http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fcommunities.vmware.co
Publish Post
m%2Fservlet%2FJiveServlet%2FpreviewBody%2F4900-102-2-3019%2FResizing%2520LVM%2520Volumes%2520in%2520Linux.pdf%3Bjsessionid%3D9DC6B8A9615CEBD28FE94412BA638CE1&ei=VJcVSsioAZio8gSaxKjHAg&usg=AFQjCNGSDpxwdH7ojtEpCwiGR_Yueod_Kg&sig2=oJ4vPtV31iEBovG4xMFuHw

By David Maphis 4/29/2008

In this example I will changed the size of my root partition without
affecting any data. Since this is a VM, I can extend my vmdk with the
“vmkfstools” command. To do this I will have to shutdown the VM to release
the lock on the file then resize it. Power up when complete.

Once this is done, make a partition that uses the available space you wish to
add to the LVM volume using “parted”. It has an interactive shell, so just
enter “parted” in a shell:

parted
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 206MB 206MB primary ext3 boot
2 206MB 8587MB 8382MB primary lvm


So I have from 8588MB to 10.7GB available for a new partition. For this
example I’m only using up to 9588MB. Your numbers will obviously vary.

So now let’s make a partition from the new space:

(parted) mkpart primary 8588 9588

(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 206MB 206MB primary ext3 boot
2 206MB 8587MB 8382MB primary lvm
3 8587MB 9588MB 1001MB primary

You can now see that we have allocated a total of 1001MB of space to
partition 3 or /dev/sda3.

Next we need to create a Physical Volume (PV) with “pvcreate”. LVM also has
an interactive shell, so type “lvm” in a shell prompt:

lvm
lvm> pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created

lvm> pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 7.78G 32.00M
/dev/sda3 lvm2 -- 954.44M 954.44M

BFISK NOTE: I did not see sda3 when I ran the pvs command but I was able to proceed with the directions.

Now there is a partition that is about 1GB of space available on PV
/dev/sda3.

Now we need to extend the Volume Group (VG) to include the new PV with the
“vgextend” command:

lvm> vgextend VolGroup00 /dev/sda3
Volume group "VolGroup00" successfully extended
lvm> pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 7.78G 32.00M
/dev/sda3 VolGroup00 lvm2 a- 928.00M 928.00M

BFISK NOTE: I dont think I saw sda3 here either but continued with directions

By virtue of the fact that we used the same name as the existing VG, we have
now included this PV in the VG.

Extend the Logical Volume (LV) to include the new space with “lvextend”. To
determine that size of the extents we want to add, we first need to view the
VG:

lvm> vgdisplay VolGroup00
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 8.69 GB
PE Size 32.00 MB
Total PE 278
Alloc PE / Size 248 / 7.75 GB
Free PE / Size 30 / 960.00 MB
VG UUID Ll4Bg4-jIFV-lfut-z4Ae-JTfH-0Hzp-Zf9RjM

Looking at this we can see that the total “Free PE” is 30. We will use this
in the following command:

lvm> lvextend -l+30 /dev/VolGroup00/LogVol00
Extending logical volume LogVol00 to 8.19 GB
Logical volume LogVol00 successfully resized

BFISK NOTE: I am not sure what the +30 is. It's not MB and it's not GB. Maybe %? I dunno, I just issued the command until it told me there was no space left. At that point I used -l+10 untill I ran out and then +1, etc until I had no empty space left.

lvm> lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
LogVol00 VolGroup00 -wi-ao 8.19G
LogVol01 VolGroup00 -wi-ao 512.00M

So there you are, you have now extended your LV. Now we have to clue the OS
in what is happening.
We need to expand the file system to make the new space visible to the OS
with resize2fs (Fedora, CentOS) or ext2online (RedHat)

[root@labserver02 dev]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
7.1G 1.3G 5.4G 20% /

[root@labserver02 dev]# resize2fs
resize2fs 1.40.2 (12-Jul-2007)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-p] device [new_size]

[root@labserver02 dev]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.40.2 (12-Jul-2007)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing
required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 2146304 (4k)
blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 2146304 blocks long.

[root@labserver02 dev]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
8.0G 1.3G 6.3G 17% /

Wednesday, May 13, 2009

Xen: Move an LVM-based virtual machine to another host without shared storage between the two hosts

For those running Xen on servers with no back-end SAN, the following instructions detail the steps necessary to move an LVM-based virtual machine to a new physical host. There may be more elegant ways to achieve this, but this is what worked for me.

Environment
Ok, so let’s set the scene:

  • vmhost is a RHEL 5 server running several virtual machines using the Xen virtualization technology. Each virtual machine is allocated a 60 GB logical volume within an LVM volume group. One of these virtual machines, “win2k3vm”, needs to be moved to a new server.
  • new-vmhost is almost identical to vmhost, but has updated hardware and more memory. This is the server that “win2k3vm” will be moved to.


Migrate the Virtual Machine
1. Create a snapshot of virtual machine LVM volume. This can be run on a live virtual machine, but it is probably safer to perform a graceful shutdown of your virtual machine first.

[root@vmhost]# lvcreate -s -L 300m -n win2k3vm-snap VolGroup01

2. Export the snapshot of the guest VM to a file that can be moved between physical servers.

[root@vmhost]# dd if=/dev/VolGroup01/win2k3vm-snap of=/mnt/temp/win2k3vm.img bs=4096

3. Remove the snapshot LVM volume.

[root@vmhost]# lvremove /dev/VolGroup01/win2k3vm-snap

4. Copy the file to the new VM host. Make sure you have sufficient free drive space.

[root@vmhost]# scp /mnt/temp/win2k3vm.img user@new-vmhost:/mnt/temp/

5. On the new VM host, create an LVM volume that is at least as big as the guest VM file.

[root@new-vmhost]# lvcreate -n win2k3vm -L 60G VMGroup

6. Transfer the guest VM file to the new LVM volume.

[root@new-vmhost]# dd if=win2k3vm.img of=/dev/VMGroup/win2k3vm bs=4096

7. Copy the VM config file from the old VM host to the new VM host server.

[root@vmhost]# scp /etc/xen/win2k3vm user@new-vmhost:

8. Copy the file to the appropriate directory.

[usr@new-vmhost]$ sudo mv ~/win2k3vm /etc/xen/

Summary of Commands
[root@vmhost]# lvcreate -s -L 300m -n win2k3vm-snap VolGroup01
[root@vmhost]# dd if=/dev/VolGroup01/win2k3vm-snap of=/mnt/temp/win2k3vm.img bs=4096
[root@vmhost]# lvremove /dev/VolGroup01/win2k3vm-snap
[root@vmhost]# scp /mnt/temp/win2k3vm.img user@new-vmhost:/mnt/temp/
[root@new-vmhost]# lvcreate -n win2k3vm -L 60G VMGroup
[root@new-vmhost]# dd if=win2k3vm.img of=/dev/VMGroup/win2k3vm bs=4096
[root@vmhost]# scp /etc/xen/win2k3vm user@new-vmhost:
[usr@new-vmhost]$ sudo mv ~/win2k3vm /etc/xen/



Credit goes to: http://www.alethe.com/brad/2008/04/move-an-lvm-based-virtual-machine-to-another-host/ who these instructions were created by.

These instructions were perfect. Thanks Brad!

Tuesday, May 12, 2009

Xen: Converting a physical linux machine to xen virtual machine (fully virtualized) in Redhat Enterprise (64-bit)

I am running Redhat Enterprise Linux with xen virtualization. My server is a quad core 3ghz IBM x3550 server with 20gb of ram.

Today I had a need to move a standalone linux box into a xen vm. I had to keep the standalone machine completely intact as it was a build server which compiled code. The purpose of moving the build server to a xen VM was to test a build and see how long it took on the new VM machine compared to the older standalone server. The build server was fedora core 6 but I imagine this post applies to any machine, any software.


Preparing the standalone server
  1. Shut down the standalone machine
  2. Connect external USB disk to the system (use a disk that is larger then the drive in the system)
  3. Boot the standalone system with a linux boot cd (I used a ubuntu live recovery disk)
  4. Once the machine has booted the live cd, mount the external USB drive
  5. Use dd to make an image of the drive in the standalone server and output the image to a file on the USB drive: dd if=/dev/sda of=/mnt/usbdrive/standalone-server-image.dd (This will take some time)
  6. Once DD has completed, go ahead and shutdown the standalone machine, remove the USB drive, remove the Live CD and boot the machine back up to normal operation (if you will continue to use the standalone machine)
Preparing the Xen Server

Note: I am using LVM for my VM's. If you are not sure what this is, dont follow these instructions word for word

  1. Create a LV a little bit bigger then the original drive you imaged (my original was 80gb and I created a LV 100GB): # lvcreate -L100G -n newserver_vm /dev/data
  2. Copy the image of the standalone server to the new LV you just created:# dd if=/mnt/usb/standalone-server-image.dd of=/dev/data/newserver_vm
  3. Create a Xen configuration file for the new virtual machine (usually located in /etc/xen/
# /etc/xen/newserver_vm

import os, re
arch = os.uname()[4]

#I had to change the line below to match the path of where hvmloader was
kernel = "/usr/lib/xen/boot/hvmloader"

builder='hvm'

memory = 512
shadow_memory = 8

#change the line below to reflect the name of your vm
name = "newserver_vm"

#change the line below to match your network bridge. I copied and pasted this line from
#another working VM in xen that I started from scratch. Xen networking is a whole another
#blog!
vif = [ "mac=00:16:3e:15:f5:a6,bridge=xenbr0" ]

# I had to change the line below to match the patch of qemu-dm
device_model = '/usr/lib64/xen/bin/qemu-dm'
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot="dc"

sdl=0
vnc=1
vnclisten="0.0.0.0"
vncconsole=1
stdvga=0
serial='pty'

on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'

#make sure this matches the LV you created and copied the standalone image to
disk = [ "phy:/dev/data/buildserver_vm,xvda,w" ]

Start the new VM

# xm create /etc/xen/newserver_vm

Once I started the new VM I used the gui xen manager in redhat. I could not get to the console from command line by starting the vm with "-c"


I hope this helps. This is made more as a reference then a step by step guide. Feel free to comment back with questions or suggestions.

Sunday, May 10, 2009

Sharepoint: Indexing pdf files in sharepoint moss 2007 windows 2008 64-bit

After following a couple different instructions I found on the web here is the real deal. Follow the instructions in this link:

http://www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf


Worked great for me. Let me know if you have problems.

Friday, May 8, 2009

Sharepoint: Moving library and list items within your library or list

In this post we will be talking about moving SharePoint library and list items within a library or list.

One great feature of ShaprePoint libraries and lists is that you can edit the library or list settings to allow you to create sub folders. I use this functionality for project management, general information management, etc.

Using the "Site Content and Structure" page found under "Site Settings" and "Site Administration", if you want to move an item within a library or list to a different folder within that library or list, SharePoint will give you the error "An error was encountered performing this operation". For some reason you cannot move items around within a list or library. There is no problem though moving items to different libraries or lists as long as they are the same type as the one you are working with.

Workaround: Since you can move items to different libraries and lists but not within, under your main site, create a new library or list called something like "Temp: Project Task" or "Temp: Document Library". When you have an item in a library or list that you want to move within to a different folder, first move the item to your temp library or list you created and then move the item from there to the desitnation you want.

Hope this helps.

Tuesday, May 5, 2009

Sharepoint: Making Sharepoint (MOSS 2007) easier to use in non-windows enviroments

In my opinion, Microsoft Sharepoint Server (MOSS 2007) is an amazing tool for enterprise document management, communications and collaboration. Sharepoint is not software, it is a platform for business. The tool is almost a "fix all" for corporate users if they are using a windows machine as a client. If you are not using windows but are using mac os x or linux, you will find that sharepoint is lacking some very basic features. This is due to all web browsers other then Internet explorer are labeled as class 2 browsers. Although I understand that Microsoft is going to fine tune MOSS for active x and Internet explorer, some of the features they left out of level 2 browsers are inexcusable. Out of the box, in order to use some of the most basic features of sharepoint, you will need to use Internet explorer. I have found a few workarounds that make sharepoint a product which can be used by cross platform clients. Here are some of those workarounds:

Problem: Some key feature of sharepoint are blogs, discussion groups and wikis. All of these features allow the user to create and edit formatted text using the built in "what you see is what you get" (WYSIWYG) editor... that is if you are using Internet explorer. If you are using any other web browser software, all you will see is raq html. This happens when replying to a discussion group post, editing a wiki page, creating a blog, posting a comment, etc. This makes it hard to believe that Microsoft thinks people will use sharepoint as an Internet web server.

Solution: RadEditor by Telerik. http://www.telerik.com/products/aspnet-ajax/sharepoint.aspx Telerik has a group of tools which come for a fee but you can download and use radeditor lite for free. It is a server add-on which will give you a wysiwyg editor for all browsers.

Problem: Accessing document libraries with non-IE browsers and non-win os. If you are not running windows you are forced to use a web browser to checkout, download, edit, upload and check in your documents and you can only upload one file at a time. If you are using Windows and Internet Explorer you can open a document library in an explorer window just like you would a network share. On any other OS you do not have this option from the actions menu in Sharepoint through the web interface.

Solution: Use a Webdav file client which is similar to a ftp client. In fact, some software provides both webdav and ftp connections. In mac os x I am using cyberduck. In linux I am still evaluating different ways to mount a webdav site (sharepoint document library). I am working on this using davfs but there seems to be a common problem that davfs sometimes does not support folders or files with spaces. I.E. "Shared Documents". I am still trying to figure out the exact details but I have recreated this problem in different linux distributions.

In order for you to use most webdav programs make sure your sharepoint site has basic authentication enabled as most programs wont use NTLM auth. This results in a login failed error when trying to authenticate. You can enable basic authentication under IIS admin, your sharepoint site and authentication. One other note that is helpful is to make sure your document library settings are set to have "Require documents to be checked out before they can be edited" set to "no". This way in your webdav client, you can easily drag and drop files into the document library. If you overwrite a file it will create a new version automatically as long as you have versioning enabled.

Problem: When using Microsoft Windows and Office 2007, you can work with sharepoint items directly from the Office programs. Some examples are editing sharepoint calendars within outlook or saving word documents directly to a sharepoint site without the use of 3rd party tools or a web browser. If you are on a Mac, Office programs have no interaction with sharepoint. This is very depressing especially that Entourage, Microsofts mac mail client comparable to Outlook, does not tie in at all to sharepoint. For linux users and open office there is no way working directly with sharepoint other then through the web interface or using 3rd party apps.

Solution: For mac os x, Microsoft Mac Business unit is working on a program call Document Collaboration Companion (DCC). Microsoft says DCC will provide:
  • Integrated (offline/local) access to Office Live Workspaces and SharePoint Websites
  • Document upload
  • Document check-out/in
  • SharePoint Workspace and Doc Library access & browsing
  • An independent application with File Menu integration
Right now DCC is in private beta and I cannot figure out how to get on the list. Even MacBU cant give us a status update. The last update they gave was that the beta would be available in Feb of 2009 which has come and past. The website for DCC is http://www.microsoft.com/mac/itpros/dcc.mspx


In conclusion, I hope this helps with some the larger incompatibilities of a base install of Sharepoint when working with non-windows client machines. There are still other setbacks that I have not mentioned here but will post updates on in the future. Sharepoint is an AMAZING tool for enterprise content management and collaboration. It's just too bad it has taken me days and a lot of research to put these solutions together to make it a viable option for my business which is 50% pc, 25% mac and 25% linux.

Comments are appreciated!

Links to things mentioned in this blog:

  • Cyberduck (note, only version 3.1.2 seems to work. 3.2 does not seem to work: http://update.cyberduck.ch/Cyberduck-3.1.2.dmg
  • Davfs: http://dav.sourceforge.net/
  • DCC: http://www.microsoft.com/mac/itpros/dcc.mspx
  • RadEditor Lite: http://www.telerik.com/community/free-products.aspx

Monday, May 4, 2009

Current and Upcoming Projects

I apologize for not keeping my blog up to date. What I hope to provide with this blogs is help with problems which took me a lot of work and research to fix. Blogs have been a very good source of information trying to find that "missing piece" when trying to fix a problem, bug or deal with an incompatability.

Here are some projects that I am currently working on will be working on in the future:
  • Sharepoint: Microsoft Office Sharepoint Server (Moss) 2007
  • Sharepoint compatibility across different OS's (non windows users, mac, linux, iphone, entourage, ical, webdav)
  • Wifi localization (RTLS)
  • Consolidating multiple linux servers using mixed distributions to Redhat Enterprise with Xen virtualization
  • Contention management/Warhouse Management Systems (WMS)
  • Remote management and monitoring of devices at multiple locations, specifically dealing with nagios and zenoss
  • Window Server 2008 and related technologies

That's it for now. I am going to start creating training for MOSS for my users so look forward to some posts on that.

F&*$ crappy web software

I just made a new blog that covered a bunch of current and new projects but blogger gave me an error, told me to go back and when I did, all of my content was gone. So since you waited this long for a new post please have patience waiting for a new post as mine has currently run out. I guess that's why they have the save button.

Wednesday, September 17, 2008

Captains Log, Star date 55161.1


Ok, so maybe the star date was a little over the edge, but you know what, so am I.

Here in my blog you will hopefully find a good amount of useful information as well as some not so useful. To get an idea of my past, look for my resume. I will post it when I get a chance. It may not look that good pasted in here but you will get the picture as far as what my background is.

To the present, I am working for a robotics company which makes robotic forklifts. That's right, forklifts that drive themselves. Our big claim to fame and that we designed and patented a navigation system for robots where we take stereo video and transform the video into 3d blocks which the robot software can use for navigation and functionality. Basically we the eyes and visual part of the brain. So why forklifts? Because in logistics and supply chain, you have a very simple goal: Move x amount of y product in z amount of time. Of course we are doing some side things which are really cool but will be left out of this blog. If you want to know more about it, check out http://www.seegrid.com/

So what am I doing at such said robotics company? I am managing the I.T. infrastructure of the biz. We have a lot of UNIX and some windows. My main goal for my first half of the year working here (July-Dec 08) is to revamp the company infrastructure. Most of the work deals with installing Windows Server 2008 and Exchange Server 2007. With these we will be tying in central authentication to our Active Directory for all our Linux and mac servers and desktops. For now you will find most of the info about this project related battles with Microsoft.

So sit back, enjoy and feel free to contact me any time.


Brian Fisk Resume: