Recently there was a need to configure Remote blob storage(RBS) in our new SharePoint 2010 farm. I had referred a few TechNet & Blog articles to configure it and there were some differences while following the steps, The purpose of this blog is to mention the exact steps and commands we executed to setup RBS is the farm.
The servers are like this,
3 Web Front Ends(WFEs)
2 Application Servers(App Srv)
Database is SQL 2008 R2
To begin with, we referred the steps published in this blog post http://blogs.msdn.com/b/sharepointalps/archive/2010/10/06/configure-remote-blob-storage-rbs-with-sharepoint-2010.aspx
For overview of RBS in SharePoint Foundation 2010, please read the following article http://technet.microsoft.com/en-us/library/ee748592.aspx
All the following installations have been done on Microsoft Windows Server 2008 R2 and Microsoft SQL Server 2008 R2 as there is no support for RBS on Microsoft SQL Server 2005.
First of all we have to activate FILESTREAM on the SQL instance that you want to put to the BLOB.
This was the first step, FILESTREAM is now successfully activated.
All further steps requires SharePoint to be installed properly and that a Web Application has already been created. The Content Database in this case I created by PowerShell:
Now the new content database (in this case “WSS_Content_Blob_001”) has to be prepared for use with FILESTREAM.
Open a query and execute the statement below. Replace “C:\Blobstore“ by your storage-path. The directory must not exist when executing the statement, otherwise an error will be given. For easier reference, just copy the text below
use [WSS_Content_Blob_001] if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database [WSS_Content_Blob_001] add filegroup RBSFilestreamProvider contains filestream
use [WSS_Content_Blob_001] alter database [WSS_Content_Blob_001] add file (name = RBSFilestreamFile, filename = 'c:\Blob_001') to filegroup RBSFilestreamProvider
Now the direcory for the Blobstore has been created in “C:\Blob_001”
Next you have to download the EXE for RBS, and it has to be copied to each Web Frontend Servers & in App Servers (please, do not rename the file). During all the following steps mind checking the log files for errors.
[We executed this command in App Server1 & App Server2]
msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content_Blob_001" DBINSTANCE="DC" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
The script has created a few tables in the database, check if they are existing:
The result should show the RBS tables. This may take a while.
As one last step you have to tell SharePoint that the content database uses RBS. To do that you have to execute the following command:
Since all has been prepared we can check the functionality. Just create a site collection and make sure the content database used is “WSS_Content_Blob_001”. (or whatever you chose during install).
Documents below 100 kB will not be put to the file system but will be stored in the database.
If you want to configure more than one content database for RBS, all the steps above have to be executed. The only difference is the command in step 5. This one dies not work, and no RBS tables are created. Therefore use the command below:
msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=WSS_Content_Blob_002 FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=CD
Info about Backup:
If a content database is set to use the SQL FILESTREAM remote BLOB storage (RBS) provider, the RBS provider must be installed both on the database server that is being backed up and on the database server that is being recovered to.