Pool migration after Perc H700 to H200 upgrade

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
Hi,
I have a Dell PowerEdge T610 system, currently running FreeNAS 11.2, configured with a single pool spanning 6 disks and a spare. Unfortunately the system has a Perc H700 RAID controller and I configured 7 RAID 0 virtual disks of 1 physical disk each to make everything work. Since I would like to replace the controller with a Perc H200 (properly crossflashed) I was wondering how to migrate the pool.
Is it possible to just replace the controller, leave the disks unconfigured, then re-import the pool in FreeNAS? Or do I need to backup all the data and create the pool from scratch?
Thank you in advance for your help.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Not really possible, assuming that it's done the usual "create its own little proprietary partition system on the disk" thing that so many RAID controllers do.

https://www.ixsystems.com/community...s-and-why-cant-i-use-a-raid-controller.81931/

I discuss this briefly at the end of point #5. What's happened is that the controller makes a partition that encapsulates your JBOD virtual device, so the data that OUGHT to be at LBA #0 has been moved forward into an LBA a little further in to the disk, and the JBOD's proprietary partition is a wee bit smaller than the physical disk. It would theoretically be possible to simply relocate the data (reading it maybe a gigabyte at a time and rewriting it where it ought to be) which would transform the disk into something usable. I'm not aware of any tools that would allow an end-user to do this without getting down and dirty with stuff, though.
 

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
Not really possible, assuming that it's done the usual "create its own little proprietary partition system on the disk" thing that so many RAID controllers do.

https://www.ixsystems.com/community...-and-why-can't-i-use-a-raid-controller.81931/

I discuss this briefly at the end of point #5. What's happened is that the controller makes a partition that encapsulates your JBOD virtual device, so the data that OUGHT to be at LBA #0 has been moved forward into an LBA a little further in to the disk, and the JBOD's proprietary partition is a wee bit smaller than the physical disk. It would theoretically be possible to simply relocate the data (reading it maybe a gigabyte at a time and rewriting it where it ought to be) which would transform the disk into something usable. I'm not aware of any tools that would allow an end-user to do this without getting down and dirty with stuff, though.
Thank you for your very datailed answer. One thing that makes me thinking is that I can actually see the type of device running camcontrol devlist. I guess the only way to know is to connect one hard drive to a PC and analyze the raw content. But at this point, what should I look for? Can I identify LBA #0 by searching for the MBR?
Thank you for your help
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yes, you really have to look at what's happened on the disk. Some RAID controllers do the partition thing, especially common for "virtual disk" JBOD's, but sometimes you can luck out and they left the disk readable and instead stole disk space at the back of the disk.

It won't HURT to hook the disks up to an HBA and then ask FreeNAS to import the pool, by the way. Of course if you do anything beyond that, your data's at risk, and it's worth having a backup.
 

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
Yes, you really have to look at what's happened on the disk. Some RAID controllers do the partition thing, especially common for "virtual disk" JBOD's, but sometimes you can luck out and they left the disk readable and instead stole disk space at the back of the disk.

It won't HURT to hook the disks up to an HBA and then ask FreeNAS to import the pool, by the way. Of course if you do anything beyond that, your data's at risk, and it's worth having a backup.
Perfect. But let's suppose I have to create the pool from scratch: is there a simple way to backup and restore everything, without having to create all the datasets and zvols again (and above all without affecting jails and VMs)?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you can install both controllers into the same chassis simultaneously, you could probably move one disk at a time with resilvering after every disk moved.
 

hervon

Patron
Joined
Apr 23, 2012
Messages
353
If you can install both controllers into the same chassis simultaneously, you could probably move one disk at a time with resilvering after every disk moved.

I don't think this makes sense. He has to create a new pool. Best way I see is with the ZFS send command from old to new pool. Use the -R flag to preserves all properties.
 

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
If you can install both controllers into the same chassis simultaneously, you could probably move one disk at a time with resilvering after every disk moved.
I also thought about it. Since my pool is composed of 3 two-disk mirrors I could remove half of the disks and keep them in the top row of the backplane, while connecting the new controller to the second half. Now it should be possible to resilver the pool. After doing that I could connect the top half of the backplane to the new controller too and repeat.
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
hello
can do that with a HDD in H200 controller (with suficient space) and ZFS send and receive command for the entire pool to have another copy of data
just in case :D
succes
 

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
I'm also sharing this post I found on Reddit, in case it could help someone else. It seems that the RAID information is stored at the end of the disk, and it should be possible to just import the pool.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Anyway afterwards have a look at the GPT partition tables and probably use gpart recover.
 

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
OK, today I removed the PERC H700 and installed the H200, which I previously crossflashed to P20 IT firmware. I only got some warnings saying the secondary GPT header is not in the last LBA, but gpart successfully resolved the issue.
Unfortunately I have another problem: the A and B ports are swapped: drives 0 to 3 became 4 to 7 and vice-versa (actually, since I have an empy slot, the order is a little bit messed up). Swapping the cables gives me an error about missing A port cable. As I understand it is a common issue, but I'm not sure it affects every H200 unit. Does anyone have any idea?
 

hervon

Patron
Joined
Apr 23, 2012
Messages
353
Normally it should not affect your pool (or anything as a matter of fact). Does it ?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Top