21
submitted 7 months ago* (last edited 7 months ago) by DontNoodles@discuss.tchncs.de to c/selfhosted@lemmy.world

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?

you are viewing a single comment's thread
view the rest of the comments
[-] planish@sh.itjust.works 5 points 7 months ago* (last edited 7 months ago)

It sounds like nobody actually understood what you want.

You have a non-ZFS boot drive, and a big ZFS pool, and you want to save an image of the boot drive to the pool, as a backup for the boot drive.

I guess you don't want to image the drive while booted off it, because that could produce an image that isn't fully self-consistent. So then the problem is getting at the pool from something other than the system you have.

I think what you need to do is find something else you can boot that supports ZFS. I think the Ubuntu live images will do it. If not, you can try something like re-installing the setup you have, but onto a USB drive.

Then you have to boot to that and zfs import your pool. ZFS is pretty smart so it should just auto-detect the pool structure and where it wants to be mounted, and you can mount it. Don't do a ZFS feature upgrade on the pool though, or the other system might not understand it. It's also possible your live kernel might not have a new enough ZFS to understand the features your pool uses, and you might need to find a newer one.

Then once the pool is mounted you should be able to dd your boot drive block device to a file on the pool.

If you can't get this to work, you can try using a non-ZFS-speaking live Linux and dding your image to somewhere on the network big enough to hold it, which you may or may not have, and then booting the system and copying back from there to the pool.

[-] DontNoodles@discuss.tchncs.de 3 points 7 months ago

Phew! I almost believed I was asking for something beyond the scope of linux-fu. English not being my first language may be part of the reason but still I think I covered everything that was relevant.

Yes, that's exactly what I want and your post has given me the clarity I needed. M.2 wifi slots don't support disks so that option is definitely out. I'm going to boot with the latest Ubuntu live OS on a USB and attempt what you've outlined.

I don't have anything really critical on the zfs that is not backed up separately so I'm definitely going to attempt this and learn in the process.

Thank you for taking the time to respond!

this post was submitted on 22 May 2024
21 points (95.7% liked)

Selfhosted

40717 readers
700 users here now

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!

founded 2 years ago
MODERATORS