let me be clear:

some time ago… i lost a ext4 filesystem on a prosumer QNAP nas…. (the taiwaneese are packing too much software on those things anyway – it is not supposed to fly to the moon – just store files reliably).

also: extundelete does not undelete well under ext4 – under ext3 it does 😀

also: maybe not scientifically correct test – but the amount of bytes you can store also varies.

that’s what i WILL NOT RECOMMEND EXT4 to you!

IF YOU CAN STAY WITH EXT3 for the NEXT 2020 UNTIL EXT4 WILL BECOME MATURE

STABILITY AND SAFETY IS MORE IMPORTANT THAN ANYTHING ELSE.

SO I WOULD ALSO RECOMMEND YOU TO DO RAID1 (2x HDs, SAME SIZE) OR RAID6 (where 2x drives can fail with no dataloss but you will need 5HDs)

RAID6 IS NOT „BETTER“ THAN RAID1, IT CAN ONLY STORE MORE STUFF. But it seems like RAID1 is the only Raid-Level that is properly implemented? (!?!?!? http://www.zdnet.com/article/why-raid-6-stops-working-in-2019/ )

I think no matter in business or in private scenarios, RAID1 WITH 3x DISKS + EXT3 (linux mdadm software can do that and works reliable) should be used in combination with a simple, reliable filesystem like ext3 and regular automatic filesystem checks.

So if one disk fails – you still have two disks holding the same data – so you are not in a hurry to replace the broken disk – it can take up to 1-3 days to sync a raid1 of 2TB disks.

If you are only using two disks for RAID1 and during that 1-3 days sync period another harddisk fails – you are screwed – unless you have a backup of the backup. 😀

In addition to this i would recommend backing your stuff up automatically via internet. But this is a different difficult topic which should be possible with rsync which is capable of transfering deltas even of larger files. (instead of re-transmitting the whole file, it transmits only the bits that have changed).

http://dwaves.de/2016/04/18/linux-automatic-filesystem-check-on-reboot-every-sunday/

MY RECOMMENDATION: WHO CARES IF THE NAS IS DOING A AUTOMATIC REBOOT AT SUNDAY 3 o’CLOCK IN THE MORNING AND CHECKING 2-3TB OF EXT3 FILESYSTEM? NO ONE!

SO WHO CARES ABOUT THE FILESYSTEM CHECK DELAY ON BOOT, IF IN RETURN, YOU WILL HAVE A RELIABLE FILESYSTEM.

RELIABILITY SHOULD BE THE TOP1 PRIORITY OF ANY FILESYSTEM.

MAYBE SPEED CAN BE SECOND, UNLESS YOU DO NOT CARE ABOUT DATA-LOSS. (temporary storage… but believe me… even a temporary storage contains important files that users feel very angry about if lost)

So what you SHOULD do is let your filesystem (no matter what system) be checked automatically and monthly/weekly.

some say:

„Home users can relax though. Home RAID is a bad idea: you are much better off with frequent disk-to-disk backups and an online backup like CrashPlan or Backblaze.“

i say… yes: Windows 7 in-build RAID1 functionality… failed me once (Win 7 Ultimate) but runs well on another machine.

The nasty thing: If it goes out of sync… it will not even notify you about that thing.

If the Win7-Software-Raid1 fails… it might be tricky to get it back working.

http://www.zdnet.com/article/why-raid-6-stops-working-in-2019/

ZFS

Zettabyte File System – this is what oracle-datacenters use, was donated by Oracle to the linux project.

It is a 128Bit filesystem developed by Jeff Bonwick

It is more than just a file system – it includes functionality of a logical volume manage (lvm2), software-RAID capabilities and copy-on-write.

ZFS accroding to this site is even +10% faster than hardware-RAID.

Oracle is using it on their Solaris OS which again runs on Sun’s SPARC systems.

So from database to hardware to filesystems – Sun and Oracle do it all.

I have no hands-on-experience with ZFS, but it seems to be a new concept, that is aiming at datacenter’s and datacenters only 😀

You will need at least 2GB of RAM to run it properly… otherwise it might CRASH!? A SSD is recommended as it seems to do „hybrid-drive“ stuff (combining RAM, SSD and SATA to one big drive… using RAM and SSD for caching and SATA for storage…  )

You should have „real“ professional server hardware if you use ZFS:

„#1 Yes you should be using ECC ram for using ZFS.. It’s in all the literature.. You do risk your whole pool if you have corruption without ECC..

#2 yes.. Motherboard.. CPU and RAM should be ECC..“

https://en.wikipedia.org/wiki/ECC_memory

https://forums.freenas.org/index.php?threads/need-help-to-pick-which-file-system-to-use.16489/

QNAP NAS are „prosumer“ devices that have no EEC-RAM.

XFS

XFS is a high performance journaling filesystem which originated on the SGI IRIX platform.

It is completely multi-threaded, can support large files and large filesystems, extended attributes,
variable block sizes, is extent based, and makes extensive use of Btrees (directories, extents, free space) to aid both performance and scalability.

Refer to the documentation at http://oss.sgi.com/projects/xfs/

comment by a reader: „UPS, battery-backed data caching, none of it matters. If you run XFS, it will burn you sooner or later. I have had 4 XFS systems in the last 2 years, every…single…one of them has failed.“

XFS was contributed to the Linux kernel by SGI and is one of the best filesystems for working with large volumes and large files.

XFS uses more RAM than other filesystems, but if you need to work with large files its performance there is well worth the penalty in memory usage.

XFS is not particularly ill-suited for desktop or laptop use, but really shines on a server that handles medium to large size files all day long. Like ext3, XFS is a fully journaled filesystem.

I have heard that using XFS is a good way to f*** up your system if the power goes out while it is doing stuff.

interesting that with xfs maximum amount of writable bytes vary – while the amount of storable bytes of the other filesystems stays constant – could this be due to xfs large write cache – which also means – only use it with a USV that properly shuts down your server in case of an power outage!!!.

http://arstechnica.com/civis/viewtopic.php?t=1169535

Centos7 is using it for root as well as /home data partition.

[root@CentOS7 user]# hostnamectl
 Static hostname: CentOS7
 Icon name: computer-vm
 Chassis: vm
 Machine ID: ad6f3410bf2346ec97a6fdc05dc4a607
 Boot ID: 2b2ed2a7485d4a108a215758025b4089
 Virtualization: microsoft
 Operating System: CentOS Linux 7 (Core)
 CPE OS Name: cpe:/o:centos:centos:7
 Kernel: Linux 4.12.0cuztom
 Architecture: x86-64

[root@CentOS7 user]# lsblk -fs
NAME    FSTYPE      LABEL UUID                                   MOUNTPOINT
cl-swap swap              750b159f-f6b6-43be-8da7-db083f1c3b9f   [SWAP]
└─sda2  LVM2_member       iNu4Bl-mBja-408f-hWVL-XDA4-18AY-RUN0ca
  └─sda
sr0
cl-home xfs               1e7fca88-bcad-4703-8a91-e3c2ab10c0e0   /home
└─sda2  LVM2_member       iNu4Bl-mBja-408f-hWVL-XDA4-18AY-RUN0ca
  └─sda
fd0
cl-root xfs               1789d6f8-54d5-4c16-bbd6-8f70f8697dab   /
└─sda2  LVM2_member       iNu4Bl-mBja-408f-hWVL-XDA4-18AY-RUN0ca
  └─sda
sda1    xfs               ae3de842-733e-44d0-8f62-edee1291d87f   /boot
└─sda

ext3 <- still (2017) recommended NAS, laptop, desktop

ext3 is the younger cousin of ext2.

It was designed to replace ext2 in most situations and shares much the same code-base, but adds journaling support.

In fact, ext3 and ext2 are so much alike that it is possible to convert one to the other on the fly without lose of data.

ext3 enjoys a lot of popularity for these reasons.

There are many tools available for recovering data from this filesystem in the event of catastrophic hardware failure as well.

ext3 is a good general purpose filesystem with journaling support, but fails to perform as well as other journaling filesystems in specific cases.

One pitfall to ext3 is that the filesystem must still go through this exhaustive check every so often.

This is done when the filesystem is mounted, usually when the computer is booted, and causes an annoying delay.

MY RECOMMENDATION: WHO CARES IF THE NAS IS DOING A AUTOMATIC REBOOT AT SUNDAY 3 o’CLOCK IN THE MORNING AND CHECKING 2-3TB OF EXT3 FILESYSTEM? NO ONE!

SO WHO CARES ABOUT THE FILESYSTEM CHECK DELAY ON BOOT, IF IN RETURN, YOU WILL HAVE A RELIABLE FILESYSTEM.

RELIABILITY SHOULD BE THE TOP1 PRIORITY OF ANY FILESYSTEM.

MAYBE SPEED CAN BE SECOND, UNLESS YOU DO NOT CARE ABOUT DATA-LOSS. (temporary storage… but believe me… even a temporary storage contains important files that users feel very angry about if lost)

So what you SHOULD do is let your filesystem (no matter what system) be checked automatically and monthly/weekly.

or better: every time on boot by

touch /forcefsck

i never had any major issues with ext3. so stick with it 🙂

limits:

  • maximum amount of files:
    • The maximum number of inodes (and hence the maximum number of files and directories) is set when the file system is created.
      • If V is the volume size in bytes, then the default number of inodes is given by V/213 (or the number of blocks, whichever is less), and the minimum by V/223.
      • The default was deemed sufficient for most applications.
    • max number of subdirectories in one directory is fixed to 32000.

ext4

ext4 is the latest in the ext series of filesystems.

It was designed to build upon ext3 with new ideas on what filesystems should do.

While Slackware supports ext4, you should remember that this filesystem is still very new (particularly in file system terms) and is under heavy development.

If you require stability over performance, you may wish to use a different filesystem such as ext3.

With that said, ext4 does boast some major improvements over ext3 in the performance arena, but many people don’t yet trust it for stable use.

reiserfs

reiserfs is one of the oldest journaling filesystems for the Linux kernel and has been supported by Slackware for many years.

It is a very fast filesystem particularly well suited for storing, retrieving, and writing lots of small files.

Unfortunately there are few tools for recovering data should you experience a drive failure, and reiserfs partitions experience corruption more often than ext3.

JFS

IBM’s journaled file system technology, currently used in IBM enterprise servers, is designed for high-throughput server environments, key to running intranet and other high-performance e-business file servers.

JFS was contributed to the Linux kernel by IBM and is well known for its responsiveness even under extreme conditions.

It can span colossal volumes making it particularly well-suited for Network Attached Storage (NAS) devices.

JFS’s long history and thorough testing make it one of the most reliable journaling filesystems available for Linux.

btrfs

Btrfs is a new copy on write filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration.

SUSE12 is using it on /root partition where it creates daily read-only-snapshots of your operating system.

For data partition they use xfs:

suse12:/home/user # hostnamectl
   Static hostname: suse12.domain
Transient hostname: suse12
         Icon name: computer-vm
           Chassis: vm
        Machine ID: fe6bf561a4d4f20df6176faf58fdd5b5
           Boot ID: 861d2df8a4f5405e82f6ec0c8e8d23b5
    Virtualization: microsoft
  Operating System: SUSE Linux Enterprise Server 12 SP2
       CPE OS Name: cpe:/o:suse:sles:12:sp2
            Kernel: Linux 4.4.21-69-default
      Architecture: x86-64

suse12:/home/user # lsblk -fs
NAME  FSTYPE LABEL UUID                                 MOUNTPOINT
fd0
sda1  swap         3da1ea6f-d0eb-436b-9937-1b3f5667914d [SWAP]
└─sda
sda2  btrfs        550d46ea-ad14-464c-b019-aa4ec5a10613 /var/log
└─sda
sda3  xfs          986b9f95-b3a1-441e-92a4-98b7a500166b /home
└─sda
sr0

 

f2fs

F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File System (LFS).

source of inspiration: http://slackbook.org/beta/#id320403

should i raid1 my swap as well?

If you are using RAID1 you won’t lose half your swap, only one of the two mirrors. The worst case here is you’ll lose any performance benefit you might otherwise have gained. If you have two separate swap areas on the individual drives the kernel will use both in a fashion similar to RAID0 (if they have the same priority set) or JBOD (if priorities differ, using the top priority area until full then the next) so if one of the drives dies your system is likely to fall over as soon as any access to the swap area(s) is needed. This is why swap spaces usually live on the RAID1 volumes – it is simply safer and that is more important than performance usually.

http://serverfault.com/questions/195839/where-should-my-swap-partition-s-live-when-using-software-raid1-performance-lv

Speed:

changes with use-case and filesystem-version… keep an eye on:

simple dd benchmark inside a virtual machine – http://dwaves.de/2017/07/07/gnu-linux-what-filesystem-can-store-more-bytes-storage-efficiency-harddisk-space-utilization-dd-benchmark-in-virtual-machine/

https://openbenchmarking.org/s/File-System <- a lot of data but not well structured… confusing.

http://www.phoronix.com/scan.php?page=article&item=linux_311_filesystems&num=3

http://www.linux-magazine.com/Issues/2014/165/Choose-a-Filesystem/(language)/eng-US

pyhton based many small files benchmarks: http://dwaves.de/2014/12/10/linux-harddisk-benchmark/

Links:

http://dwaves.de/2017/07/06/gnu-linux-what-filesystems-does-my-kernel-support/

http://dwaves.de/2017/05/15/why-xfs/

Videos:

(in German) https://media.ccc.de/v/froscon2016-1821-a_short_history_of_linux_filesystems

admin