New laptop: need advice on choice of file system types

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

New laptop: need advice on choice of file system types

Tom Browder
I have used ext4 for many years while I have been watching zfs and
btrfs being developed. I am now considering using one or both on at
least one partion during my upcoming new Debian installation.

Can anyone recommend either one for a normal (non-developer,
non-hobbyiest) user who does backups and values his data and wants
reasonable reliability?

Thanks,

-Tom

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Dan Ritter-4
Tom Browder wrote:
> I have used ext4 for many years while I have been watching zfs and
> btrfs being developed. I am now considering using one or both on at
> least one partion during my upcoming new Debian installation.
>
> Can anyone recommend either one for a normal (non-developer,
> non-hobbyiest) user who does backups and values his data and wants
> reasonable reliability?

If you want to experiment, having root on ext4 and /home on ZFS
is pretty easy to accomplish.

ZFS for root is too difficult to recommend to a casual user
today, but I expect that to change in a version or two.

-dsr-

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Tom Browder
On Fri, Apr 12, 2019 at 11:43 AM Dan Ritter <[hidden email]> wrote:
...
> If you want to experiment, having root on ext4 and /home on ZFS
> is pretty easy to accomplish.

Dan, I'm not trying to be obtuse, but when you say "experiment," do
you mean taking it for a ride like a new car where one has to learn
new controls in a reliable vehicle, or flying in a local home-built
experimental aircraft?  ;-D

-Tom

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Default User
In reply to this post by Dan Ritter-4


On Fri, Apr 12, 2019, 12:43 Dan Ritter <[hidden email]> wrote:
Tom Browder wrote:
> I have used ext4 for many years while I have been watching zfs and
> btrfs being developed. I am now considering using one or both on at
> least one partion during my upcoming new Debian installation.
>
> Can anyone recommend either one for a normal (non-developer,
> non-hobbyiest) user who does backups and values his data and wants
> reasonable reliability?

If you want to experiment, having root on ext4 and /home on ZFS
is pretty easy to accomplish.

ZFS for root is too difficult to recommend to a casual user
today, but I expect that to change in a version or two.

-dsr-



And what about Btrfs?

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Brian
In reply to this post by Tom Browder
On Fri 12 Apr 2019 at 12:13:09 -0500, Tom Browder wrote:

> On Fri, Apr 12, 2019 at 11:43 AM Dan Ritter <[hidden email]> wrote:
> ...
> > If you want to experiment, having root on ext4 and /home on ZFS
> > is pretty easy to accomplish.
>
> Dan, I'm not trying to be obtuse, but when you say "experiment," do
> you mean taking it for a ride like a new car where one has to learn
> new controls in a reliable vehicle, or flying in a local home-built
> experimental aircraft?  ;-D

That is exactly what he means.

--
Brian.

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Felix Miata-3
In reply to this post by Tom Browder
Tom Browder composed on 2019-04-12 09:50 (UTC-0500):

> I have used ext4 for many years while I have been watching zfs and
> btrfs being developed. I am now considering using one or both on at
> least one partion during my upcoming new Debian installation.

Because of its snapshotting, BTRFS requires considerably more space than older
filesystems, as much as double.

> Can anyone recommend either one for a normal (non-developer,
> non-hobbyiest) user who does backups and values his data and wants
> reasonable reliability?

IMO it boils down to which you prefer:

1-sticking with what works, familiarity, finding web search answers easily?

or

2-replacing paradigms, learning new stuff?

It seems rather unusual to see any LVM user not recommend LVM.

As a member of the over-60 class, I prefer sticking with what works for me. I only
moved from EXT3 to EXT4 about 4 years ago, when I moved from 32bit to 64 bit.
LVM's extra layer(s) would render my backup/restore system that depends in large
part on cloning useless.
--
Evolution as taught in public schools is religion, not science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Thomas D Dial-3
In reply to this post by Dan Ritter-4
On Fri, 2019-04-12 at 12:43 -0400, Dan Ritter wrote:

> Tom Browder wrote:
> > I have used ext4 for many years while I have been watching zfs and
> > btrfs being developed. I am now considering using one or both on at
> > least one partion during my upcoming new Debian installation.
> >
> > Can anyone recommend either one for a normal (non-developer,
> > non-hobbyiest) user who does backups and values his data and wants
> > reasonable reliability?
>
> If you want to experiment, having root on ext4 and /home on ZFS
> is pretty easy to accomplish.
>
> ZFS for root is too difficult to recommend to a casual user
> today, but I expect that to change in a version or two.

