Wednesday, February 3, 2010

Unmanaged SAN storage processor (SP)

It could happen that one of the storage processor of your SAN displays as unmanaged in GUI.
This can happen after a SAN reboot and is usually related to the UPS powering this SP.
Since the communication between the UPS and the SAN is broken (not available), the SP goes on unmanaged and disable the cache.
In order to solve this, you'll need to stop the SAN (and everything running on before), stop the UPs, restart the UPS and let it do the check opreations (< 1 minute), and finally start the SAN.
Everything should be ok.

Tuesday, February 2, 2010

Viewing the Dell Service Tag from Windows

If you ever need to check the Dell Service Tag on a machine from within Windows, run the following command:

wmic bios get serialnumber

To do this remotely you need to add the /node: switch. For example:

wmic /node:<servername> bios get serialnumber

Thursday, January 21, 2010

Displaying the Quick Launch in Web Part Pages

If you create a web part page in MOSS 2007 it won’t show the Quick Launch on the left side of the page.

To work around this open the page in SPD and remove the following code:

<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"></asp:Content>

 

Unfortunately, the Quick Launch won’t be the correct width so in order for that to be displayed correctly you need to remove these additional lines of code:

<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"></asp:Content>

Friday, December 11, 2009

Forefront /NOMOM cannot update

If you have a single server running Forefront and not having access to your WSUS for updates (ie: an ISA server in a DMZ) you need to install the AV software with the /nomom option :
clientsetup /nomom
But it won't update automatically by itself.
You need to run Microsoft update and enable updates for Microsoft products in addition to Windows updates.

Thursday, December 10, 2009

Cannot enable "CLR enabled", needed after Forefront update (WSUS)

After a Forefront update on my server (WSUS + Forefront), it complained about an SQL option to be set (CLR) but there is no way I could set it up.

Start Forefront client security console :
An update for Microsoft forefront client security has occurred which requires the configuration wizard to be run again

Verifying settings and requirements -> failed

Log results :
[9/24/2009 9:34:49 AM] Verification(Verifying the Common Language Runtime (CLR) is enabled in SQL Server)
Common Language Runtime (CLR) is not enabled. Configuration cannot complete. For information on CLR, see http://go.microsoft.com/fwlink/?LinkId=98789
Number of verifications completed: [9/24/2009 9:34:49 AM]


I tried through the SQL Surface Area Configuration to set CLR to 1, but :

Failed to connect to server localhost\MICROSOFT##SSEE. (Microsoft.SqlServer.ConnectionInfo)


Here is how to fix it; open a command prompt and execute the following command lines :

osql -S \\.\pipe\sql\query -E -I
exec sp_configure 'show advanced options', 1
go
reconfigure
exec sp_configure
go

It shows :
clr enabled 0 1 0

Try to set clr enabled to 1...

exec sp_configure 'clr enabled','1'
go

Then :

exec sp_configure
go

It shows now :
clr enabled 0 1 1

Start again your Microsoft Forefront Client Security Console and it will go through all the update install process.

Friday, November 6, 2009

BackupExec on Linux : /opt/VRTSralus/bin/beremote daemon stops unexpectedly

When making backups of my linux server, I can have errors on open files generating errors... but the issue is that the backupexec remote agent stops running and then is unavailable for the next job.
A workaround consists in checking every hour (in this example) if the agent daemon (/opt/VRTSralus/bin/beremote) is still running, and if stopped, restart it.

Create the following script file (/root/restartRalus.sh) :

if [ -f /bin/grep ]
then
  PID=`/bin/ps -e | /bin/grep beremote | /bin/sed -e 's/^ *//' -e 's/ .*//'`
