Re: Installing Debian root on ZFS mirror NetBoot

2019-04-01 Thread Reco
Hi.

On Mon, Apr 01, 2019 at 01:21:36PM +0300, Mimiko wrote:
> On 01.04.2019 09:40, Matthew Crews wrote:
> > On 3/31/19 11:20 PM, Mimiko wrote:
> > > On 01.04.2019 05:51, Matthew Crews wrote:
> > > > Step-by-step instructions are found here:
> > > > 
> > > > https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
> > > Hello.
> > > 
> > > I read this guide, but this implies to have a separate MD raid on disk.
> > > It is not fully /boot on ZFS.
> > > 
> > Erm, this guide walks you through the process of getting / root on ZFS,
> > though it does make you do a little extra legwork to set up a Z-RAID.
> > I've followed this guide myself for an encrypted ZFS setup on Debian
> > with my Laptop.
> > 
> > You are aware that ZFS does not use traditional MDADM, but rather
> > integrates the RAID functionality directly into the file system, right?
> > 
> 
> Yes, I know. In 2.2 is mentioned to partition disks. And in 2.3 ZFS pool is 
> created from partitions, not using full disks. And this is confusing me. Why
> create additional partitions not managed by ZFS?

Because you cannot boot from GPT drive unless you have:

- ef02 type partition for EFI
- ef00 type partition for BIOS

And, unlike its Solaris counterpart, ZOL's /sbin/zpool does not label disk by 
itself.

Reco



Re: Installing Debian root on ZFS mirror NetBoot

2019-04-01 Thread Mimiko

On 01.04.2019 09:40, Matthew Crews wrote:

On 3/31/19 11:20 PM, Mimiko wrote:

On 01.04.2019 05:51, Matthew Crews wrote:

Step-by-step instructions are found here:

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

Hello.

I read this guide, but this implies to have a separate MD raid on disk.
It is not fully /boot on ZFS.


Erm, this guide walks you through the process of getting / root on ZFS,
though it does make you do a little extra legwork to set up a Z-RAID.
I've followed this guide myself for an encrypted ZFS setup on Debian
with my Laptop.

You are aware that ZFS does not use traditional MDADM, but rather
integrates the RAID functionality directly into the file system, right?



Yes, I know. In 2.2 is mentioned to partition disks. And in 2.3 ZFS pool is created from partitions, not using full disks. And this is confusing me. 
Why create additional partitions not managed by ZFS?




Re: Installing Debian root on ZFS mirror NetBoot

2019-04-01 Thread Matthew Crews
On 3/31/19 11:20 PM, Mimiko wrote:
> On 01.04.2019 05:51, Matthew Crews wrote:
>> Step-by-step instructions are found here:
>>
>> https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
> 
> Hello.
> 
> I read this guide, but this implies to have a separate MD raid on disk.
> It is not fully /boot on ZFS.
> 

Erm, this guide walks you through the process of getting / root on ZFS,
though it does make you do a little extra legwork to set up a Z-RAID.
I've followed this guide myself for an encrypted ZFS setup on Debian
with my Laptop.

You are aware that ZFS does not use traditional MDADM, but rather
integrates the RAID functionality directly into the file system, right?



signature.asc
Description: OpenPGP digital signature


Re: Installing Debian root on ZFS mirror NetBoot

2019-04-01 Thread Mimiko

On 01.04.2019 05:51, Matthew Crews wrote:

Step-by-step instructions are found here:

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


Hello.

I read this guide, but this implies to have a separate MD raid on disk. It is 
not fully /boot on ZFS.



Re: Installing Debian root on ZFS mirror NetBoot

2019-03-31 Thread Matthew Crews
On 3/31/19 3:12 PM, David Christensen wrote:
> On 3/31/19 12:45 AM, Mimiko wrote:
>> Hello.
>>
>> I know that ZFS is not well supported as MD raids. All I've found on
>> internet on installing Debian on ZFS is using a live disk.
>>
>> My goal is to boot from network and install Debian root on ZFS raid
>> mirror. I can do this using MD raid. I am searching for suggestions of
>> how to enable ZFS during installing from network and partition disks
>> using ZFS.
>>
>> Any suggestion and ideas a welcome.
> 
> I migrated my SOHO file server to FreeBSD specifically for ZFS.  While
> FreeBSD rocks as a server OS, I find that graphical desktops are better
> on Debian.  On Debian, I use BTRFS.  I also use only one device for the
> system drive, and keep it small (16 GB SSD and USB flash drives) to
> facilitate taking, storing, and restoring images.
> 
> 
> David
> 

