Skip to content

Having issues to backup using -f2 option. #59

@fr988

Description

@fr988

Hy Jeff,

first of all thanks for this awesome fork. I'm having issues to get things working properly.

My Setup:

Headless Rpi5 4GB, Geekworm X1004 Hat, 2x 4TB SSD Drives connected to the HAT. SSH connection to Pi through MacOS Terminal.
My skill level: Getting started with Linux and Raspis. Some knowledge in Programming C and C++ on Arduino's.

What I have done:
Flashed Pi OS Lite 64 bit to an SD Card
Accessed the Pi through SSH. sudo apt update && sudo apt full-upgrade. installed rpm-clone form git.
Installed rpi-clone and copied the content to one of the ssd's -> sudo rpi-clone nvme0n1

Issue 1: MBR is not suitable for 4 TB Drives. Result after cloning with rip-clone: nvme0n1p1 512M, nvme0n1p2 ±2TB, 2 TB were unusable.

  • Ok unhappy with this: I resized partition 2 -> sudo resize2fs /dev/nvme0n1p2 28G + sudo fdisk to fit the second Partition size.
  • Used mbr2gpt from https://forums.raspberrypi.com/viewtopic.php?t=196778 to convert to GPT Partition Table.
  • created 3 partition
  • Boot from SSD

### lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 29.1G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part
└─mmcblk0p2 179:2 0 28.6G 0 part
nvme0n1 259:0 0 3.6T 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/firmware
├─nvme0n1p2 259:2 0 28G 0 part /var/folder2ram/var/cache/samba
│ /var/folder2ram/var/lib/monit
│ /var/folder2ram/var/lib/rrdcached
│ /var/folder2ram/var/spool
│ /var/folder2ram/var/lib/openmediavault/rrd
│ /var/folder2ram/var/tmp
│ /var/folder2ram/var/log
│ /
└─nvme0n1p3 259:3 0 3.6T 0 part
nvme1n1 259:4 0 3.6T 0 disk
└─nvme1n1p1 259:6 0 3.6T 0 part

Finished setup for the rest of the System, installed OMV7. Everything works perfectly.

Now to my Issue: I want to create a Backup of boot and root back to the SD Card.

  • sudo umount /dev/mmcblk0
  • sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=1
  • sudo parted /dev/mmcblk0 mklabel gpt -> Yes
  • sudo rpi-clone mmcblk0 -f2 -v

$ sudo umount /dev/mmcblk0
umount: /dev/mmcblk0: not mounted.

$ sudo rpi-clone -f2 mmcblk0

Booted disk: nvme0n1 4.0TB Destination disk: mmcblk0 31.3GB

Part Size FS Label Part Size FS Label
1 /boot/firmware 512.0M fat32 --
2 root 28.0G ext4 rootfs
3 /srv/dev-disk-by-uuid-f5fa21be-d4d4-4fcd-8127-7851837e3e17 3.6T ext4 --

== Initialize: IMAGE partition table - forced by option ==
1 /boot/firmware (61.5M used) : MKFS SYNC to mmcblk0p1
2 root (12.4G used) : RESIZE MKFS SYNC to mmcblk0p2

-f2 : force initialize to first two partitions only.
Run setup script : no.

Verbose mode : no.
** WARNING ** : All destination disk mmcblk0 data will be overwritten!
-----------------------:

Initialize and clone to the destination disk mmcblk0? (yes/no): yes
Optional destination ext type file system label (16 chars max):

Initializing
Imaging past partition 1 start.
=> dd if=/dev/nvme0n1 of=/dev/mmcblk0 bs=1M count=8 ...
Resizing destination disk last partition ...
Resize failed. See /tmp/rpi-clone-output.
Try running rpi-clone again.

$ sudo nano /tmp/rpi-clone-output

GNU nano 7.2 /tmp/rpi-clone-output
Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Old situation:

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 1056767 1048576 512M c W95 FAT32 (LBA)
/dev/mmcblk0p2 1 8191 8191 4M ee GPT

Partition table entries are not in disk order.

Script header accepted.
Script header accepted.
Script header accepted.
Script header accepted.
Script header accepted.
Script header accepted.
Script header accepted.
Last LBA specified by script is out of range.
Last LBA specified by script is out of range.
Last LBA specified by script is out of range.
Failed to apply script headers, disk label not created: Numerical result out of range
Leaving.

====rpi-clone
==orig:
label: gpt
label-id: 3DD260D9-504C-475C-82F4-24FB0F264FA4
device: /dev/nvme0n1
unit: sectors
first-lba: 34

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions