Cloning OMV NVMe Drive Using Clonezilla (-k1 Proportional Restore)

Recently, I executed a planned infrastructure upgrade to enhance the storage performance, storage capacity, and power resilience of my homelab. The primary objective was to migrate my OpenMediaVault (OMV) operating system from a budget 128GB NVMe SSD to a high-performance 512GB Samsung PM981 NVMe SSD installed in an HP t740 Thin Client, while seamlessly maintaining Proxmox High Availability (HA) and Peanut (NUT) UPS integration.

Below is a detailed breakdown of the migration workflow, hardware considerations, and overall system architecture.


1. NVMe Upgrade: SK Hynix BC711 (128GB) vs. Samsung PM981 (512GB)

Hardware Analysis: Power Loss Protection vs. Throughput

Prior to migration, I evaluated the trade-offs between the two solid-state drives:

  • SK Hynix BC711 (128GB): Features firmware-level Power Loss Protection (PLP) (Pyrite). While beneficial for mitigating data-at-rest corruption during unexpected power outages, its limited capacity and write performance become bottlenecks under continuous container logging and NAS workloads.
  • Samsung PM981 (512GB): Lacks hardware/firmware PLP but includes a dedicated LPDDR4 DRAM cache and delivers superior sequential and random IOPS (~3,000+ MB/s).

Because the host system is backed by a Line-Interactive UPS (Prolink 1500VA), leveraging the higher bandwidth, expanded capacity, and superior Total Bytes Written (TBW) endurance of the Samsung PM981 was the logical architectural choice.


Step-by-Step Guide: Cloning OMV NVMe Drive Using Clonezilla (-k1 Proportional Restore)

To eliminate the need for a clean OS re-installation and manual reconfiguration, I utilized Clonezilla with a specific partition expansion flag. Here is the exact step-by-step workflow with visual step diagrams:

Step 1: Pre-Migration Setup & Boot Menu

Insert the Clonezilla Live USB into the HP t740, boot into the boot menu, and select Clonezilla live (Default settings).

HP t740 Boot Menu [ Boot from USB ] Clonezilla GRUB Screen > Clonezilla live (Default settings) <

Step 2: Mode Selection (device-device & disk_to_local_disk)

Select language and keyboard settings, then choose device-device mode and disk_to_local_disk option for a direct local clone.

device-device beginner mode disk_to_local_disk

Step 3: Source & Target Drive Selection

Select the 128GB SK Hynix as Source and the 512GB Samsung PM981 as Target. Double check drive labels to prevent data loss!

SOURCE DISK SK Hynix BC711 (128GB) /dev/nvme0n1 TARGET DISK Samsung PM981 (512GB) /dev/nvme1n1

Step 4: Enable -k1 Proportional Partition Expansion

In advanced parameters, enable the -k1 flag. This automatically scales partition sizes proportionally to consume the full 512GB space.

Without -k1 (Wasted Unallocated Space): 128GB OS 384GB Unallocated (Waste) With -k1 Flag Enabled (Proportional Auto-Resize): Full ~476 GiB Expanded OS Partition

Step 5: Execution & Completion

Confirm execution prompts by entering y. Allow Clonezilla to write the image at PCIe bus speeds, remove the USB drive upon completion, and boot seamlessly into your expanded OMV setup.

Thanks to the -k1 parameter, upon booting into OpenMediaVault, the file system automatically expands to utilize the full ~476 GiB usable space of your new Samsung NVMe without requiring manual partition resizing via GParted!


2. Power Resilience Architecture: Centralized UPS Management via Peanut (NUT)

Because consumer/OEM client SSDs like the PM981 lack hardware capacitor-based PLP, implementing an automated graceful shutdown routine is critical to prevent file system journal inconsistencies and DRAM cache data loss during total utility power failures.

System Topology

  • Peanut (NUT Server) in Proxmox LXC: The USB communication interface of the Prolink 1500VA UPS is mapped directly to a lightweight Peanut (Network UPS Tools) LXC container hosted on Proxmox.
  • OMV as a NUT Netclient: The OpenMediaVault instance operates as a Netclient polling the UPS telemetry state over the local network from the primary Peanut LXC container.

Automated Power-Off Sequence

  1. Power Interruption Detected: Upon loss of AC mains, the UPS transitions its status to OB (On Battery).
  2. Client-Level Safe Shutdown: The OMV Netclient monitors state transitions. Upon reaching a pre-configured threshold (e.g., 2–3 minutes on battery or reaching a 70% battery state-of-charge), OMV triggers a graceful systemctl poweroff to unmount file systems and stop Docker containers safely.
  3. Host-Level Cascade Shutdown: Once storage services are safely dismounted, the Proxmox hypervisor initiates a graceful host shutdown.
  4. Battery Preservation: Limiting the Depth of Discharge (DoD) to shallow cycles prevents deep battery depletion, significantly extending the operational lifespan of the UPS battery bank (up to 3–5 years).

3. Proxmox Mini High Availability (HA) Integration

In parallel with storage migrations (Move Volume tasks to shared network storage), the environment maintains a fully functional Proxmox Mini HA Cluster.

High-Availability Highlights

  • Multi-Node Quorum: Configured across primary and secondary nodes backed by shared network storage (Callies-Servers).
  • Automated Failover: In the event of primary hypervisor node failure, cluster quorum triggers automated fencing and restarts critical LXC/VM workloads on the surviving node.
  • Storage Independence: Virtual disk images residing on shared storage eliminate single-point-of-failure dependencies on local node drives.

Key Takeaways & Recommendations

  1. NVMe for Home Server Boot Disks: Avoid using USB flash drives for modern NAS operating systems like OMV due to heavy wear from OS logging and container runtimes. A dedicated NVMe SSD provides long-term reliability.
  2. Software UPS Integration vs. Hardware PLP: When hardware-based PLP is absent on consumer-grade NVMe drives, configuring a robust NUT (Network UPS Tools) daemon provides reliable protection against filesystem corruption.
  3. Proportional Partition Resizing: Utilizing Clonezilla’s -k1 feature during drive cloning streamlines storage upgrades by eliminating post-restore manual volume expansion.

What power protection strategies and storage configurations are you running in your homelab? Share your architecture in the comments below!

Comments

Popular posts from this blog

AdGuard Home DNS for Newbies - Part 3

Suricata on Mikrotik(IDS+IPS) = Part 4 - Configuration of the IPS Part

DHCP for Dummies: How Your Devices Get Online Without You Lifting a Finger