Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add an additional partition while rpi-clone performs an SD to NVMe clone? #52

Open
ERSBrad opened this issue Jan 15, 2025 · 1 comment

Comments

@ERSBrad
Copy link

ERSBrad commented Jan 15, 2025

tl;dr: Can I create additional partitions with the rpi-clone script itself, or do I need an external tool? I see the -p flag, but I don't understand it completely tbh.

I currently have an Ansible script/role that takes a fresh RPI (5) Imager Raspbian image, updates the packages, clones from SD to NVME, changes the boot order and reboots before installing a bunch of other stuff. This works amazing, but I didn't realize I wanted to go the MicroCeph route until I started digging into HA storage solutions.

RPI Clone by default partitions my NVME drives this way on each device:

Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: ***                  
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: ***

Device         Boot   Start        End    Sectors   Size Id Type
/dev/nvme0n1p1         8192    1056767    1048576   512M  c W95 FAT32 (LBA)
/dev/nvme0n1p2      1056768 2000409263 1999352496 953.4G 83 Linux

Is it possible to add nvme0n1p3 on each of my devices via rpi-clone so that I can use the additional partition for MicroCeph? Any recommendations on partition sizes?

@framps
Copy link

framps commented Jan 18, 2025

Can I create additional partitions with the rpi-clone script itself, or do I need an external tool?

rpi-clone does not create any partitions. You have to use a tool like parted, fdisk or gparted to create additional partitions. rpi-clone will clone all partitions and the last partition will be resized accordingly if the size of the source device is different than the target device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants