Exchange 2010: All db’s unmounted error -1032 file locked

A client had issues with their exchange server tonight…. All the mail DB’s were unmounted.

When I tried mounting the db’s exchange immediately shot back errors. I then tried running a soft recovery (http://msexchangeguru.com/2009/07/12/exchange-database-recovery-using-eseutil-commands/)of the exchange dbs as the logs were all ok, but I received a strange error from eseutil when I tried recovering: operation terminated with error -1032 file locked

I then stopped all exchange services to ensure exchange didn’t have a lock and retried still getting the same error. I then tried to write to the drive holding the logs and I was unable to write to it…. I then verified free space which was good, SAN for issues…it was OK. I then rebooted and retried thinking it was a fluke…no go. I rebooted into safe mode and ran:

diskpart

list volume

select volume 2

Ran the command:

attributes volume clear readonly

I did this on all volumes, made sure I could write to them all then rebooted and tested exchange satisfactory.

Force static IP clients to move to DHCP

The following will set the client to use DHCP:

netsh interface ip set address “Local Area Connection” dhcp

Unfortunately, you will need to do the same with DNS as well (otherwise it remains statically assigned)

netsh interface ip delete dns “Local Area Connection” all

Place that in GPO as a startup script after testing.

Move KVM VM vm to HyperV

Found the following online on Novell’s site and it worked perfectly (link below)

Copy the disk to a pc with virtualbox installed the convert with:

c:\Program Files\Oracle\VirtualBox>VBoxManage convertfromraw c:\be\disk0-test.ra

w test.vhd –format VHD

Then copy the vhd to hyperv and do it

1. Boot the target machine into rescue mode, using appropriate boot media

2. Run the following command to determine which devices are /, /boot and swap:

fdisk -l

3. Using that information mount the appropriate devices:

mount /dev/%root device% /mnt

mount /dev/%boot device% /mnt/boot

mount –rbind /proc /mnt/proc

mount –rbind /sys /mnt/sys

mount –rbind /dev /mnt/dev

4. Change the system root to the newly selected location:

chroot /mnt

5. Modify the /etc/fstab file to make sure the correct devices are being used.  For example the root, boot, and swap devices might be listed with these device names:

/dev/sda1

/dev/sda2

/dev/sda3

According to the fdisk -l output, however, the devices should be listed as follows:

/dev/cciss/c0d0p1

/dev/cciss/c0d0p2

/dev/cciss/c0d0p3

6. Modify the /boot/grub/menu.lst file and replace the boot partition information with the correct device id.  For example, the boot partition may be listed as this device:

/dev/sda2

Where it should be this device:

/dev/cciss/c0d0p2

7. Make sure that the /var/tmp directory exists and then run the following command (note: the /var/tmp directory may need to be manually created first):

mkinitrd

8. Reboot the target machine

From <https://www.novell.com/support/kb/doc.php?id=7009643>

Barracuda Web Filter Whitelisting

The trick is that all explicitly whitelisted sites need to be at the top of the Exceptions list. That or before the blocked Content Filter categories.

1. In the Block/Accept page, go to Custom Categories.

2. Create a Custom Category. Give it a Category name. In the “Domains to be included put in the url’s to be whitelisted. So that would be:

*.hyatt.com

lillytremont.com

columbus.regency.hyatt.com

hyatt.com

Click Add.

3. Go to Exceptions. In the Add Exception. Click Allow. In the “Applies To:” choose All Users. In the “Exception Type:” choose Content Filter. In the “Sub Category:” choose the Custom Categories section and the new one you made (in this case Hotels). Click Add.

4. No move that rule all the way to the top or before any blocked Content Filter rules. This is key to allow custom URL’s to be Whitelisted.

Windows .msc shortcuts

In-case you like windows run line commands:

.msc shortcuts

AD Domains and Trusts

domain.msc

Active Directory Management

admgmt.msc

AD Sites and Services

dssite.msc

AD Users and Computers

dsa.msc

ADSI Edit

adsiedit.msc

Authorization manager

azman.msc

Certification Authority Management

certsrv.msc

Certificate Templates

certtmpl.msc

Cluster Administrator

cluadmin.exe

Computer Management

compmgmt.msc

Component Services

comexp.msc

Configure Your Server

cys.exe

Device Manager

devmgmt.msc

DHCP Management

dhcpmgmt.msc

Disk Defragmenter

dfrg.msc

Disk Manager

diskmgmt.msc

Distributed File System

dfsgui.msc

DNS Management

dnsmgmt.msc

Event Viewer

eventvwr.msc

Indexing Service Management

ciadv.msc

IP Address Manage

ipaddrmgmt.msc

Licensing Manager

llsmgr.exe

Local Certificates Management

certmgr.msc

Local Group Policy Editor

gpedit.msc

Local Security Settings Manager

secpol.msc

Local Users and Groups Manager

lusrmgr.msc

Network Load balancing

nlbmgr.exe

Performance Monitor

perfmon.msc

PKI Viewer

pkiview.msc

Public Key Management

pkmgmt.msc

Quality of Service Control Management

acssnap.msc

Remote Desktop

tsmmc.msc

Remote Storage Administration

rsadmin.msc

Removable Storage

ntmsmgr.msc

Removable Storage Operator Requests

ntmsoprq.msc

Routing and Remote Access Manager

rrasmgmt.msc

Resultant Set of Policy

rsop.msc

Schema management

schmmgmt.msc

Services Management

services.msc

Shared Folders

fsmgmt.msc

SID Security Migration

sidwalk.msc

Telephony Management

tapimgmt.msc

Terminal Server Configuration

tscc.msc

Terminal Server Licensing

licmgr.exe

Terminal Server Manager

tsadmin.exe

Teminal Services RDP MSTSC

Teminal Services RDP to Console mstsc /v:[server] /console

UDDI Services Managment

uddi.msc

Windows Mangement Instumentation

wmimgmt.msc

Linux: Output your microphone to other computer’s speaker & vise-versa over SSH

$ dd if=/dev/dsp | ssh username@host dd of=/dev/dsp

The default sound device on Linux is /dev/dsp. It can be both written to and read from. If it’s read from then the audio subsystem will read the data from the microphone. If it’s written to, it will send audio to your speaker.

This one-liner reads audio from your microphone via the dd if=/dev/dsp command (if stands for input file) and pipes it as standard input to ssh. Ssh, in turn, opens a connection to a computer at host and runs the dd of=/dev/dsp (of stands for output file) on it. Dd of=/dev/dsp receives the standard input that ssh received from dd if=/dev/dsp. The result is that your microphone gets output on host computer’s speaker.

Want to scare your colleague? Dump /dev/urandom to his speaker by dd if=/dev/urandom.

It works the other way as well:
ssh -C user@ipaddress arecord -f dat -D plughw:1,0|aplay -f dat