mynodebtc / mynode

The easiest way to run Bitcoin and Lightning!
Other
650 stars 148 forks source link

Clone tool doesn't work when NVMe drive is used because of different naming convention #882

Open theerror opened 3 hours ago

theerror commented 3 hours ago

Describe the bug Clone tool doesn't work when NVMe drive is used.

-- Logs begin at Thu 2024-11-14 04:23:48 CST, end at Thu 2024-11-14 04:24:45 CST. --
Nov 14 04:24:43 myNode mynode[2283]: Clone Error: Exception: Command 'mkfs.ext4 -F -L MyNode /dev/nvme0n11' returned non-zero exit status 1.
Nov 14 04:24:43 myNode mynode[2283]: Exception: Command 'mkfs.ext4 -F -L MyNode /dev/nvme0n11' returned non-zero exit status 1.
Nov 14 04:24:43 myNode mynode[735]: The file /dev/nvme0n11 does not exist and no size was specified.
Nov 14 04:24:43 myNode mynode[735]: mke2fs 1.44.5 (15-Dec-2018)
Nov 14 04:24:43 myNode mynode[2283]: Creating Partition...
Nov 14 04:24:36 myNode mynode[2283]: Formatting Drive...
Nov 14 04:24:36 myNode mynode[735]: umount: /dev/nvme0n11: no mount point specified.
Nov 14 04:24:36 myNode mynode[735]: umount: /dev/sda1: not mounted.
Nov 14 04:24:36 myNode mynode[2283]: Clone State: in_progress
Nov 14 04:24:06 myNode mynode[2283]: Clone State: need_confirm
Nov 14 04:24:06 myNode mynode[2283]: Target Drive: nvme0n1
Nov 14 04:24:06 myNode mynode[2283]: Source Drive: sda
Nov 14 04:24:06 myNode mynode[2283]: Checked partition sda1 in 1039ms
Nov 14 04:24:06 myNode mynode[2283]: MyNode Partition Found: sda1
Nov 14 04:24:05 myNode mynode[2283]: Drive sda paritions: ['sda1']
Nov 14 04:24:05 myNode mynode[2283]: Checked partition nvme0n1p1 in 1022ms
Nov 14 04:24:05 myNode mynode[735]: umount: /mnt/hdd: not mounted.
Nov 14 04:24:04 myNode mynode[735]: mount: /mnt/hdd: wrong fs type, bad option, bad superblock on /dev/nvme0n1p1, missing codepage or helper program, or other error.
Nov 14 04:24:04 myNode mynode[2283]: Drive nvme0n1 paritions: ['nvme0n1p1']
Nov 14 04:24:04 myNode mynode[2283]: Drives: ['nvme0n1', 'sda']
Nov 14 04:24:04 myNode mynode[735]: The backup GPT table is not on the end of the device. This problem will be corrected by write.
Nov 14 04:24:04 myNode mynode[735]: GPT PMBR size mismatch (1953525167 != 4000797359) will be corrected by write.
Nov 14 04:24:04 myNode mynode[735]: rm: cannot remove '/tmp/.clone_target_drive_has_mynode': No such file or directory
Nov 14 04:24:04 myNode mynode[735]: umount: /tmp/drive2: no mount point specified.
Nov 14 04:24:04 myNode mynode[735]: umount: /tmp/drive1: no mount point specified.
Nov 14 04:24:04 myNode mynode[735]: umount: /mnt/hdd: not mounted.
Nov 14 04:24:04 myNode mynode[735]: rm: cannot remove '/tmp/.clone_rescan': No such file or directory
Nov 14 04:24:04 myNode mynode[735]: rm: cannot remove '/tmp/.clone_confirm': No such file or directory
Nov 14 04:24:04 myNode mynode[735]: rm: cannot remove '/tmp/.clone_error': No such file or directory
Nov 14 04:24:04 myNode mynode[2283]: Clone State: detecting
Nov 14 04:24:03 myNode mynode[735]: + python3 /usr/bin/clone_drive.py

Expected behavior Clone job will be working also when NVMe drive is used.

Desktop (please complete the following information):

MyNode hardware (please complete the following information):

Additional context Clone tool doesn't work when NVMe drive is used because of different naming convention, what python clone script not expecting here (and few other places). Based on code /dev/{target_drive}1 It's just add "1" to disk name, what is working fine for sdX[1-9] naming convention, however not for NVMe, what is using suffix p[1-9] instead for partitions, so /dev/nvme0n11 is not valid and correct one should be /dev/nvme0n1p1 instead, as you can see even in logs with partition information detected.

Nov 14 04:24:04 myNode mynode[2283]: Drive nvme0n1 paritions: ['nvme0n1p1']
theerror commented 3 hours ago

When I update script and change 1 ---> p1 for NVMe drive places, all passed and worked fine.