ZFS on Linux does not have a critical mass following, whatever that may be. ZFS will effectively lock you in. The underlying format is incompatible with rescue disks, and distributions for which you will find ZFS is rare.
I would tend to overlook these limits due to my bias towards ZFS. You may want to google for a service provider that provides SmartOS/ZFS based Cloud housting.
Linux file systems ext3/ext4 and probably various others do allow for dynamic growing. The volume manager built into Linux, LVM, also allows you to dynamically expand volumes onto new disks. For anything other than experimentation this would have to be the current best Linux recommendation, though that would change once ZFS got a critical mass following on Linux.
The process for Linux + LVM + ext3 is:
Example: LVM volume group myvg, mounted volume name uservol1, and disk device in Linux is /dev/sdf
- Allocate the disk to the VM. (in Amazon Management Console, Create
the EBS volume, write down its ID, and allocate it to the instance)
- The EC2 instance should have some udev rules for creating the device
node. So you should see a new disk in /dev/sd* ... Log in on the
instance and check that the EBS volume is visible, eg fdisk -l
/dev/sdf, cat /proc/partitions, run blkid.
- Create partition table if needed:
fdisk / sfdisk
- Initialize for LVM use:
pvcreate /dev/sdf
- Add the disk (physical volume) to the LVM volume group
vgextend
myvg /dev/sdf
- Grow the Volume size:
lvextend -L +1024G /dev/myvg/uservol1
- Grow the ext3/ext4 file system:
resize2fs /dev/myvg/uservol1
- Check (
df -h
) and you should see that the mounted file system now
have more space.
QED.
What really matters when dealing with ZFS pools and datasets portability is their versions. You can always import a pool using a version less or equal to the one your OS supports, and the same rule applies for datasets (i.e. file systems, zvols and snapshots).
So if you plan to move ZFS pools from some OSes to different ones, make sure you select the largest common version for pools, file systems and zvols you want to share. eg:
zpool create -o version=28 -O version=5 ...
Beware too that the Open Source branch of ZFS introduced "feature flags" which, when enabled, make the pools incompatible with Solaris. They set the pool version to 5000. On the other hand, feature flags were designed to allow some flexibility when moving a pool to an OS not supporting some features.
About architectures, ZFS objects are written using the native bit ordering of the platform. This is not a problem as all ZFS implementations are able to read both big endian and little endian objects. The endianness is stored along with all data structures. There is then no issue importing a pool from say x86 to SPARC and reciprocally.
Finally, you might have issues when dealing with pools built on non whole disks. The target OS must be able to understand the source disk partitioning. The worst case scenario would be if you create a pool based on plain files (which is not recommended outside testing) and the file system used cannot be mounted on the target platform.
Best Answer
ZFS is not in the official Linux kernel, and never will be unless Oracle relicenses the code under something compatible with the GPL.
This incompatibility is disputed. The main arguments in favor of ZFS being allowed on Linux systems revolve around the so-called "arm's length" rule. That rule applies in this case only if ZFS is provided as a separate module from the kernel, the two communicate only through published APIs, and both code bases can function independently of each other. The claim then is that neither code base's license taints the other because neither is a derived work of the other; they are independent, but cooperate. Nevertheless, even under this interpretation, it means the ZFS modules must still be shipped separately from the Linux kernel, which is how we see it being provided today by Ubuntu.
Quite separately from the CDDL vs GPL argument, NetApp claims they own patents on some technology used in ZFS. NetApp settled their lawsuit with Sun after the Oracle buyout, but that settlement doesn't protect any other Linux distributor. (Red Hat, Ubuntu, SuSE...)
As I see it, these are your alternatives:
Use btrfs instead, as it has similar features to ZFS but doesn't have the GPL license conflict and has been in the mainline kernel for testing since 2.6.29 (released in January 2009).
The main problem with btrfs is that it's had a long history of problems with its RAID 5/6 functionality. These problems are being worked out, but each time one of these problems surfaces, it resets the "stability clock."
Another concern is that Red Hat have indicated that the next release of Red Hat Enterprise Linux will not include btrfs.
One of the reasons Red Hat is taking that position on btrfs is that they have a plan to offer similar functionality using a different technology stack they are calling Stratis. Therefore, another option you have is to wait for Stratis to appear, with 1.0 scheduled for the first half of 2018, presumably to coincide with Red Hat Enterprise Linux 8.
Use a different OS for your file server (FreeBSD, say) and use NFS to connect it to your Linux boxes
Use ZFS on FUSE, a userspace implementation, which works neatly around the kernel licensing issue at the expense of a significant amount of performance
Integrate ZFS on Linux after installing the OS.
The license conflict makes distributing the combined system outside your organization legally questionable. I am not a lawyer, but my sense is that, patent issues aside, distributing ZFS on Linux is about as worrisome as distributing non-GPL binary drivers (such as those for certain video cards) with the system. If one of these bothers you, the other should, too.
Switch to Ubuntu, which has been shipping ZFS kernel modules with the OS since 16.04. Canonical believes that it is legally safe to distribute the ZFS kernel module with the OS itself. You would have to decide whether you trust Canonical's opinion; consider also that they may not be willing to indemnify you if a legal issue comes up.
Beware that it is not currently possible to boot from ZFS with Ubuntu without a whole lot of manual hackery.
Incidentally, btrfs is also backed by Oracle, but was started years before the Sun acquisition. I don't believe the two will ever merge, or one be deprecated in favor of the other due to the license conflict and patent issue. ZFS is too popular to go away, but there will continue to be demand for a ZFS alternative.