I'll second this recommendation, with two additional comments. First,
there is a good set of instructions for installing with root on ZFS at

https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS

that, if followed carefully and accurately, is very likely to result in
a successful install, including LUKS encryption and root on ZFS. I have
been testing one such on a VM for several months and plan shortly
install on an old (2011) Apple Macbook. My only deviations were to omit
encryption and to use Buster, rather than Stretch, as the target. I
think at the time I did it that may have given me a later version of
ZFS, and it was clear that Buster would become the new stable version
around the time I wanted to use ZFS for real.

The install process described there is straightforward, and it includes
the steps needed if you want to encrypt the file systemsbut very much
hands on. I don't think I would call it difficult as much as requiring
careful attention to detail while carrying out a fairly lengthy
procedure. It is possible to cut and paste many of the commands, but
they must be edited carefully for the target environment.

If you have a new and untouched machine, it would be an excellent
opportunity to try this without really risking anything but time and
maybe frustration.

Second, ZFS comes with a significant learning curve and differs a bit
from more traditional and common file systems used in Linuxland,
including those used with LVM. LVM adds a layer to management; ZFS
changes management quite a bit, although generally for the better. The
Oracle documentation for their commercial ZFS, though, is available on
their web site and generally usable with openzfs, although incompletely
because the later features of Oracle ZFS are not available.

ZFS for /home makes sense, especially for anyone not already somewhat
familiar with ZFS.

Regards,
Tom Dial

>
> -dsr-

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Dan Ritter-4
In reply to this post by Tom Browder
Tom Browder wrote:
> On Fri, Apr 12, 2019 at 11:43 AM Dan Ritter <[hidden email]> wrote:
> ...
> > If you want to experiment, having root on ext4 and /home on ZFS
> > is pretty easy to accomplish.
>
> Dan, I'm not trying to be obtuse, but when you say "experiment," do
> you mean taking it for a ride like a new car where one has to learn
> new controls in a reliable vehicle, or flying in a local home-built
> experimental aircraft?  ;-D

ZFS is like learning to drive an 18-wheel truck after you have
lots of experience in cargo vans: you're certain that it can do
all sorts of things very reliably, and if you mess it up, you
will feel that it's entirely your own fault for not reading
and/or getting good advice first.

E.g.: when you set up an ext4fs on a laptop, you trust that mkfs
has, if not optimal defaults, certainly reasonable defaults.
"zfs create" has reasonable defaults, but the prerequisite
"zpool create" does not. Read carefully, and figure out what
ashift setting you want before you run anything.

-dsr-

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Dan Ritter-4
In reply to this post by Default User
Default User wrote:
> On Fri, Apr 12, 2019, 12:43 Dan Ritter <[hidden email]> wrote:
 
> And what about Btrfs?

I don't currently recommend it in any situation where ZFS is an
option. That comes from 2 years of working with btrfs where
doing normal maintenance ended up destroying data more than
once. It may be better now; I haven't looked back.

-dsr-

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Default User


On Fri, Apr 12, 2019, 18:07 Dan Ritter <[hidden email]> wrote:
Default User wrote:
> On Fri, Apr 12, 2019, 12:43 Dan Ritter <[hidden email]> wrote:

> And what about Btrfs?

I don't currently recommend it in any situation where ZFS is an
option. That comes from 2 years of working with btrfs where
doing normal maintenance ended up destroying data more than
once. It may be better now; I haven't looked back.

-dsr-



Dan, thanks for the feedback.  

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Curt
In reply to this post by Thomas D Dial-3
On 2019-04-12, Thomas D Dial <[hidden email]> wrote:
>
> ZFS for /home makes sense, especially for anyone not already somewhat
> familiar with ZFS.

Well, if ZFS is this big sixteen-wheeler that you might crash into the
concrete embankment if you're not careful, what are the benefits that
outweigh or override these risks for the casual Linux enthusiast, when
she can just drive an easy default ext4 automatic vehicle and know
she'll get from here to there safely without worrying about it?

> Regards,
> Tom Dial
>
>>
>> -dsr-
>

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Dan Ritter-4
Curt wrote:

> On 2019-04-12, Thomas D Dial <[hidden email]> wrote:
> >
> > ZFS for /home makes sense, especially for anyone not already somewhat
> > familiar with ZFS.
>
> Well, if ZFS is this big sixteen-wheeler that you might crash into the
> concrete embankment if you're not careful, what are the benefits that
> outweigh or override these risks for the casual Linux enthusiast, when
> she can just drive an easy default ext4 automatic vehicle and know
> she'll get from here to there safely without worrying about it?

ZFS is not for the casual, right now. For example, my father has
been using Debian for more than 15 years now, but he's never
typed a sudo command without explicit instruction from me. He
just wants to use his computer. If I put him on a ZFS system, I
would continue to manage it for him the way I manage his ext4
backups right now.

The data management concerns that prompted the creation of ZFS are
increasingly within the scope of normal hardware purchases.  People are
buying drives that perform like sports cars and have the capacities of
trucks. Unlike a commercial truck or a fancy sports car, ZFS is free. So
it can make sense to more people to spend the time necessary to learn
how to drive it properly.

ZFS unifies disk management, storage allocation, RAID, caching, data
safety, snapshotting, compression and deduplication. The simpler your
scenario, the less attractive ZFS is.

For a single-disk workstation, ZFS offers flexible filesystem allocations
(/home and /var can share the disk without either one being limited by
a partition size), on-the-fly compression, checksumming of all data,
and a live scrub (fsck) method that fixes any issues without taking your
system offline. There's also the possibility of snapshotting the system
for recovery or backup over the network. Snapshots are extremely fast
and can be done automatically via cron.  Zsend/zrecv are snapshot-aware.

For a 2-4 disk desktop, ZFS does all that plus RAID1, RAID10, or improved
RAID5 variants (RAIDZ1 through Z3).

For a multi-disk server, add in a separate intent log (write cache), read
cache, and possible deduplication. (Dedupe is a giant RAM hog,
however, and very difficult to turn off if you haven't prepared
properly.)

In the near future, ZFS adds native encryption.

-dsr-

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Anders Andersson
In reply to this post by Felix Miata-3
On Fri, Apr 12, 2019 at 11:36 PM Felix Miata <[hidden email]> wrote:
>
> Tom Browder composed on 2019-04-12 09:50 (UTC-0500):
>
> > I have used ext4 for many years while I have been watching zfs and
> > btrfs being developed. I am now considering using one or both on at
> > least one partion during my upcoming new Debian installation.
>
> Because of its snapshotting, BTRFS requires considerably more space than older
> filesystems, as much as double.

A btrfs snapshot takes approximately zero space. Where did you get
this idea from?

Reply | Threaded
Open this post in threaded view
|

Re: New laptop: need advice on choice of file system types

Anders Andersson
In reply to this post by Tom Browder
On Fri, Apr 12, 2019 at 4:51 PM Tom Browder <[hidden email]> wrote:
>
> I have used ext4 for many years while I have been watching zfs and
> btrfs being developed. I am now considering using one or both on at
> least one partion during my upcoming new Debian installation.
>
> Can anyone recommend either one for a normal (non-developer,
> non-hobbyiest) user who does backups and values his data and wants
> reasonable reliability?

I've used btrfs on every machine for a many years, and I'm very happy
with it. Run it on my server with various disks, desktop, and laptop.
It has saved my data from silent corruption due to bad hardware where
ext4 would just return bad data, and it's a breeze to take very quick
backups thanks to the snapshot and btrfs-send functions. You just have
to learn the new tools.

I've replaced disks more or less live on my sever and it works well.

I'm not going to play with hacking in a non-native filesystem. ZFS is
great if you run FreeBSD, but I run debian main and prefer not to
support contrib and non-free.

Reply | Threaded
Open this post in threaded view
|

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

Felix Miata-3
In reply to this post by Anders Andersson
Anders Andersson composed on 2019-04-13 17:31 (UTC+0200):

> Felix Miata wrote:

>> Because of its snapshotting, BTRFS requires considerably more space than older
>> filesystems, as much as double.

> A btrfs snapshot takes approximately zero space. Where did you get
> this idea from?

(not an exhaustive list)

1: "Disk Space Full Because of Snapper" on https://en.opensuse.org/SDB:BTRFS

