- Joined
- May 26, 2011
- Messages
- 654
Hi, this is a "spin-off" of the upgrade plan but as it is quite specific "issue" i am creating a separate thread.
FreeNAS version is quite old: FreeNAS-9.10.2-U1
So i have two encrypted pools. One is RAIDZ2 (a big archive one) and second is mirrored one (2 disks). I will need to rename (export/import) the big one but before i do i am testing the steps on the smaller (mirrored) pool.
First of all YES i have a backup of the mirror pool i am playing with (did a zfs send/recv and sent everything to the first archive pool). The problem here is that i need to achieve the rename on the big one and i have no place to backup all of the data. So i need to know exactly how to proceed.
- In order to "rename" the pool it has to be exported, then imported with different (temp) name, then exported again and finally imported with a new name. Whole process witn UNencrypted pool is like:
Now to the problem with the encrypted pools...
- I've locked the pool via GUI first
- Then i did a "DETACH" from the GUI without checking the "Destroy" and "Delete shares configuration". So it actually did a "
- Before doing any changes i wanted to import the pool again but apparently there is a GUI bug where the disks are NOT listed in "Import volume" (after selecting "encrypted volumes" in first step). I've tried to restart whole system but w/o change.
- Some info about the devices:
- So i went to cmd line and attached/decrypted the devices manually by:
- Then i've fixed the mount points to match the original one
- So at this point i can access the data but the GUI is un-aware about it! The pool is not listed under "View volumes" and more over it provides the disks in Device manager (dangerous!).
- I've checked content of storage_encrypteddisk table in freenas-v1.db and the records are not there.
This is obvious as I've imported the pools from CLI instead of the GUI ...
So the question is HOW can I import the pool via GUI properly if the import volume does not show the disks? (I know i could just restore my config backup and restart but that is not what i want to do...).
I know the version of FreeNAS is old but it is actually a preparation for migration to most recent one so any help/comments would be appreciated :]
Thanks!
Alex
FreeNAS version is quite old: FreeNAS-9.10.2-U1
OS: FreeNAS-9.10.2-U1 (on USB dongle)
MB: SuperMicro MBD-X10SL7-F - Intel C222
CPU: Intel Core i3-4130
RAM: Kingston Value 16GB (2x8GB) DDR3 1333 ECC
PSU: Enermax ErPRO80+ 350W
Pool1: RAIDZ2 / 6x Western Digital WD Green WD20EZRX 2TB - called "MIRROR"
Pool2: Mirror / 2x WD Red (EFRX), 3,5" - 2TB
Case: Fractal Design DEFINE R4 Black Pearl
MB: SuperMicro MBD-X10SL7-F - Intel C222
CPU: Intel Core i3-4130
RAM: Kingston Value 16GB (2x8GB) DDR3 1333 ECC
PSU: Enermax ErPRO80+ 350W
Pool1: RAIDZ2 / 6x Western Digital WD Green WD20EZRX 2TB - called "MIRROR"
Pool2: Mirror / 2x WD Red (EFRX), 3,5" - 2TB
Case: Fractal Design DEFINE R4 Black Pearl
First of all YES i have a backup of the mirror pool i am playing with (did a zfs send/recv and sent everything to the first archive pool). The problem here is that i need to achieve the rename on the big one and i have no place to backup all of the data. So i need to know exactly how to proceed.
- In order to "rename" the pool it has to be exported, then imported with different (temp) name, then exported again and finally imported with a new name. Whole process witn UNencrypted pool is like:
Code:
zpool export mirror zpool import mirror mirrornew zpool export mirrornew zpool import mirrornew
Now to the problem with the encrypted pools...
- I've locked the pool via GUI first
- Then i did a "DETACH" from the GUI without checking the "Destroy" and "Delete shares configuration". So it actually did a "
zpool export -f mirror
" (this is from zpool history mirror)- Before doing any changes i wanted to import the pool again but apparently there is a GUI bug where the disks are NOT listed in "Import volume" (after selecting "encrypted volumes" in first step). I've tried to restart whole system but w/o change.
- Some info about the devices:
camcontrol devlist
<WDC WD20EFRX-68EUZN0 80.00A80> at scbus1 target 0 lun 0 (pass6,ada0)
<WDC WD20EFRX-68EUZN0 80.00A80> at scbus2 target 0 lun 0 (pass7,ada1)
<WDC WD20EFRX-68EUZN0 80.00A80> at scbus1 target 0 lun 0 (pass6,ada0)
<WDC WD20EFRX-68EUZN0 80.00A80> at scbus2 target 0 lun 0 (pass7,ada1)
geom disk list
Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
descr: WDC WD20EFRX-68EUZN0
lunid: 5xxxxxxxxxxxxxxxxf
ident: WD-WMCxxxxxxxx0
rotationrate: 5400
fwsectors: 63
fwheads: 16
Geom name: ada1
Providers:
1. Name: ada1
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
descr: WDC WD20EFRX-68EUZN0
lunid: 5xxxxxxxxxxxxxxxx8
ident: WD-WMCxxxxxxxx1
rotationrate: 5400
fwsectors: 63
fwheads: 16
Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
descr: WDC WD20EFRX-68EUZN0
lunid: 5xxxxxxxxxxxxxxxxf
ident: WD-WMCxxxxxxxx0
rotationrate: 5400
fwsectors: 63
fwheads: 16
Geom name: ada1
Providers:
1. Name: ada1
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
descr: WDC WD20EFRX-68EUZN0
lunid: 5xxxxxxxxxxxxxxxx8
ident: WD-WMCxxxxxxxx1
rotationrate: 5400
fwsectors: 63
fwheads: 16
gpart show
=> 34 3907029101 ada0 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834696 2 freebsd-zfs (1.8T)
3907029128 7 - free - (3.5K)
=> 34 3907029101 ada1 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834696 2 freebsd-zfs (1.8T)
3907029128 7 - free - (3.5K)
=> 34 3907029101 ada0 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834696 2 freebsd-zfs (1.8T)
3907029128 7 - free - (3.5K)
=> 34 3907029101 ada1 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834696 2 freebsd-zfs (1.8T)
3907029128 7 - free - (3.5K)
Code:
geli attach -k /data/geli/c68blahblahblahblah.key /dev/ada0p2 geli attach -k /data/geli/c68blahblahblahblah.key /dev/ada1p2
zpool import
pool: mirror
id: 169XXXXXXXXXXXXXX91
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
mirror ONLINE
mirror-0 ONLINE
ada0p2.eli ONLINE
ada1p2.eli ONLINE
pool: mirror
id: 169XXXXXXXXXXXXXX91
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
mirror ONLINE
mirror-0 ONLINE
ada0p2.eli ONLINE
ada1p2.eli ONLINE
Code:
zpool import mirror
Code:
zpool list NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT mirror 1.81T 1.37T 455G - 41% 75% 1.00x ONLINE -
- Then i've fixed the mount points to match the original one
Code:
zfs set mountpoint=/mnt/mirror mirror zfs mount -a
Code:
geli status Name Status Components ada0p2.eli ACTIVE ada0p2 ada1p2.eli ACTIVE ada1p2
Code:
glabel status Name Status Components gptid/0f6cxxxxx-xxxxx-xxx-xxxxx-xxxxxxxxxxxxa N/A ada0p1 gptid/0fe5xxxxx-xxxxx-xxx-xxxxx-xxxxxxxxxxxxa N/A ada1p1
- So at this point i can access the data but the GUI is un-aware about it! The pool is not listed under "View volumes" and more over it provides the disks in Device manager (dangerous!).
- I've checked content of storage_encrypteddisk table in freenas-v1.db and the records are not there.
This is obvious as I've imported the pools from CLI instead of the GUI ...
So the question is HOW can I import the pool via GUI properly if the import volume does not show the disks? (I know i could just restore my config backup and restart but that is not what i want to do...).
I know the version of FreeNAS is old but it is actually a preparation for migration to most recent one so any help/comments would be appreciated :]
Thanks!
Alex