I have set up a refurbished PC as a media PC with storage. The OS, Debian, is on an m.2 nvme disk of 256 GB. I have connected 2x4TB risks in zfs mirror mode to store my media.

Off late, while booting, I’ve noticed some messages that suggest that the health of nvme disk is not good. Searching the error, i realised that I should not rely on it. I’ve done a number of tweaks to set up my system the way I like that I want to save by creating an image of the OS drive on a fresh nvme disk of same size that I have.

How do I go about doing it? I could boot using a live USB and create the image on the HDDs but the live USB OS won’t recognise my zfs, right? Is using another external disk or another PC my only option here?

Thanks and cheers!

PS: The machine is a HP Elitedesk 800 G3 that has a wifi port that I’ve heard can be used as additional port for m.2 drives. Is it true?

  • gh0stcassette@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 month ago

    Use an Ubuntu live USB, all recent versions of Ubuntu have ZFS drivers baked into the live environment. Then you should add your new SSD to the ZFS pool, and remove the old one from the ZFS pool. Your m.2 WiFi slot should be able to host the 2nd drive while you do this, but if not you can use an external USB housing for it, you’ll just have to make sure that the ZFS pool knows its UUID so that it knows it’s the same drive.

    • DontNoodlesOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 month ago

      Why do I need to add my nvme to the zfs pool? That doesn’t really make sense.

      If the wifi slot does support m.2 drivers (I was just looking for some confirmation/document), it’ll solve my problem. Thanks nonetheless.

      • gh0stcassette@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        1 month ago

        You need to add the new drive to your existing pool because ZFS stores data across all drives by default, similar to a RAID0. Then you remove the old drive and ZFS will automatically copy the data off the failing drive onto the healthy one and allow you to remove the failing drive with no data loss.

        • DontNoodlesOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 month ago

          The SSD is 256GB while the two HDDs are 4TB each. What kind of zfs config/array do you suggest I create from them?

          • gh0stcassette@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            1 month ago

            That depends on your use case, I just did a simple zpool with no redundancy because I wanted maximum speed/capacity and all my data is backed up on an external HDD. If you need redundancy, I would look online for how to configure that and what the optimal setup is.

          • gh0stcassette@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 month ago

            Actually, I assumed you just had the SSD, if you have more than 256gb of free space between those HDDs, you can go ahead and remove the SSD from your zpool right now (unless your bootloader is there, then you’ll have to make an EFI system partition on one of the HDDs and install a bootloader first)