Let's fix Arch!

I’m about 50 lines into a zfs configuration script right now.

Do we want to include swap?

2 Likes

Nah. ? I have been forgoing swap on all systems with 16gb or more the last year and been fine. Can always swap on a file later if need be

6 Likes

So, I’m feeling super n00b. In

zpool create -f zroot /dev/disk/by-id/id-to-partition-partx

WTF is id-to-partition-partx ? The UUID?

image

So it might look a bit different, but these are disks and partitions.

For example, say I partitioned my 970 EVO per wendell’s spec above, you’ll have the following:

nvme-Samsung_SSD_970_EVO_500GB_S466NX0KA78735A
nvme-Samsung_SSD_970_EVO_500GB_S466NX0KA78735A-part1
nvme-Samsung_SSD_970_EVO_500GB_S466NX0KA78735A-part2
nvme-Samsung_SSD_970_EVO_500GB_S466NX0KA78735A-part3

with part1 being 1GB, part2 20GB, part3 is the rest of the disk.

You’ll need to do that first.

If you need a tool to help you, use sgdisk <disk>

Oh wow, I think I ran into that exact problem, but didn’t recognize what really going on.

1 Like

That’s because Oracle owns ZFS so people don’t want to wait for Larry Ellis to get a bug up his ass and start suing people like he did Google.

https://wiki.archlinux.org/index.php/ZFS

Due to potential legal incompatibilities between CDDL license of ZFS code and GPL of the Linux kernel ([2],CDDL-GPL,ZFS in Linux) - ZFS development is not supported by the kernel.

It’s certainly not philosophical, but I do worry about issues with support in the future for ZFS.

I know that ZFS is very good at restoring data, but other than that I can’t really find much information about it’s advantages.
Do you have some links for me to read up on the positives? I simply haven’t been able to find anything other than it’s ability to handle bit errors and restoration of files.

Antegros is the best arch derivative in my opinion since like fedora it definitely focuses more on FOSS

The holiest filesystem is ZFS tbch… compression… snapshots… native caching… actual direct SAS and my favorite… data scrubbing

1 Like

Yeah i noticed it when doing one of my less favourite pastimes; watching installers. Very often when it started on filesystems it would crash, the odds of this happening increased substantially if there was a lvm partition on the disk. Pretty much guaranteed.
Probably a calamares thing, i mean everyone complains about anaconda but that one does not fuck up on something fundamental like filesystems.

The FreeBSD handbook has everything you need to know and then some:

https://www.freebsd.org/doc/handbook/zfs.html

Can someone explain to me what we are doing here? I’m on Arch and Manjaro too and am interested.

From my Understanding, the goal is to set up pacman to automatically create a ZFS Snapshot on any operation/system updates and have that latest version available at boot automatically? Is this close to the plan?

I’m just as confused - Arch user myself.

Didn’t know that ZFS didn’t work on Arch. I was under the impression that you just had to add a repo or AUR package to get it to work because of license issues. Have been thinking of trying out ZFS on my desktop (only running it in freenas ATM).

Thinking about trying this out in a vm or spare pc this weekend to see what’s wrong and needs to be done.

recreating snapper on manjaro (btrfs) but for zfs on arch.

2 Likes

Im a bit late here, but yes Antergos is the best arch derivative for new users.

(there is also archlabs, which is awesome but is a step up in the setup process)

1 Like

Does snapper auto create a new entry in the boot menu to boot back to an old and writeable clone of the snapshot?

It’s very iffy. I never got boot environments to work properly.

2 Likes

After Leap (with regards to OpenSUSE) I believe this was default behavior. On my brothers install of Mint they provide you the option when you use BTRFS.

I don’t think I have an option like that on my Manjaro install though.

Oh gosh, the big man replied to me :blush:

Im sorry in my tiredness i wrote manjaro instead of opensuse or Arch.
Also while snapper makes the snapshots it is snap-pac-grub that adds the snapshots to grub
snapper-grub

Snap-pac-grub does on Arch but it is not as clean as on opensuse.
As after you boot into a read only snapshot, you need to restore the desired snapshot as a new snapshot and edit your grub to boot the new snashop. And then reinstall grub.
These steps are not needed on opensuse where you just restore and then reboot: snapper rollback && reboot
This is default with btrfs on opensuse, And when you are done installing that is snapshot number 1.
And the moment you install something a new snapshot is made. No configuration needed.

While i am running this setup on Arch, I have no experience with opensuse and my comment is based on this video where he shows the difference how Arch with snapper + snap-pac-grub tries to obtain the same functionality and then shows how flawless and easier it would be on opensue:

Edit this video includes installing the packages and configuring it to work on Arch. And testing rollbacks on both Arch and Opensuse.

4 Likes

I like btrfs for mirroring. But that’s about it. This is more awesome than the documentation implies. Thanks for the write-up this is very handy.

4 Likes