Step-by-step instructions are found here:

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



Re: Installing Debian root on ZFS mirror NetBoot

2019-03-31 Thread David Christensen

On 3/31/19 12:45 AM, Mimiko wrote:

Hello.

I know that ZFS is not well supported as MD raids. All I've found on 
internet on installing Debian on ZFS is using a live disk.


My goal is to boot from network and install Debian root on ZFS raid 
mirror. I can do this using MD raid. I am searching for suggestions of 
how to enable ZFS during installing from network and partition disks 
using ZFS.


Any suggestion and ideas a welcome.


I migrated my SOHO file server to FreeBSD specifically for ZFS.  While 
FreeBSD rocks as a server OS, I find that graphical desktops are better 
on Debian.  On Debian, I use BTRFS.  I also use only one device for the 
system drive, and keep it small (16 GB SSD and USB flash drives) to 
facilitate taking, storing, and restoring images.



David



Installing Debian root on ZFS mirror NetBoot

2019-03-31 Thread Mimiko

Hello.

I know that ZFS is not well supported as MD raids. All I've found on internet 
on installing Debian on ZFS is using a live disk.

My goal is to boot from network and install Debian root on ZFS raid mirror. I can do this using MD raid. I am searching for suggestions of how to 
enable ZFS during installing from network and partition disks using ZFS.


Any suggestion and ideas a welcome.



Re: root on ZFS

2018-09-12 Thread Matthew Crews
On 9/12/18 7:26 PM, David Christensen wrote:
>> The upcoming ZFS 0.8 will make LUKS unnecessary as it
>> will feature native ZFS encryption.
> 
> That will be a nice feature to have.  I wonder when it will make it into 
> Debian.

Good question. The ZFS package in Sid is still at 0.7.9, and upstream
stable is 0.7.10.

https://packages.debian.org/sid/zfsutils-linux
https://tracker.debian.org/pkg/zfs-linux
https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10




pEpkey.asc
Description: application/pgp-keys


Re: root on ZFS

2018-09-12 Thread David Christensen

On 09/12/2018 06:56 AM, Matthew Crews wrote:

On 9/11/18 5:30 PM, David Christensen wrote:


Matthew Crews has kindly posted what
appears to be the current work-around for Debian Stretch (no, I haven't
tried it):

  > See the ZFSOnLinux Wiki:

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


Grab a test box, a pair of SSD's, and give it a try.  Let us know how it
works out (or not).


I've also successfully installed Debian Stretch on a LUKS-encrypted ZFS
root partition. 


Okay.



The upcoming ZFS 0.8 will make LUKS unnecessary as it
will feature native ZFS encryption.


That will be a nice feature to have.  I wonder when it will make it into 
Debian.




1.  The easiest path that I have found for creating FOSS Un*x-like
systems with ZFS OOTB is FreeBSD.  Beware that the BSD userland and root
CSH are not GNU.


Aside from FreeBSD, the Antergos Linux installer also lets you install
ZFS on root. I'm not sure how they worked out the licensing for that
one, but technically its something the end user can already do.


Okay.



2.  I seem to recall that Ubuntu added ZFS OOTB a few years ago.  STFW,
it looks like they currently also have a ZFS work-around:

https://wiki.ubuntu.com/ZFS

  You might want to download the latest stable Ubuntu installer and
give it a try.


Ubuntu's installer does not allow ZFS on root. The procedure for Ubuntu
on ZFS root is largely the same as Debian, with a few Ubuntu-specific
tweaks.


Okay.


Thanks for the useful information!  :-)


David



Re: root on ZFS

2018-09-12 Thread Matthew Crews
On 9/11/18 5:30 PM, David Christensen wrote:

> But, people want ZFS-on-root on their Linux distribution of choice.  So, 
> people find and post work-arounds.  Matthew Crews has kindly posted what 
> appears to be the current work-around for Debian Stretch (no, I haven't 
> tried it):
> 
>  > See the ZFSOnLinux Wiki:
> 
>  https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
> 
> 
> Grab a test box, a pair of SSD's, and give it a try.  Let us know how it 
> works out (or not).

