OFS and DBFS Questions (Oracle 12.2)

I pushed out some new articles yesterday.

The SecureFiles article is mostly links to other articles, but it was requested by a reader. In the process of doing that I noticed the new OFS feature in 12.2, which took me down a rabbit hole for a few days.

I try to keep the main website for how-to articles, and the blog is where I post more opinion-based stuff. I got some questions, related to the OFS article, so I thought I would give some answers/opinions here. I could be wrong! 🙂

Q: Isn’t this just renamed DBFS?

A: No. If you compare the objects created for a DBFS and OFS file system they are different. They still do the same job (represent a file system and hold files in BLOBs in the database), but they are distinct file systems. This is not a straight “re-brand” of DBFS.

In addition, OFS is both the name of a file server, the OFSD background process is the OFS server, and a specific type of database file system, the OFS file system. The OFS file system is “similar” to DBFS. The OFS server process can mount both OFS and DBFS file systems.

I think it’s important to remember to use the terms “OFS server” and “OFS file system” so that people understand what bit you are talking about. 🙂

Q: There are now two database file systems (OFS and DBFS). Which should I use?

A: In my opinion, if you are happy with the restriction that you can only create the file system objects in the root container, or a non-CDB instance, you should probably use the OFS file system. It’s marginally easier to create and I’m guessing that is what the developers of the OFS server would prefer you to use. 🙂 If this restriction is a problem, use DBFS to create a file system in a PDB or a non-sys user.

If you need HTTP(S), WebDav or FTP access to the file system, DBFS is a better choice as those features come “out of the box” with DBFS from 12.1 onward.

Pick the one that matches your use case.

Q: Will OFS eventually replace DBFS?

A: I have no idea. What I can say is DBFS has some enhancements in 12.2 (POSIX File Locking) and it does some stuff “out of the box” that OFS doesn’t (HTTP(s), WebDav and FTP). It also plays well with multitenant. I’ve tried it and it works the same in a 12.2 PDB as it does in 11gR2.

IMHO if the plan were to replace DBFS with OFS, OFS would need to play well with multitenant and have the HTTP(S), WebDav and FTP (or preferably sFTP) support.

Until stated otherwise, I’m going to assume they will coexist and each serve slightly different use cases.

Q: Automatic mounting of DBFS using FUSE through “/etc/fstab” is confusing because of timing issues. Is OFS better?

A: Yes. The problem with any kind of auto-mount of a database file system is the database must be up before the mount is attempted. If you get the timing wrong it doesn’t work. The great thing about OFS is the mount/unmount is controlled by the OFSD process, so file systems mounted with the “persist” option will be mounted on instance startup and unmounted on instance shutdown. Great! No timing issues!

You have to be aware of the potential issues around a manual unmount of the file system and the impact of a shutdown abort, but you test all your failure situations before going live right?

From my limited testing, this aspect of OFS server feels really solid. It did what it said it would. I have no examples of heavy usage to refer to at this time.

Q: Is OFS Server a NFS Server.

A: No it isn’t and I think the term “NFS in the database” from the documentation is confusing. A file system mounted by OFS server can be exported using a NFS server, allowing NFS access to the database file system (OFS or DBFS). The database itself is not acting as a NFS server. So what you have is the NFS server on the OS exporting the FUSE file system, which is held in the DB. I would give that more emphasis in the docs if it were me. This totally confused me, so I reached out on Twitter and Oracle came to the rescue, which was cool, but I don’t feel that should be necessary to get a DB feature working. 🙂

I think it’s cool you can export it using the OS NFS server, but that doesn’t make Oracle a NFS server. 🙂

Q: Any issues with the NFS over FUSE?

A: Once you throw the NFS server into the mix you get timing issues again. During my (rather limited) testing I’ve had a few issues that could only be fixed by restarting the NFS server on the OS. Once I did that everything was golden.

From a resilience perspective, I’m not sure how I feel about this. Remember, I’m new to this feature and I’m not a NFS guru either, so don’t let me put you off.

As a general point, there does seem to be a lot of posts on the interwebs of people having issues with NFS over FUSE, so I’m not how solid this is as a technology. It does work though. Like I said, I’m no expert!

Q: How do you “feel” about the new OFS feature?

A: I used iFS in Oracle 8i. It worked fine, but was a massive resource hog. I’ve used the “file system” in the XML DB repository for some basic file handling. It works fine. I’ve used DBFS for some minor things and it’s fine, provided you are careful with mounting it using FUSE. Having used OFS for a few days I “feel” like it is the cleanest experience of accessing a database file system from the database server. I like it. 🙂



Oracle Database File System (DBFS) Enhancements in Oracle 12c

Oracle 12c includes a really neat feature I first mentioned after Oracle OpenWorld 2012. You can now access your DBFS file systems over HTTP/HTTPS, FTP or WebDAV. I’ve been having a play with it over the last couple of days, so I thought I would write it up here.

This should be quite a welcome addition for those people on platforms other than Linux, who don’t get to use FUSE.

As mentioned in the article, WebDAV support under Windows 7 broken. Even the Oracle manual has a screen shot from Windows XP. I can’t believe Windows 7 has been out all this time and Microsoft have not bothered to fix it…




Oracle Database File System (DBFS) in Oracle 12c : WebDav Support?

On a yoga course a teacher said to the group, “Don’t try to remember everything I say. Some things will come back to haunt you later.”

So I was reviewing a couple of chapters of Marcelle Kratochvil‘s multimedia book and she mentioned DBFS. That jogged a memory of the DBFS demo stand at OOW12, where the guy told me that 12c will (probably) have WebDAV support for DBFS.

DBFS is a neat feature, but it’s a little frustrating if you are using any OS other than Linux because you are forced to use a client utility with limited functionality, rather than accessing it like a regular file system as you can on Linux using the FUSE project. If this WebDAV functionality does get released in 12c it will make it accessible from pretty much any OS or browser.

Not surprisingly, it uses the XML DB infrastructure, which has supported WebDAV since its introduction on Oracle 9i (here). I seem to remember hearing XML DB is a mandatory feature from Oracle 12c onward, which means you will be able to use DBFS on any database running 12c or above.

Remember, all this was prefixed with a Safe Harbor slide, so there are no guarantees this will make it to the production release…





Oracle Database File System (DBFS) in 11gR2…

I’ve been having a play with the DBFS functionality in 11gR2.

For the most part it is extremely simple. If you are working on Linux then it’s a really neat solution. On any other platform you are limited to using the dbfs_client tool, which is currently lacking a lot of functionality. Even so, it’s a good first step.

I am having a bit of trouble with the “/etc/fstab” mounting. I’ve included it in the article, with a warning that it isn’t working for me. If anyone has got it to work I would really appreciate some input on what I’ve got wrong. The documentation is a little sparse on this subject even with some digging around it’s proving difficult.

I’ll probably be witing another article on a different aspect of DBFS soon.