else
  PID=`/usr/bin/ps -e | /usr/bin/grep beremote | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
fi

if [ "${PID}" = "" ]
then
  /etc/init.d/VRTSralus.init start
fi



And execute it every hour for example :
> crontab -e
> 0 * * * * sh /root/restartRalus.sh

Thursday, November 5, 2009

VB Script to get folder and subfolders sizes with treedepth...

In order to have an automated overview of space amount used in my backup job, I made this vbs script.
Create a FolderList.txt file with pathes to folders you want to scan (don't leave blank lines)
Set the values you want for :
isProcessFiles : Get files size too
treeDepth : tree depth when scanning folders
computeAllFoldersSize : compute full size of all folders


Const isProcessFiles = 1
Const treeDepth = 3
Const computeAllFoldersSize = 1

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLogFile = objFSO.CreateTextFile(".\FolderSizes.log")

if computeAllFoldersSize = 1 then
  fullSize = 0
  Set objTextFile = objFSO.OpenTextFile(".\FolderList.txt", ForReading)
  Do Until objTextFile.AtEndOfStream
    strFolderPath = objTextFile.Readline
    Set objFolder = objFSO.GetFolder(strFolderPath)
    fullSize = fullSize + objFolder.size
  Loop
  objLogFile.Writeline "Size of all folders in list file : " & FormatNumber(fullSize/(1024*1024*1024),3) & " GB"
  objLogFile.Writeline ""
  objTextFile.Close
End If


if treeDepth < 1 then wscript.quit


'For all folders specified in the text file
Set objTextFile = objFSO.OpenTextFile(".\FolderList.txt", ForReading)

Do Until objTextFile.AtEndOfStream
  strFolderPath = objTextFile.Readline
  Set objFolder = objFSO.GetFolder(strFolderPath)
  ProcessFolder (objFolder)
Loop



Sub ProcessFolder(objCurrentFolder)
  objLogFile.Writeline FormatNumber(objCurrentFolder.Size/(1024*1024),0) & " MB " & objCurrentFolder.path
  if treeDepth > 1 then Call ProcessSubFolders (objCurrentFolder, 1)
End Sub



Sub ProcessSubFolders(ByRef objCurrentFolder, ByVal currentRecurseLevel)

  if currentRecurseLevel >= treeDepth then exit Sub

  recurseTabs = ""
  For value = 0 To currentRecurseLevel - 1
    recurseTabs = recurseTabs & " "
  Next

  if objCurrentFolder.SubFolders.count = 0 then
    if isProcessFiles = 1 then
      Call ProcessFiles (objCurrentFolder, currentRecurseLevel)
    end if
  else
    Call ProcessFiles (objCurrentFolder, currentRecurseLevel)
    For Each objCurrentSubFolder In objCurrentFolder.SubFolders
      objLogFile.Writeline recurseTabs & FormatNumber(objCurrentSubFolder.Size/(1024*1024),0) & " MB " & objCurrentSubFolder.path
      Call ProcessSubFolders (objCurrentSubFolder, currentRecurseLevel + 1)
    Next
  end if
End Sub



Sub ProcessFiles (ByRef objCurrentFolder, ByVal currentRecurseLevel)

   if currentRecurseLevel >= treeDepth then exit Sub

   recurseTabs = ""
   For value = 0 To currentRecurseLevel - 1
     recurseTabs = recurseTabs & " "
   Next

   For Each objCurrentFile In objCurrentFolder.Files
     objLogFile.Writeline recurseTabs & FormatNumber(objCurrentFile.Size/(1024*1024),0) & " MB " & objCurrentFile.path
   Next
End Sub

Friday, October 30, 2009

Windows Explorer very slow when browsing SharePoint Libraries

This problem has been popping up sporadically over the past number of months and I was unable to pin it to a particular client or server version. I’ve seen it in Vista and Windows 7 clients and also on MOSS 2007 with SP1 and with SP2.

When opening a SharePoint library using the Windows Explorer, the user had to wait anything between 5 and 30 seconds for a reaction – opening documents caused the same delay. It was impossible to use effectively.

I still haven’t worked out exactly how this setting is related, but changing it seems to have done the trick. Under “Internet Options”-“Connections”-“LAN settings” I disabled the checkbox “Automatically detect settings” (see below). Even though this was not effecting all users, I pushed this setting out in a GPO – so far so good.

 

image

 

Windows Explorer must have been looking for configuration settings every time the user clicked on a folder

Resizing Samsung hard drives to fit controller size limits

If your hard drives are too large to be managed by your controller (in my case 1.5TB HDD with an adaptec SATA RAID SA2420 card, with 1GB per HDD max.) you can resize them using using the Samsung EsTool available here. All details on the same page.
To resize your disk use the SET MAX ADDRESS feature. After resizing, you will be able to use them with size limited controllers (of course you can restore the initial size if needed).

Wednesday, October 28, 2009

Delay SAN shutdown on power outage, avoid corrupt databases...

In my case the SAN I have will shutdown immediatly if a power outage is detected : and this cannot be changed.
My hardware : Dell EMC AX150 + APC Smart UPS 750
You cannot delay this shutdown through the NaviSphere software.
This is really annoying since the SAN hosts the Exchange databases (could have been SQL databases too).
When there is a power outage, the Exchange server doesn't have time to shutdown before the SAN turns off.... and this can cause database or logs corrupt...
In order to avoid this and since there is nothing I can parameter, I have added an intermediate UPS as shown below :


SPA and SPB are the 2 power supplies of the SAN

So my servers (connected to another UPS) can shutdown on a power outage (please read the shutdown scripts article) and then once the intermediate UPS battery is low (or you can parameter a delay too) it behaves like a power outage for the SAN+UPS and this one turns off too.