I've also successfully installed Debian Stretch on a LUKS-encrypted ZFS
root partition. The upcoming ZFS 0.8 will make LUKS unnecessary as it
will feature native ZFS encryption.

> 1.  The easiest path that I have found for creating FOSS Un*x-like 
> systems with ZFS OOTB is FreeBSD.  Beware that the BSD userland and root 
> CSH are not GNU.

Aside from FreeBSD, the Antergos Linux installer also lets you install
ZFS on root. I'm not sure how they worked out the licensing for that
one, but technically its something the end user can already do.

> 2.  I seem to recall that Ubuntu added ZFS OOTB a few years ago.  STFW, 
> it looks like they currently also have a ZFS work-around:
> 
>   https://wiki.ubuntu.com/ZFS
> 
>  You might want to download the latest stable Ubuntu installer and 
> give it a try.

Ubuntu's installer does not allow ZFS on root. The procedure for Ubuntu
on ZFS root is largely the same as Debian, with a few Ubuntu-specific
tweaks.





Re: ext2 for /boot ??? -- WAS: Re: root on ZFS

2018-09-12 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Sep 12, 2018 at 04:01:10AM +1000, Andrew McGlashan wrote:
> Hi,
> 
> On 11/09/18 22:48, Matthew Crews wrote:
> > My recommendation is to use a separate /boot partition and make it EXT2.
> 
> Why not at least ext3?  I don't baulk at ext4 btw for /boot -- I can
> never understand why ext2 is recommended when ext4 gives no trouble and
> has other advantages, even ext3 has journaling that ext2 does not.

FWIW I tend to use ext4 without journal. And since the questions have
come up in this thread...

 - why no journal?
   It takes up space; it adds complexity. And it won't
   be there when you most need it anyway -- i.e. when
   GRUB tries to access it.
   But these are my two cent and mine alone. You can
   have 'em if you don't complain :-)

The other tendency here "ext2 is very old, don't use it" -- hm. I think
this is exaggerated. Ext2 is fine and stable for this use, and I don't
see any downsides (yet). Perhaps the day file system code gets significant
strengthening against malformed FS images, and *if* ext2 is left behind
in that effort... but it seems we're not there yet.

Cheers
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAluYxPIACgkQBcgs9XrR2kZ4fACfdLFpkbOdDWQ6U1DUFkmJFNAX
0LQAniadg1mnCvt/bA7QgmJNa4O24OVr
=735R
-END PGP SIGNATURE-



Re: root on ZFS

2018-09-11 Thread Mimiko

On 11.09.2018 15:48, Matthew Crews wrote:

My recommendation is to use a separate /boot partition and make it EXT2.


I'm planning on using ZFS as software raid on which I'll create vols. So it 
might be ext2, ext3, ext4.



Re: root on ZFS

2018-09-11 Thread David Christensen

On 09/11/2018 01:42 AM, Mimiko wrote:

Hello.

Currently I use ZFS for making a pool of disks, but the system itself is 
installed on 2 SSD disks using MD to mirror.


How is now ZFS on handling booting from ZFS mirror. Can I start use ZFS 
as root filesystem on latest Debian? Is it stable on updates?


Thanks for suggestions.



Hello!  :-)


I have desired ZFS-on-root OOTB on Debian GNU/Linux stable for many years.


As you may already know, the ZFS license and the Linux license do not 
play nice together.  Thus,  many (most?) Linux distributions do not 
provide ZFS-on-root OOTB.



But, people want ZFS-on-root on their Linux distribution of choice.  So, 
people find and post work-arounds.  Matthew Crews has kindly posted what 
appears to be the current work-around for Debian Stretch (no, I haven't 
tried it):


> See the ZFSOnLinux Wiki:

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


Grab a test box, a pair of SSD's, and give it a try.  Let us know how it 
works out (or not).



David




1.  The easiest path that I have found for creating FOSS Un*x-like 
systems with ZFS OOTB is FreeBSD.  Beware that the BSD userland and root 
CSH are not GNU.



2.  I seem to recall that Ubuntu added ZFS OOTB a few years ago.  STFW, 
it looks like they currently also have a ZFS work-around:


https://wiki.ubuntu.com/ZFS

You might want to download the latest stable Ubuntu installer and 
give it a try.







Re: ext2 for /boot ??? -- WAS: Re: root on ZFS

2018-09-11 Thread Michael Stone

On Wed, Sep 12, 2018 at 04:01:10AM +1000, Andrew McGlashan wrote:

On 11/09/18 22:48, Matthew Crews wrote:

My recommendation is to use a separate /boot partition and make it EXT2.


Why not at least ext3?  I don't baulk at ext4 btw for /boot -- I can
never understand why ext2 is recommended when ext4 gives no trouble and
has other advantages, even ext3 has journaling that ext2 does not.


The only reason to use ext2 would be to maximize compatability. I don't 
think that's a particularly compelling reason, OTOH a fsck on /boot 
shouldn't really take long anyway, so it probably won't hurt much.


Mike Stone



Re: ext2 for /boot ??? -- WAS: Re: root on ZFS

2018-09-11 Thread Matthew Crews
My thought process is that there's no reason for any advanced features in /boot 
since it should rarely change (aside from the occasional kernel or driver 
update).

That said, theres no real harm in using a different filesystem for /boot, such 
as ext3, ext4, btrfs, etc., so long as your bootloader (ie GRUB) can read files 
from it.

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

 Original Message 
On Sep 11, 2018, 11:01, Andrew McGlashan wrote:

> Hi,
>
> On 11/09/18 22:48, Matthew Crews wrote:
>> My recommendation is to use a separate /boot partition and make it EXT2.
>
> Why not at least ext3? I don't baulk at ext4 btw for /boot -- I can
> never understand why ext2 is recommended when ext4 gives no trouble and
> has other advantages, even ext3 has journaling that ext2 does not.
>
> Kind Regards
> AndrewM

ext2 for /boot ??? -- WAS: Re: root on ZFS

2018-09-11 Thread Andrew McGlashan
Hi,

On 11/09/18 22:48, Matthew Crews wrote:
> My recommendation is to use a separate /boot partition and make it EXT2.

Why not at least ext3?  I don't baulk at ext4 btw for /boot -- I can
never understand why ext2 is recommended when ext4 gives no trouble and
has other advantages, even ext3 has journaling that ext2 does not.

Kind Regards
AndrewM



Re: root on ZFS

2018-09-11 Thread Matthew Crews
On 9/11/18 5:17 AM, Mimiko wrote:
> My question is more about if I should use ZFS as boot, or stick with old MD 
> raid. Would not ZFS booting break if an update to zfs will be applied?

If you intend on using ZFS RAID, do a ZFS RAIDZ pool and not MDADM. ZFS
handles all of the functions of RAID management and is generally
superior to MDADM.

> Right now sometimes ZFS mounts are not imported automatically on
> system reboot. And I must manually do zfs import. So I am worried that
> this will happen before booting the system and I will have to use some
> recovery.

This shouldn't be a problem if you set up your ZFS / root partition and
various pools and datasets correctly.

-Matt




Re: root on ZFS

2018-09-11 Thread Matthew Crews
On 9/11/18 2:04 AM, to...@tuxteam.de wrote:
> On Tue, Sep 11, 2018 at 11:42:43AM +0300, Mimiko wrote:
>> Hello.
>>
>> Currently I use ZFS for making a pool of disks, but the system itself is 
>> installed on 2 SSD disks using MD to mirror.
>>
>> How is now ZFS on handling booting from ZFS mirror. Can I start use ZFS as 
>> root filesystem on latest Debian? Is it stable on updates?
>>
>> Thanks for suggestions.
> 
> Your question is still a bit unclear: do you want to have just the
> _root_ partition as ZFS? That should be easy, just booting a kernel
> which understands ZFS and can mount that as /.
> 
> Do you also want to have the _boot_ partition there? I.e. that
> partition where the kernel images and the initramfs go. Then your
> boot loader (most probably GRUB?) also should be able to understand
> ZFS -- at least to a certain extent. GRUB can read ZFS since 1.99.
> The one current in Debian stable is 2.02 -- so your chances seem
> good on both fronts...

I'm not sure about the /boot partition, but its not difficult to get
your / partition on ZFS. See the ZFSOnLinux Wiki:

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

My recommendation is to use a separate /boot partition and make it EXT2.

-Matt




Re: root on ZFS

2018-09-11 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Sep 11, 2018 at 03:17:11PM +0300, Mimiko wrote:
> On 11.09.2018 12:04, to...@tuxteam.de wrote:
> >>Hello.
> >>
> >>Currently I use ZFS for making a pool of disks, but the system itself is 
> >>installed on 2 SSD disks using MD to mirror.