2: Since 2015, BTRFS has been the default / filesystem on openSUSE, which
recommends minimum / filesystem size of 20GB for EXT4, compared to 40GB for BTRFS.

3: Much more common / filesystem freespace exhausted threads on mailing lists and
web forums from BTRFS users compared to EXT4 users, with the usual recommendation
to delete one or more snapshots to free space.

4: https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_I_ran_out_of_disk_space.21

5: https://btrfs.wiki.kernel.org/index.php/FAQ#Why_is_free_space_so_complicated.3F

6:
https://www.linuxquestions.org/questions/linux-containers-122/docker-on-btrfs-using-much-space-in-var-lib-docker-btrfs-4175622037/#post5811463
--
Evolution as taught in public schools is religion, not science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

Reply | Threaded
Open this post in threaded view
|

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

deloptes-2
Felix Miata wrote:

> Anders Andersson composed on 2019-04-13 17:31 (UTC+0200):
>
>> Felix Miata wrote:
>
>>> Because of its snapshotting, BTRFS requires considerably more space than
>>> older filesystems, as much as double.
>
>> A btrfs snapshot takes approximately zero space. Where did you get
>> this idea from?
>
> (not an exhaustive list)
>
> 1: "Disk Space Full Because of Snapper" on
> https://en.opensuse.org/SDB:BTRFS
>
> 2: Since 2015, BTRFS has been the default / filesystem on openSUSE, which
> recommends minimum / filesystem size of 20GB for EXT4, compared to 40GB
> for BTRFS.
>
> 3: Much more common / filesystem freespace exhausted threads on mailing
> lists and web forums from BTRFS users compared to EXT4 users, with the
> usual recommendation to delete one or more snapshots to free space.
>
> 4:
>
https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_I_ran_out_of_disk_space.21
>
> 5:
>
https://btrfs.wiki.kernel.org/index.php/FAQ#Why_is_free_space_so_complicated.3F
>
> 6:
>
https://www.linuxquestions.org/questions/linux-containers-122/docker-on-btrfs-using-much-space-in-var-lib-docker-btrfs-4175622037/#post5811463

This time I like you :) and agree with you fully.

ext4 or xfs - these are most convenient, although also zfs might be an
option if one can manage it

regards

Reply | Threaded
Open this post in threaded view
|

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

Peter Wiersig
In reply to this post by Felix Miata-3
Felix Miata <[hidden email]> writes:

> Anders Andersson composed on 2019-04-13 17:31 (UTC+0200):
>
>> Felix Miata wrote:
>
>>> Because of its snapshotting, BTRFS requires considerably more space than older
>>> filesystems, as much as double.
>
>> A btrfs snapshot takes approximately zero space. Where did you get
>> this idea from?
>
> 1: "Disk Space Full Because of Snapper" on https://en.opensuse.org/SDB:BTRFS

i only skimmed that, good resource for anyone even not on SUSE.

> 2: Since 2015, BTRFS has been the default / filesystem on openSUSE, which
> recommends minimum / filesystem size of 20GB for EXT4, compared to 40GB for BTRFS.

>From my experience I think they only use snapshotting on BTRFS volumes,
I don't know if they support it with LVM, but is it even possible with
ext4 only?

And yeah, no surprise, if you want snapshots, you'll need more capacity,
it would probably the same recommendation with LVM

And the effects of using snapshots is assuring, you simply set the
system to auto-update everything, and if your system doesn't boot, you
simply select the older snapshot from the grub menu and have your system
running in no time. (This was my scenario with a SUSE desktop, I tried
tumbleweed aka SUSEs unstable/experimental distribution, where some
instability was expected)

I would never recommend something like that for server updates/upgrades,
as there a other far more procedures you can follow to test verify and
prevent service loss on failed updates, if you simply cluster your
services.

I would be pissed if my OS removes snapshots I might or might not need
in the future.  That's a release critical bug in my eyes.  Yeah, I know
Microsoft and Apple do that automatically if your capacity runs out, but
that's also why I don't recommend them at all.

Have a monitoring on all your systems, track each and every possible
value in compact rrd databases, calculate trends from those values and
you'll never be surprised by filled up disks, growing defects detected
by SMART etc.

I'd like a debian desktop/notebook/tablet where snapshots were
implemented in a openSUSE manner, so that I can simply forget about
updates, have them installed in background und can go to the snapshot if
problems arise.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

