Backup Oracle Database from MS Windows using UNC to Oracle Database Appliance (Samba / CIFS) and Oracle CloudFS

Every customer will help us to build up additional knowledge (in other words, they request something you haven't done or needed somewhere else before).

My actual customer has bought two Oracle Database Appliances, ODA X7-2 HA, and they are migrating all Oracle databases with different versions from the old, VMWare based, Windows environment to the ODA (Virtualized Platform).

After the successful deployment of the ODAs in the customers vlan (maybe worth another post) the question was, how to put the things from the old environments to the ODAs.

Secure copy (scp/Puttys pscp) is ok, but either you need to install putty everywhere or you need to map all server drives at your client and (p)scp all to the ODAs,... not really a fun task.
Also you have an additional step if you create e.g. the RMAN backup locally at the Windows server and then (p)scp it to the ODA. You know it's an additional step which means (down) time and money, so we wanted to avoid this for the time of the migration.
As nfs was not a solution (due to some internal configuration issues) we thought about creating a direct connection between the ODAs and the Windows servers.

CloudFS is a nice feature of ACFS (not only) on the ODAs, but it can't be used without some additional configuration to map a drive at the Windows Server or to use UNC from  RMAN or as directory for Datapump Exports to the ODA.

The customer wants to allow the Windows Server for the time of the migration of all databases to write from any machine directly (without to set any user/password) to the CloudFS on the ODA X7-2 HA, so we had to configure Samba (smb) at the ODA.

If you may need it, here are the steps you can walk through if you want to use CloudFS within UNC paths or if you need to map the CloudFS directory from the ODA to your Windows Server without user/password.
  1. Ensure, that CloudFS is configured and sized right to have enough space for your files. Typically, CloudFS is created when the ODA_BASE is deployed, but you can skip this step. If you have skipped it, you can create CloudFS using the asmca (ASM Configuration Assistent) or you can do it manually. I didn't need it, but I think Matthew described in his cloudfs post very well, how to do it if you don't want to use asmca. Even resize can be done very easy by following this oracle support note.

    To check the existence and the size of your CloudFs, run
    df -h /cloudfs

    CloudFS is mapped on both ODA nodes to /cloudfs. Owner:group should be oracle:oinstall.

  2. Configure Samba at the ODA_BASE (as root), part GLOBAL
    You need to edit the smb.conf file which is located at /etc/samba:
    vi /etc/samba/smb.conf

    Skip to - roundabout - line 100 (Standalone Server Options). There you can see this configuration:
        security = user
        passdb backend = tdbsam

    Change this (even if it's marked deprecated to use security = share) to:
       security = share
       passdb backend = tdbsam
       guest account = oracle


  3. Configure Samba on both nodes with the name and the rights of your share.
    Now it's time to bring your share configuration into the smb.conf file. At approx. line 255 the "Share Defnitions" part starts. There you do need to put in the configuration for your share. The part in [ ] is the name you later see if you use your Windows explorer - so it's the public name of the share: We named it ODAPROD_CLOUDFS, but typically only CLOUDFS is enough.

    [ODAPROD_CLOUDFS]
    comment=cloudfs files
    path=/cloudfs
    browsable=yes
    public = yes
    writable = yes
    printable = no


    After you have inserted this write the smb.conf and quit from vi.

  4. Copy the smb.conf to second node
    To be able to use the share "high available" later on, copy the changed smb.conf from your local nodes /etc/samba/smb.conf to the second node using scp.

  5. Start / Stop the Samba Service on both nodes.
    You need to start the service at both nodes manually.
    To do this, connect as root to ODA_BASE on both nodes and run
    service smb start

    If you want to stop the Samba share, you can run
    service smb stop

  6. Test UNC path from Windows
    You can now test the connection. Open a File Explorer Window at MS Windows. Then you should be able to use the share. Don't use the node names to connect to the share, use the SCAN name of the system, so you are able to use the share even if one of the nodes is not available, e.g. while reboot.

    In my case, we can now use the UNC path from Windows without to specify a user/password to write into /cloudfs at the ODA using in Windows explorer:
    \\ODA-SCAN\ODAPROD_CLOUDFS

    You could also map the share as drive in Windows using the net use command.

    Now we can make backups from the Windows server direct to the ODA, using e.g.
    backup database format '\\ODA-SCAN\ODAPROD_CLOUDFS\%U';

    In addition, we don't need to install putty on all windows servers to pscp e.g. the VM templates for the application VMs we want to use at the virtualized platform.

Some remarks:
  • As this configuration don't need a username and password, you should start and stop the smb service explicitly - don't let it run all the time, start it when needed and stop it if you have put everything onto the ODA.
    It's a question of security and you sure don't want that someone uses the storage of the ODA to put some photos or videos on and share it. 
  • If you need the cloudfs share as a long term solution, use the standard configuration with security, add your share to the smb.conf and map the drive on the MS Windows systems you need it.
  • I don't have registered the smb service to the cluster infrastructure (as it is - in our case - only started when needed). If you want to keep the smb share(s) (so SMB is automatically started after ACFS/databases/...) you can configure that - the solution would be: crsctl add resource
    An example can be found (for Samba) at the documentation of Oracle (this link is for version 12.1)

ODA X7-2 HA ILOM configuration using serial cable

We were setting up an Oracle Database Appliance (ODA) X7-2 HA at a customers site with 12.2.1.4.0 virtualized platform the last days.

One of the things that are a little bit strange is how to set up the ILOMs at the ODA nodes, if you don't have DHCP.

There were a couple of different possibilities until and including ODA X6-2 HA to set up the ILOM IP addresses and the ILOM hostnames.
  • Use DHCP on the ILOM copper interface. Typically, the ILOM network is a total separated network used only for managing servers. So, there isn't any DHCP in this part of the network.
  • VGA connector and usb keyboard using ILOM configuration at BIOS bootup. The Oracle Support note describing this approach is How to Setup the ILOM network for Pre-Deployment During BIOS Bootup (Doc ID 1393191.1), but unfortunately there isn't a VGA connector at the ODA X7-2 HA anymore (I think you could connect using an USB hub, but who has this kind of stuff in a Data Center??). I personally liked this approach with the older ODAs as you have a display and a usb keyboard somewhere at a data center..
  • Third is using a serial cable (USB to RJ45 - also often called Cisco Console Cable) - this is typically cheap and available at data centers and therefore now my preferred way of setting up the ILOM. This is the approach I do like second most.
  • Another way is using IPMItool - I have never tried this, because I never found the software - which I can install on my Windows laptop - within a minute or two searching.
    I only found some links inside of the documentation. If you may want to try it, you can download it (would be nice if you put the download link into a comment under this post - also if you already use it) and follow metalink note ILOM network configuration via ODA console (Doc ID 1936081.1). Would be nice to add your experience into your comment to this post in addition, so this is maybe helpful for others.
As my absolutely preferred method is not available anymore, I started using my console cable to setup the ILOM at the ODAs - because this also worked very well everytime we needed it.

I was really surprised as I wasn't able to connect to the ILOM.
Ok, I already knew that inside note ILOM configuration via Serial port (Doc ID 1395445.1)  COM1/COM9 was used and I needed to look at my device manager to find out, which COM port is assigned with my console cable to use with putty (for me it was COM7). But using 9600 baud, Data bits 1, Stop bits 1, Parity None and Flow Control XON/XOFF there were no chance to see anything except a green block.
Pressing Enter doesn't change the screen to a logon screen. Repowering the system at least showed us some junk characters. I was looking at some different ILOM documentations of Sun servers and still everything seems to be correct with my settings.

The solution was to set up the connection with 115200 Baud as connection speed. I first asked some guys which are also setting up ODAs from time to time and most of them didn't knew that. But then one gave me the right hint. So it was working now, I was able to connect to the ILOM as root and made my changes using all of these nice set /SP/network statements (even if some notes/documentation may told you, you can do them together, you can't, do separate lines for each setting). Afterwards I did my re-image to use the virtualized platform.
 
Later on, I was reading Note 1395445.1 again and guess what - I have found the hint that one should use 115200 if it is not working. But the hint is somewhere at least I wasn't looking in detail on it.
As I already new that COM1 will not work, I skipped to step 4 at the note. This is, where you have found YOUR COM port you need to use and try to connect to the ILOM. The screenshot there does not tell you anything about using 115200 - it is showing 9600 - and also the text does not give you any hint. No, testing with 115200 Baud was written on step 2 - the step where told to set up 9600 baud and you need to follow step 3 to find out the right COM port. Also afterwards, I have found a note for Sun Server X5-2 which tells that 115200 is the right ILOM speed (Doc ID 2095378.1).

Lessons learned? I will start reading support notes from the beginning again, even if (I think) I know what's in step 1-3. Especially, if I have done things often before. It's a little bit like they change the right of way or a speed limit at a route you use daily to drive to work...