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?

5 points
*

don’t mess around with imaging to a file on the zfs, then restoring it. simply clone nvme -> nvme using a usb nvme adapter then replace the internal with the clone.

permalink
report
reply
4 points

I would like to avoid buying additional hardware if possible.

permalink
report
parent
reply
5 points

usb nvme adapters are not expensive and it likely won’t be the only time you need it. they are a handy accessory to have on hand if you have nvme storage.

permalink
report
parent
reply
3 points

I’ll definitely take this route if the wifi slot will not support the m.2 drive. Thanks for the suggestion.

permalink
report
parent
reply
1 point

You can old nvme -> SATA -> new nvme with any old SATA drive you have lying around.

permalink
report
parent
reply
4 points

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.

permalink
report
reply
2 points

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.

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
2 points

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

permalink
report
parent
reply
5 points

If you want an image, it doesn’t matter what the underlying file system is. You should be able to use a tool like Clonezilla and get a 1:1 copy. Depending how you’ve set up partitioning, you could also use sgdisk to set up the proper partitions and zfs send/recv for the new data portion of the drive and install a boot loader. That’s probably the way I’d go in this instance.

permalink
report
reply
2 points

I get the part that the cloning software does not care for the underlying OS. My worry is the fact that I’ll run the cloning software/command from a live USB which will not be able to detect the zfs mirror on my backup drive on its own and thus break the zfs mirror with bad consequences for the existing data. I could not find any commands to make the live USB OS discover and respect the existing zfs configuration.

permalink
report
parent
reply
1 point
*

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
SATA Serial AT Attachment interface for mass storage
SSD Solid State Drive mass storage
ZFS Solaris/Linux filesystem focusing on data integrity

[Thread #758 for this sub, first seen 22nd May 2024, 23:15] [FAQ] [Full list] [Contact] [Source code]

permalink
report
reply
1 point

You could use something like Veeam Endpoint (free), it will image while the OS is running so the underlying ZFS system shouldn’t matter.

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 4.8K

    Monthly active users

  • 3.6K

    Posts

  • 81K

    Comments