For many reasons I've a Linux system installed on a SD card with a ZFS pool created with ZoL. Now, I want remove the SD card and install FreeBSD into the existing pool. So, I have this configuration (copied on a Virtualbox VM used for testing and listed via livecd):
Partitions are created from Linux gdisk utility. When I import the pool, I've this result:
As noticed, gpart cannot view ada disks, but onlly diskid. If I try a
How I solve this? Only workaround I've founded is to remove a disk from the pool and I repartition with gpart, but is too expensive and I prefer to find another solution. For the test, I've used FreeBSD 10.2 Livecd
Code:
root@:~ # gpart show
=> 63 16777153 ada0 MBR (8.0G)
63 1985 - free - (993K)
2048 1024000 1 linux-data [active] (500M)
1026048 15751168 2 linux-lvm (7.5G)
=> 34 41942973 ada1 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 ada2 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 ada3 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 63 16777153 diskid/DISK-VB091bbdc6-467901fc MBR (8.0G)
63 1985 - free - (993K)
2048 1024000 1 linux-data [active] (500M)
1026048 15751168 2 linux-lvm (7.5G)
=> 34 41942973 diskid/DISK-VBf3b0bc3c-1f6bc489 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 ada4 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 diskid/DISK-VB85a3f207-7e78069d GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 diskid/DISK-VB0f5c4ac9-88d944c2 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 diskid/DISK-VB3e293846-83cea468 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
root@:~ #
Partitions are created from Linux gdisk utility. When I import the pool, I've this result:
Code:
root@:~ # zpool import -R /mnt -f zroot
root@:~ # gpart show
=> 63 16777153 ada0 MBR (8.0G)
63 1985 - free - (993K)
2048 1024000 1 linux-data [active] (500M)
1026048 15751168 2 linux-lvm (7.5G)
=> 63 16777153 diskid/DISK-VB091bbdc6-467901fc MBR (8.0G)
63 1985 - free - (993K)
2048 1024000 1 linux-data [active] (500M)
1026048 15751168 2 linux-lvm (7.5G)
=> 34 41942973 diskid/DISK-VBf3b0bc3c-1f6bc489 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 diskid/DISK-VB85a3f207-7e78069d GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 diskid/DISK-VB0f5c4ac9-88d944c2 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
=> 34 41942973 diskid/DISK-VB3e293846-83cea468 GPT (20G)
34 2014 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 2097152 2 freebsd-swap (1.0G)
2101248 39841759 3 freebsd-zfs (19G)
root@:~ #
As noticed, gpart cannot view ada disks, but onlly diskid. If I try a
gpart show ada1
system return the error gpart: No such geom: ada1.
but a ls shows all disks:
Code:
root@:~ # ls -l /dev/ada*
crw-r----- 1 root operator 0x4e Dec 4 13:46 /dev/ada0
crw-r----- 1 root operator 0x52 Dec 4 13:46 /dev/ada0s1
crw-r----- 1 root operator 0x54 Dec 4 13:46 /dev/ada0s2
crw-r----- 1 root operator 0x56 Dec 4 13:46 /dev/ada1
crw-r----- 1 root operator 0x58 Dec 4 13:46 /dev/ada2
crw-r----- 1 root operator 0x5a Dec 4 13:46 /dev/ada3
crw-r----- 1 root operator 0x5c Dec 4 13:46 /dev/ada4
root@:~ #