Peter Wiersig
Peter Wiersig <[hidden email]> writes:
>
> I would be pissed if my OS removes snapshots I might or might not need
> in the future.  That's a release critical bug in my eyes.  Yeah, I know
> Microsoft and Apple do that automatically if your capacity runs out, but
> that's also why I don't recommend them at all.

Ok, I checked https://en.opensuse.org/Portal:Snapper and they do support
LVM and ext4, and they have a bullet of auto-removing old snapshots.  I
hope they did it right, perhaps I need to make a new test drive with the
latest release.

Snapshots on ZFS can't be zero cost, so you need to account for them
there, too.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

Matthew Crews-2
On 4/13/19 5:40 PM, Peter Wiersig wrote:

> Peter Wiersig <[hidden email]> writes:
>>
>> I would be pissed if my OS removes snapshots I might or might not need
>> in the future.  That's a release critical bug in my eyes.  Yeah, I know
>> Microsoft and Apple do that automatically if your capacity runs out, but
>> that's also why I don't recommend them at all.
>
> Ok, I checked https://en.opensuse.org/Portal:Snapper and they do support
> LVM and ext4, and they have a bullet of auto-removing old snapshots.  I
> hope they did it right, perhaps I need to make a new test drive with the
> latest release.
>
> Snapshots on ZFS can't be zero cost, so you need to account for them
> there, too.
>
> Peter
>

ZFS Snapshots are nearly zero cost to create the snapshot, since ZFS
(and likewise BTRFS) are copy-on-write file systems. What it does is
records the deltas after the snapshots.

This is a good thinkg as it saves on disk space.

For example:

You create a random 10 MB file, and take a snapshot. You then alter the
5 tail MBs and add five more MBs at the tail. You are left with:

Pre-Snapshot | 5MB chunk #1 | 5MB chunk #2 |  - total 10MBs
Post-Snapshot | 5MB chunk #1 | 5MB chunk #3 | 5MB chunk #4 | - total 15MBs

Actual disk usage will be 20 MBs, since the 5MB chunk #1 is only
recorded on disk once, not twice.

Here is a good talk on the subject by Michael Lucas, one of the premier
experts on ZFS. Its worth noting that a lot of the concepts apply to
BTRFS to varying degrees:

https://www.youtube.com/watch?v=x9A0dX2WqW8

-Matt

Reply | Threaded
Open this post in threaded view
|

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

Anders Andersson
In reply to this post by Felix Miata-3
On Sat, Apr 13, 2019 at 7:08 PM Felix Miata <[hidden email]> wrote:

>
> Anders Andersson composed on 2019-04-13 17:31 (UTC+0200):
>
> > Felix Miata wrote:
>
> >> Because of its snapshotting, BTRFS requires considerably more space than older
> >> filesystems, as much as double.
>
> > A btrfs snapshot takes approximately zero space. Where did you get
> > this idea from?
>
> (not an exhaustive list)
>
> 1: "Disk Space Full Because of Snapper" on https://en.opensuse.org/SDB:BTRFS
>
> 2: Since 2015, BTRFS has been the default / filesystem on openSUSE, which
> recommends minimum / filesystem size of 20GB for EXT4, compared to 40GB for BTRFS.
>
> 3: Much more common / filesystem freespace exhausted threads on mailing lists and
> web forums from BTRFS users compared to EXT4 users, with the usual recommendation
> to delete one or more snapshots to free space.
>
> 4: https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_I_ran_out_of_disk_space.21
>
> 5: https://btrfs.wiki.kernel.org/index.php/FAQ#Why_is_free_space_so_complicated.3F
>
> 6:
> https://www.linuxquestions.org/questions/linux-containers-122/docker-on-btrfs-using-much-space-in-var-lib-docker-btrfs-4175622037/#post5811463



Of course you will run out of space if you keep taking snapshots!
Btrfs never does this, but you can do it *manually* or with
third-party tools. When you take a snapshot, btrfs will keep
everything until it's deleted. That's why everyone says that if you
run out of space, you can delete snapshots. If the advise to the user
is to delete a snapshot, it is something that the user did *because*
they wanted to retain those files.

The "Snapper" user has *installed* a tool that takes snapshots all the
time - obviously you will run out of space because every file you
modify or delete will still be stored in its original version until
you remove the snapshot.

12