The officially official Devuan Forum!

You are not logged in.

#1 2020-03-19 14:46:28

Terence
Member
From: Munich / Germany
Registered: 2018-03-20
Posts: 33  

Devuan on native ZFS-Root

Dear dev1ers,

i have installed Kubuntu 18.04 in VB with native ZFS-Root following those instructions and works.

Now, trying to do the same with Devuan_Ascii_DVD.iso /expert install) not working, maybe has not "ubuquity"? Maybe is configured different? Anyway, as soon appear the possibility to access the "bash-terminal" and bevore "partitioning"... the bash don't let me use "apt", "apt-get" to install "zfsutils".

I don't know if the "desktop-live.iso" allow me that ==> "ubiquity" (if any) is working like under Kubuntu but... for me is anyway unusefull because I need the DVD for installing KDE & OpenRC too.

Can you provide me some link-s with reliable and easy to understand instructions on how to do this? Please consider, I'm only user/newbee.

Considering the readed posting on the web and here in forum... appear ZFS more stable, fast and resistent to attacks too. Please consider, for next Devuan (maybe 3.0) to add the option of installing the OS on native ZFS-Root, here is a adaptable program, I read also about some Proxmox-packages that allow a kind of "webmanaging-GUI" for ZFS, maybe can be ported to Devuan.

That could be great for Linux-acquainted-users want build a own server completely on ZFS-basis, of-course could be great to backport "zfsutils" 0.8 to Devuan (if possible).

Other instruction I read are for Xenial (16.04), I read also these here and these.

P.S.: For me is coming the time to abbandone completely the *ubuntu-family and make our family-systems secure and fast, please for your help!

Thanks in advance and best regards. Terence

Offline

#2 2020-03-19 17:57:58

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Devuan on native ZFS-Root

I've used this guide to install Debian stretch on ZFS:

https://github.com/openzfs/zfs/wiki/Deb … oot-on-ZFS

It should also work for Devuan if you use one of their live images.

Not very n00b-friendly though smile

And note that ZFS is a total memory hog, you'll need at least 16GiB if you want to enable de-duplication...

EDIT: ZFS can't be added as an official option because of licensing issues, Ubuntu are playing with fire offering it as they do.

Last edited by Head_on_a_Stick (2020-03-19 17:59:37)


Brianna Ghey — Rest In Power

Offline

#3 2020-03-22 14:11:49

Terence
Member
From: Munich / Germany
Registered: 2018-03-20
Posts: 33  

Re: Devuan on native ZFS-Root

Good morning ladies & gentleman's,

now I try a couple of days to get Devuan 2.1 up and running with ZFS in the Virtualbox with no good results, but enabling EFI and try acces the "shell" as soon as permitted I learn a lot... e.g. "ash" as shell, "nano" as editor...

I tray even other OS's like Kubuntu 20.04 but reading this... it appear to be a big problem with "SystemD", also no chance, hence I abandon finally waste of time with this.

Due the fact "FreeNAS" & co. use "OpenRC" as "Init-System", it appear to me, as absolutely new regarding "BSD", but acquainted with some Linux-commands... I have the only possibility with Devuan + OpenRC + KDE.

Reading the above article it appear to be a must to set up much more "Data-Sets" as I previously expect, if it's necessary!? I don't know!

Finally i found this Devuan on ZFS and the "LUKS-Cryprosetup" look very good even if by reading linked article is not clear if "/boot" should have own extra partition or not, here, apparently not. Anyway, since I have 0,5 TB NVMe for the OS and UEFI (extra partition), but, these instructions (can) works by installing "desktop-ISO" (GTK), by "DVD-ISO" too? I will see.

Here my Hardware:
- MB one of latest PCI-3e
- CPU 8 core 16 Threads
- RAM 64 GiB (8-banks)
- NVMe 512 MiB
- GPU 8 GiB PCI-3e
- Data-HDD 4 TiB Sata3

Here my wish:
- Devuan "latest stable" 2.1
- ZFS on whole system, excluding "EFI-partition"?
- LUKS-Cryptosetup, excluding "EFI-partition"?
- OpenRC (parallelized)
- KDE as DE

Here my questions:
1. Why dividing "/" (root) from "/home" under "LUKS"?
2. Why dividing "/" (root) from "/home" under "ZFS"?
3. Do I need an extra "/boot"-partition even if I have EFI?
4. What sould be necessarily "snapshotted" with ZFS and what not?
5. ZFS don't need "Swap" but Devuan?. A "Swap-file" instead of partition? how do it? Ones ZFS up and runnig delete "Swap" and "entry" in "/etc/fstab"?
6. Which version of ASH is in Devuan 2.1? Could I get a link with command-list?
7. Want use "GPT", is "parted" OK? Under point "5." is a link that mention "--script", is a selfmade scripts or standard in "parted"?

Thanks again and sorry for silly questions from my side.

Offline

#4 2020-03-22 15:28:55

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: Devuan on native ZFS-Root

I don't know anything about zfs, but I can answer a few of your questions. I did ask someone who uses zfs to take a look at this thread, and he suggests using partitions instead of whole disk for zfs. There is no longer a performance hit for using partitions.

/home separate from the OS partition is a good idea for several reasons. You are less likely to fill up '/' if you keep your user's files separate. It can also make reinstall easier.

swapfile works fine in devuan.
I use the following to make a 256MiB swapfile:

