Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #231028

Re: Raid 1

From Linux-Fan <Ma_Sys.ma@web.de>
Newsgroups linux.debian.user
Subject Re: Raid 1
Date 2021-01-23 18:20 +0100
Message-ID <BAuJP-cJ-9@gated-at.bofh.it> (permalink)
References <BAd6h-6xo-11@gated-at.bofh.it> <BAd6h-6xo-9@gated-at.bofh.it> <BAqdc-5Ux-5@gated-at.bofh.it> <BAuJQ-cJ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

mick crane writes:

> On 2021-01-23 12:20, Andrei POPESCU wrote:
>> On Vi, 22 ian 21, 22:26:46, mick crane wrote:
>>> hello,
>>> I want to tidy things up as suggested.
>>> Have one old PC that I'll put 2 disks in and tidy everything up so what's
>>> scattered about is on the running disks and this new/old one is just backup
>>> for them.
>>> Can I assume that Debian installer in some expert mode will sort out the
>>> raid or do I need to install to one disk and then mirror it manually before
>>> invoking the raid thing ?

[...]

> Sigh, OK I take advice and have a go.
> Really I just want to get on and do some drawings or something but I think  
> I'll thank myself later if I get proper backup in place.
> If after having a quick look am I understanding anything?
> Partition and install minimal Debian with no X or anything on just one disk.
> install headers and zfs-utils.
> Add other disk and then what ? To make it a mirror pool (like raid1) does  
> zfs take care of the partitions.
> Do I want to delete all partitions on other disk first or make like for like  
> partitions?

If I get your scenario correctly you want to install Debian (without ZFS  
i.e. not "root on ZFS") and then create a ZFS mirror?

If yes, then as a preparation you need either (a) two entire devices of  
~ same size to use with ZFS or (b) two partitions to use with ZFS.

Say you install as follows:

 * sda1: OS
 * sda2: Swap
 * sda : XX GiB free

 * sdb: XX+ Gib free

Then prepare two unformatted partitions:

 * sda3: XX GiB "for ZFS"
 * sdb1: XX GiB "for ZFS"

and use these devices for ZFS.

> If that's done and I've made a zpool called  "backup" from then on the ZFS  
> is nothing to do with the kernel ?
> I ask kernel make a directory "my_pc1"
> then
> "zfs create -o mountpoint=/my_pc1 backup/my_pc1"

You can specifiy a mountpoint and it will be created automatically. No need  
to pre-create the Directory as with other file systems.

> I ask kernel make a directory "my_pc2"
> then
> "zfs create -o mountpoint=/my_pc2 backup/my_pc2"
>
> So then I can copy files from other PC (pc1) to "my_backup_pc/backup/my_pc1"  
> and ZFS mirrors the data to other disk in pool ?

Yes. In case you are unsure check the output of `zpool status` to see the  
structure as understood by ZFS.

> If that's how it works I'll just need something on the backup_pc and the  
> other PCs to automate the backing up.
> Is that backup Ninja or something ?

I have never used backup Ninja. Depending on your use case anything from  
simple rsync to borgbackup may serve :)

Please note that "root on ZFS" is possible but quite complicated:
https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html

For my current system I actually used mdadm RAID 1 for OS+Swap and ZFS  
mirrors for the actual data. This way, I can use the Debian Installer for  
installation purposes and benefit from the bit rot protection for the  
acutally important data while maintaining basic redundancy for the OS  
installation. YMMV.

Here are my notes on essential ZFS commands (in case they might be of help):
https://masysma.lima-city.de/37/zfs_commands_shortref.xhtml

HTH
Linux-Fan

öö

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Raid 1 mick crane <mick.crane@gmail.com> - 2021-01-22 23:30 +0100
  Re: Raid 1 Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-23 00:10 +0100
  Re: Raid 1 David Christensen <dpchrist@holgerdanske.com> - 2021-01-23 00:20 +0100
  Re: Raid 1 David Christensen <dpchrist@holgerdanske.com> - 2021-01-23 00:20 +0100
  Re: Raid 1 Andrei POPESCU <andreimpopescu@gmail.com> - 2021-01-23 13:30 +0100
    Re: Raid 1 Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-23 18:20 +0100
      Re: Raid 1 Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-23 19:00 +0100
        Re: Raid 1 Pankaj Jangid <pankaj@codeisgreat.org> - 2021-01-25 07:00 +0100
          Re: Raid 1 Andy Smith <andy@strugglers.net> - 2021-01-25 08:20 +0100
            Re: Raid 1 Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-25 12:10 +0100
              Re: Raid 1 Pankaj Jangid <pankaj@codeisgreat.org> - 2021-01-25 13:50 +0100
    Re: Raid 1 David Christensen <dpchrist@holgerdanske.com> - 2021-01-23 23:10 +0100
      Re: Raid 1 Andrei POPESCU <andreimpopescu@gmail.com> - 2021-01-24 18:40 +0100
        Re: Raid 1 Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-24 23:30 +0100
          Re: Raid 1 Andrei POPESCU <andreimpopescu@gmail.com> - 2021-01-25 07:40 +0100
      Re: Raid 1 Andy Smith <andy@strugglers.net> - 2021-01-24 19:00 +0100
        Re: Raid 1 Andrei POPESCU <andreimpopescu@gmail.com> - 2021-01-24 21:20 +0100
      Re: Raid 1 David Christensen <dpchrist@holgerdanske.com> - 2021-01-24 21:20 +0100
        Re: Raid 1 deloptes <deloptes@gmail.com> - 2021-01-25 09:50 +0100
        Re: Raid 1 David Christensen <dpchrist@holgerdanske.com> - 2021-01-25 19:00 +0100

csiph-web