Re: Please help me resize my ext4 file system to size > 16TB
- Date: Wed, 14 Jun 2017 10:21:22 -0300
- From: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
- Subject: Re: Please help me resize my ext4 file system to size > 16TB
On Tue, 13 Jun 2017, R. Ramesh wrote:
> >That would be organizing your videos into N subdirectories and using new
> >filesystems for some of those. Each single filesystem will be smaller
> >than 16TB.
> >If that works with your use case, you could do that now.
> Thanks. In that case, is mke2fs -O 64bit is enough? Or do I need a bunch of
> other options to go with it like extent, extra_isize, etc. Can you tell me
> why xfs is better? Is it as stable as ext4? Will I be able to add dmcache or
> something similar as I create the new fs with xfs?
If you plan things so that *each* one of these filesystems will be
smaller than 16TB, plain mke2fs -t ext4 on your current system will do.
That's why I pointed it out as a solution you could use *now*...
OTOH, we will release the next Debian stable in about a week, and that
one supports ext4 >16TB out-of-the-box. It is *still* risky to
convert+resize an existing filesystem, of course.
NOTE: while Debian Stretch (the next stable) will autodetect it needs
64-bit mode when creating >16TB ext4 filesystems, if you want to create
a smaller one that could *grow* to >16TB, you likely have to specify "-O
As for XFS, it is just as stable as ext4. And the two of them are far
more stable than any of the other filesystems we support.
Where I *always* recommend to use a plain, *small* ext4 and _not_ XFS is
for /boot, because of the bootloader.
XFS has been designed for extremely large enterprise arrays, and has
supported very large singe filesystems and 64-bit everything for a lot
longer than ext4: were you using it, AFAIK your filesystem would have
been able to grow to >16TB in your current system.
OTOH, you cannot *shrink* a XFS filesystem, while ext4 can be shrunk
(backups required, of course). For multi-stream video, XFS works very
well, but so does ext4. And you won't be doing heavily multi-threaded
enterprise-IO on a DVR...
XFS is a bit more averse to power cuts/hangs/crashes than ext4. It
won't corrupt the *filesystem* (modulo kernel bug, bad RAM, or bad HDD),
but if you were writing to a file, chances are that specific file will
end up full of zeroes more likely than in ext4.
If trouble does happen, ext4 fsck is considered best-in-class. The one
for xfs (xfs_repair) is quite good, but not as comprehensive.
dmcache is not that safe. That said, while I don't know why you'd need
it, nowadays (as in: on an up-to-date stable/longterm kernel) it should
work the same with ext4 and XFS. If in doubt, keep using ext4.
> I have about 14TB over 4 disks. I will backup on to them and recreate
> a newfs and copy them back. I do not like the downtime as that means
> my DVR does not work for 4 days, at least, as copying will have to be
> over usb3.
If you want to use a *single* >16TB new filesystem on your _current_
system, you will have to use XFS. Hint: don't mess with mkfs.xfs
options, it almost always does a better job when left to its
If you want to use multiple filesystems on your _current_ system, pick
the one you are already familiar with, and which is supported on your
system: 32-bit ext4.
If you are willing to wait a week and upgrade your system to the next
Debian stable (in that case, backup the *entire* thing, should the
updated system not work as a DVR to your liking), you will have the
choice of XFS or 64-bit ext4.