#787 Issue closed: NVMe/M.2 SSD // LUKS // diskrestore ...¶
Labels: bug, support / question, fixed / solved / done
GIT-STATA opened issue at 2016-02-29 17:59:¶
-
rear version (/usr/sbin/rear -V): Relax-and-Recover 1.17.2 / Git
-
OS version (cat /etc/rear/os.conf or lsb_release -a): OS_VENDOR=RedHatEnterpriseServer
OS_VERSION=7 -
rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
OUTPUT=USB
OUTPUT_URL=usb:///dev/disk/by-label/REAR-000
BACKUP=NETFS
BACKUP_TYPE=full
BACKUP_PROG=rsync
BACKUP_URL=usb:///dev/disk/by-label/REAR-000
AUTOEXCLUDE_DISKS=y
Brief description of the issue¶
2016-02-27 18:48:19 Comparing disks.
2016-02-27 18:48:19 Disk configuration is identical, proceeding with
restore.
2016-02-27 18:48:19 No code has been generated to restore device
pv:/dev/mapper/luks-40c4eca5-5b90-48aa-b46b-141cb2574452 (lvmdev).
Please add code to /var/lib/rear/layout/diskrestore.sh to manually
install it or choose abort.
BUT
The disk configuration is absolutely not identical – SSD was formatted
with fat32 – No partitions left on the NVMe. I can continue the process.
In the end It will say
'2016-02-27 18:48:25 Disk layout created.'... BUT the disklayout hasn't
changed anyway!
*The diskrestore/disklayout 'resetting' does not function at all on the NVMe hard drive. *
I even tried to replace the NVMe Drive with a Samsung SSD 850 Pro and tried to restore the system on that SSD. 'The disklayout was not restored'.
The diskrestore.sh is empty – beside the fact the disklayout.conf look
great. Why is that?
It would be great to get this issue resolved!
Thanks to everybody!!!
P.S.
I attached disklayout.conf and rear-localhost.log
disklayout.txt
rear-localhost-layout.txt
gdha commented at 2016-03-01 09:57:¶
Device /dev/nvme0n1 is strange and is not recognized by rear it seems
as there is no disk definition found in disklayout.conf. Perhaps, it
would be nice to see the debug out of rear -vd savelayout which
produces the disklayout.conf file.
GIT-STATA commented at 2016-03-01 12:27:¶
Hi,
thanks for responding that nice and quick!
I attached the rear -vd savelayout OUTPUT.
Again, thanks a lot!!!
P.S.
- rear
-vd savelayout
savelayout.txt
gdha commented at 2016-03-01 12:45:¶
@GIT-STATA sorry, my mistake I meant rear -vD savelayout (captital D
to capture debugging)
GIT-STATA commented at 2016-03-01 12:52:¶
No problem at all!
Thanks a lot!
rear -vD savelayout¶
gdha commented at 2016-03-07 09:37:¶
Ok I understand the issue now - according
https://communities.intel.com/community/itpeernetwork/blog/2014/10/10/finding-your-new-intel-ssd-for-pcie-think-nvme-not-scsi
it is not a scsi device and currently rear does not recognize it.
Script 20_partition_layout.sh must be extended with this type disk.
GIT-STATA commented at 2016-03-07 10:14:¶
Hi gdha,
thank you very much for your response. I guess, it must be this part of the script, which needed to be 'revised'
Script 20_partition_layout.sh must be extended with this type disk.<
for path in "${sysfs_paths[@]}" ; do
### path can be: /sys/block/sda/sda1 --> /dev/sda1
### /sys/block/dm-4 --> /dev/mapper/mpathbp1
But still I have no clue what exactly to revise.
Any Code would be so great! I would test it, of course...
P.S.
Maybe that is needed?
ls -la /sys/block/
block.txt
ls -la /sys/block/nvme0n1/
nvme.txt
Thanks again!
gdha commented at 2016-03-07 10:42:¶
@GIT-STATA Just pushed a new version of 20_partition_layout.sh - pls give it a try
GIT-STATA commented at 2016-03-07 13:02:¶
Hi,
unfortunately it does not work....
Partition is numbered ''''''. More than 128 partitions is not
supported.'
Message: Partition is numbered ''. More than 128 partitions is not
supported.
Here is rear -vD ...
rear-localhost-vD.txt
Many thanks!
gdha commented at 2016-03-07 13:13:¶
@GIT-STATA could you post /var/lib/rear/layout/disklayout.conf? I
think we are on the right track, but noet completely finished yet.
GIT-STATA commented at 2016-03-07 13:17:¶
Hi,
sure!
Here we go (disklayout.conf with NVMe SSD)
disklayout-nvme.txt
Thanks!
gdha commented at 2016-03-07 13:27:¶
In the disklayout.conf I noticed the start of the partition is missing:
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
part /dev/nvme0n1 524288000 primary boot /dev/nvme0n1p1
part /dev/nvme0n1 255534825472 primary none /dev/nvme0n1p2
Could you run a debug session of savelayout once more?
GIT-STATA commented at 2016-03-07 13:32:¶
Hi,
of course...
Here we go... rear -vD savelayout
savelayout-vD.txt
gdha commented at 2016-03-07 15:36:¶
@GIT-STATA What does cat /sys/block/nvme0n1/nvme0n1p1/start return?
GIT-STATA commented at 2016-03-07 16:03:¶
Hi,
cat /sys/block/nvme0n1/nvme0n1p1/start
returns
2048
GIT-STATA commented at 2016-03-11 09:18:¶
Hi gdha,
any new ideas on that issue?
Thanks a lot!
Best!
gdha commented at 2016-03-11 17:18:¶
Script /usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh
calls:
+++ local nr_blocks=1024000
+++ local disk_size=524288000
+++ echo 524288000
++ size=524288000
+++ get_partition_start nvme0n1/nvme0n1p1
/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh: line 64: get_partition_start: command not found
++ start=
++ echo '1 524288000 '
At this moment I have no clue why it doesn't find the function
get_partition_start as it is defined in
layout-functions.sh:get_partition_start()
Next week we might have a smarter idea?
GIT-STATA commented at 2016-03-11 17:33:¶
Hi,
yes, lets see next week!
BUT
get_partition_start() is not called in
/usr/share/rear/lib/layout-functions.sh
I can't find it there!
Thanks!
gdha commented at 2016-03-14 13:54:¶
@GIT-STATA Could you remove rear and re-install it once to double check this? It must be there (in layout-functions.sh)
GIT-STATA commented at 2016-03-14 16:35:¶
The official stable releases from EPEL does not work!
After I used the Relax-and-Recover sources from Github and build the
rpm package, I can now confirm that ReaR is working great! I have tested
different scenarios and everything worked as it should! NVMe is now
supported (from my point of view!)
THANKS A LOT !!!gdha!!!
gdha commented at 2016-03-15 07:19:¶
I know it is time to make a new release!
[Export of Github issue for rear/rear.]