0

I have a scenario where I have to use SAN storage for my Oracle Database installation single node production setup and need to keep Database configuration files on SAN. I am using Oracle VM manager to manage my Oracle Linux 7.5.

After attaching a SAN storage of capacity 1.2TB it was available & shown using 'fdisk -l' command. I have gone though different file systems viz ext2, ext3, ext4, xfs, ocfs2 etc and was little bit confused that time regarding which one should I use. However I have formatted the disk of 1.2TB using command 'mkfs.ext2 -b 4096 /dev/xvdc'. Everything is working fine and I am able to mount the disk /dev/xvc on my Linux Machine and have configured my database at SAN.

The question is whether it is fine to go with this file system i.e. ext2 in current production environment or should I plan to migrate it as ext3/ext4/xfs etc. If required then what could be the step wise process for migration?

Thanks Kumar

  • 1
    For Oracle, go with xfs – Rui F Ribeiro Aug 27 '18 at 14:35
  • Thanks! What if I already used ext2 and configured the database. How do I proceed for file system change? I am very much concerned about my data. – k10gaurav Aug 27 '18 at 14:43
  • 3
    Backup and restore... – Rui F Ribeiro Aug 27 '18 at 14:56
  • Thanks @Rui F Ribeiro! Backup and restore worked perfectly! – k10gaurav Aug 28 '18 at 13:51
2

Do not user ext2 or ext3 if you are planning to use files that are larger than about 40kB, as those filesystems use block tables and more than 10 blocks need indirect block tables. This slows random access to the file data, requiring multiples block reads for one file block. ext4 uses extents (i.e. the file blocks are listed as "starting with block number x and extends y blocks, then block x2 for y2 blocks"). This makes accessing the data a lot faster.

Additionally, ext3 and ext4 support journalling, which means that updates to the file system are first written to the journal, and only then is the filesystem updated. In short this means that recovery after an unexpected crash can be performed by checking the journal against the filesystem, instead of checking the entire filesystem. With 1.2TB checking the filesystem could take very, very long.

There are much more details to this, which can easily be found on the internet. Other filesystems such as xfs or jfs also have the advantages of ext4, each have their specific advantages and disavantages; ext2 is just about the worst filesystem to use.

The good news is that it is possible to convert ext2 to ext4. However old existing files will still use the inefficient block tables; new files will use the extent-based allocation. Google "ext2 to ext4" for many guides on doing this.

  • what would you suggest in my scenario using ext4 or xfs? – k10gaurav Aug 27 '18 at 17:22
  • I personally always use ext4, and have never been disappointed. However, Oracle Linux 7 uses XFS as its default filesystem, so that can't be a bad choice. From one item talking about Oracle Linux 7: "As opposed to the more popular EXT4 file system, XFS has one major advantage. It allows users to have 500 TB for the file system size, which is ten times more than what you would get with EXT4. The only drawback is that it only allows for 16 TB maximum file size." – wurtel Aug 28 '18 at 12:49
  • Done backup and restore and used XFS! – k10gaurav Aug 28 '18 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.