dd if=/dev/zero of=/path/to/swapfile bs=1024 count=262144
mkswap /path/to/swapfile

Change the count if you want a bigger swapfile. Add it to fstab to use it.
Swap is not necessary. You can boot and run the system without it as long as you have enough RAM. (You obviously do have enough.)

I recommend using a separate /boot partition. In ascii, it's possible to have the /boot directory as part of an encrypted root partition, but that doesn't work in beowulf. (Maybe it will by the time you want to upgrade, but that's a guess.)
Note: the /boot partition is not the same as the efi partition.

I've never used parted to make gpt partitions, but I think it should work. Gparted should also work. I usually do it with gdisk.

The desktop-live iso won't give you what you want. It installs a full XFCE desktop. Use one of the Installer isos. Netinstall iso, CD-1 or DVD will work.

Offline

#5 2020-03-22 15:56:34

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Devuan on native ZFS-Root

Terence wrote:

1. Why dividing "/" (root) from "/home" under "LUKS"?
2. Why dividing "/" (root) from "/home" under "ZFS"?

https://askubuntu.com/questions/142695/ … -partition

Terence wrote:

3. Do I need an extra "/boot"-partition even if I have EFI?

You need an EFI system partition but it doesn't need to be mounted at all. Most distributions mount it under /boot/efi but that's only actually needed when installing the bootloader. The grub-install(8) command can be directed to an EFI system partition mounted to an arbitrary location with the --efi-directory= option (which defaults to /boot/efi).

Terence wrote:

4. What sould be necessarily "snapshotted" with ZFS and what not?

You don't need the API filesystems (/proc, /sys & /dev) but you'll need everything else if you want a full system restoration to the snapshot.

Terence wrote:

5. ZFS don't need "Swap" but Devuan?.

Linux needs swap, it handles OOM events badly.

Terence wrote:

A "Swap-file" instead of partition? how do it?

ZFS doesn't support swap files, and they're a dirty hack anyway.

You can use a ZVOL as swap: https://github.com/zfsonlinux/pkg-zfs/w … wap-device

But it can lock up the system: https://github.com/zfsonlinux/zfs/issues/7734

Terence wrote:

6. Which version of ASH is in Devuan 2.1? Could I get a link with command-list?

Devuan uses dash but you can use busybox's version instead (busybox ash).

See the POSIX man page for the general usage: https://pubs.opengroup.org/onlinepubs/9 … es/sh.html

Or dash(1) for the specifics.

Terence wrote:

7. Want use "GPT", is "parted" OK? Under point "5." is a link that mention "--script", is a selfmade scripts or standard in "parted"?

The parted(8) command can handle GUID partition tables but I prefer gdisk with the sgdisk(8) scripting command. The --script option for parted(8) just allows for single commands instead of the interactive version.


Brianna Ghey — Rest In Power

Offline

#6 2020-03-25 17:36:14

dev-1-dash-1
Member
Registered: 2018-08-02
Posts: 99  

Re: Devuan on native ZFS-Root

Terence wrote:

Good morning ladies & gentleman's,
2. Why dividing "/" (root) from "/home" under "ZFS"?

In my opinion, if you're using ZFS (or BTRFS), there's one more reason to separate root and home partitions (besides the ones already mentioned):
If you make a snapshot of your root filesystem, and later want to rollback (maybe after you've broken something), they should be separate -
or else you will rollback your personal data (home) together with the system files on root file system. They should be decoupled.

3. Do I need an extra "/boot"-partition even if I have EFI?

I can't tell much about EFI, buy you almost never NEED, an extra /boot, but in my opinion it's always a good idea to have one - for example, grub doesn't support all filesystems that linux proper does, different versions of grub can or cannot read different filesystems, also you may boot a livecd for a rescue and have trouble unlocking your luks or importing zfs pool, so /boot should be a separate (smallish) partition, formatted with an fs that everyone can read. I recommend ext3 for /boot.

In early days of windows NT/XP, it was common practice to have a separate C: drive with a simple filesystem (FAT/FAT32), because not everyone could read NTFS back than.

The same logic applies today - it's generally more reliable if you have a separate /boot formatted with an fs everyone can read. But of course this depends on your particular needs and use case.

4. What sould be necessarily "snapshotted" with ZFS and what not?

Nothing is "necessarily" snapshotted with ZFS/BTRFS, you snapshot what you want.
I always snapshot the root filesystem after the first successful boot, and than before large upgrades or before making potentially breaking changes.
Since my /home is separate, I don't have to worry about my data/work being rolled back, and just operate on root.

[EDIT:] also keep in mind that if you do have extra /boot on a simple filesystem such as ext3, it's contents will NOT get snapshotted. You'll have to be careful with your boot files, or back the contents manually.

Debian based systems, including Devuan, do a good job of keeping an older, working copy of both your kernel and your initrd - thus there is seldom a need for backing up the full contents of /boot.
[End-EDIT]

If you're talking about a production server, there may be other specific cases where you must do snapshots.

5. ZFS don't need "Swap" but Devuan?. A "Swap-file" instead of partition? how do it? Ones ZFS up and runnig delete "Swap" and "entry" in "/etc/fstab"?

Good rule of a thumb is to make at least one swap partition, sized for example half of your ram. That will give you some breathing space.

Last edited by dev-1-dash-1 (2020-03-25 17:42:51)

Offline

Board footer