[...]

> >Do you also want to have the_boot_  partition there? [...]

> Thank you for response.
> 
> I don't know how I will do it. But since GRUB in Debian understands ZFS, then 
> I may be do the second.
> 
> My question is more about if I should use ZFS as boot, or stick with old MD 
> raid. Would not ZFS booting break if an update to zfs will be applied?
> 
> Right now sometimes ZFS mounts are not imported automatically on
> system reboot. And I must manually do zfs import. So I am worried
> that this will happen before booting the system and I will have to
> use some recovery.

Well, recovery might be more "interesting" if you have also
boot on ZFS :-)

I can't answer your second question, because I haven't any
experience with ZFS. By what you say, for me it'd be too
finnicky to put /boot and / on it. I'd keep your current
setup (unless you want to learn, and pay some price for it).

In the last case, I'd practice with recovery procedures
before Munrphy's Monster hits you.

Cheers
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAluXuQwACgkQBcgs9XrR2kZ5ZgCfdA2POhuwozhUTJBV7OVZKNef
pNgAnjBwEhpNF1JxvQZrGsj0ZvLyAMRJ
=zcfR
-END PGP SIGNATURE-



Re: root on ZFS

2018-09-11 Thread Mimiko

On 11.09.2018 12:04, to...@tuxteam.de wrote:

Hello.

Currently I use ZFS for making a pool of disks, but the system itself is 
installed on 2 SSD disks using MD to mirror.

How is now ZFS on handling booting from ZFS mirror. Can I start use ZFS as root 
filesystem on latest Debian? Is it stable on updates?

Thanks for suggestions.

Your question is still a bit unclear: do you want to have just the
_root_  partition as ZFS? That should be easy, just booting a kernel
which understands ZFS and can mount that as /.

Do you also want to have the_boot_  partition there? I.e. that
partition where the kernel images and the initramfs go. Then your
boot loader (most probably GRUB?) also should be able to understand
ZFS -- at least to a certain extent. GRUB can read ZFS since 1.99.
The one current in Debian stable is 2.02 -- so your chances seem
good on both fronts...



Thank you for response.

I don't know how I will do it. But since GRUB in Debian understands ZFS, then I 
may be do the second.

My question is more about if I should use ZFS as boot, or stick with old MD 
raid. Would not ZFS booting break if an update to zfs will be applied?

Right now sometimes ZFS mounts are not imported automatically on system reboot. And I must manually do zfs import. So I am worried that this will 
happen before booting the system and I will have to use some recovery.




Re: root on ZFS

2018-09-11 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Sep 11, 2018 at 11:42:43AM +0300, Mimiko wrote:
> Hello.
> 
> Currently I use ZFS for making a pool of disks, but the system itself is 
> installed on 2 SSD disks using MD to mirror.
> 
> How is now ZFS on handling booting from ZFS mirror. Can I start use ZFS as 
> root filesystem on latest Debian? Is it stable on updates?
> 
> Thanks for suggestions.

Your question is still a bit unclear: do you want to have just the
_root_ partition as ZFS? That should be easy, just booting a kernel
which understands ZFS and can mount that as /.

Do you also want to have the _boot_ partition there? I.e. that
partition where the kernel images and the initramfs go. Then your
boot loader (most probably GRUB?) also should be able to understand
ZFS -- at least to a certain extent. GRUB can read ZFS since 1.99.
The one current in Debian stable is 2.02 -- so your chances seem
good on both fronts...

Cheers

https://bits.debian.org/2016/05/what-does-it-mean-that-zfs-is-in-debian.html
https://salsa.debian.org/zfsonlinux-team/zfs
https://tracker.debian.org/pkg/zfs-linux
http://lists.gnu.org/archive/html/info-gnu/2011-05/msg8.html

- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAluXhSEACgkQBcgs9XrR2kZwaQCeIbK7VdDM3wt5eEx+IOnDY1ij
La0An08yIVCY3UOhQ1k1WPk1uWjMxJK8
=HWvX
-END PGP SIGNATURE-



root on ZFS

2018-09-11 Thread Mimiko

Hello.

Currently I use ZFS for making a pool of disks, but the system itself is 
installed on 2 SSD disks using MD to mirror.

How is now ZFS on handling booting from ZFS mirror. Can I start use ZFS as root 
filesystem on latest Debian? Is it stable on updates?

Thanks for suggestions.