Covert the stripe zpool to mirror zpool:

Status
Not open for further replies.

hama4tux

Dabbler
Joined
Nov 11, 2014
Messages
14
Hellow Guys, i found this how to, but can some one explain me what happens with data?

Code:
Covert the stripe zpool to mirror zpool:
It can be done by just adding mirror to it.
1.List the stripe zpool.
root@Unixarena-SOL11:~# zpool status oracle-S
  pool: oracle-S
state: ONLINE
  scan: none requested
config:

        NAME      STATE     READ WRITE CKSUM
        oracle-S  ONLINE       0     0     0
          c8t1d0  ONLINE       0     0     0

errors: No known data errors
root@Unixarena-SOL11:~# zpool list oracle-S
NAME       SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
oracle-S  1.98G   152K  1.98G   0%  1.00x  ONLINE  -
root@Unixarena-SOL11:~#
2.Convert the oracle-S pool layout to mirror using “zpool attach” command.
root@Unixarena-SOL11:~# zpool attach oracle-S c8t1d0 c8t2d0
root@Unixarena-SOL11:~# zpool status oracle-S
  pool: oracle-S
state: ONLINE
  scan: resilvered 86.5K in 0h0m with 0 errors on Wed Jul 24 13:16:46 2013
config:

        NAME        STATE     READ WRITE CKSUM
        oracle-S    ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            c8t1d0  ONLINE       0     0     0
            c8t2d0  ONLINE       0     0     0

errors: No known data errors
root@Unixarena-SOL11:~# zpool list oracle-S
NAME       SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
oracle-S  1.98G   126K  1.98G   0%  1.00x  ONLINE  -
root@Unixarena-SOL11:~#


My Current status IS:
Code:
[root@nas] ~# zpool list
NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
diska  1.81T  1.15T   679G    63%  1.00x  ONLINE  /mnt
[root@nas] ~# zpool status
  pool: diska
state: ONLINE
  scan: scrub repaired 0 in 10h1m with 0 errors on Mon Oct 27 07:54:17 2014
config:

        NAME                                          STATE     READ WRITE CKSUM
        diska                                         ONLINE       0     0     0
          gptid/d60029e5-5b9a-11e4-8ade-e0cb4ed3a327  ONLINE       0     0     0

errors: No known data errors


This disk report some smart problems so I buy next drive and i want make Mirror.

What do you think pleas? what happens with data on old drive?
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Unfortunately this isn't supported in the GUI, so there are complications. The short answer is the data would just be mirrored.

Basically you don't want to be doing work in the CLI behind FreeNas's back as it can cause you all kinds of grief. The long answer is: detach the pool, import the pool to cli, build the proper partitions as Freenas would, attach the partition by gptid, export the pool, auto-import back to the GUI. Should look exactly like a FreeNAS GUI created mirror if you did everything perfectly.

If that sounded like crazy talk, consider backing up the data, building a proper mirror, restoring. Or if that disk is throwing smart errors. Install the new disk, copy the data over and RMA the bad drive. Why leave a failing disk in the system?
 

hama4tux

Dabbler
Joined
Nov 11, 2014
Messages
14
So its possible copy data from one drive to other drive and just "Change mount point?"
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Sure. Set up a second pool. Move the data how ever you want to (replicate, rsync, cp). Detach the first pool when you're done. zfs will mount automatically.
 

hama4tux

Dabbler
Joined
Nov 11, 2014
Messages
14
Ok i will try it:) Just hypoteticaly if i will copy data to third drive, and after i will crate new mirror pool, i can apply same steps to get data to newly create raid 1 under FREENAS GUI.

By the way THANKS alot, found some type of information about FREENAS isnt possible...
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
By far the best would be to add 2 new drives, set them up as a mirror via the GUI. Then move the data from the existing drive to your nice new redundant pool. After that you can send the failing drive out for service. ZFS on non-redundant disks isn't a great choice. Lots of ways to do this. Some much easier and safer than others.
 

hama4tux

Dabbler
Joined
Nov 11, 2014
Messages
14
Well I need more help:)

What i did i mount second DISK by ZFS manager and i started copy files from DISK-old > DISK-new.... Two times system reboots? what is this my god.. what did i do bad? :( Now i am searching in logs what happend, but it isnt look that i found something.. last what i saw was some Kernel DUMP on screen

EDIT LOG:

Code:
Nov 18 19:52:50 nas kernel: pid 2945 (python2.7), uid 0: exited on signal 10 (core dumped)
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm so confused by this thread I'm hesitant to post. BUT...

If your original pool was created in any OS except FreeNAS you shouldn't be mounting the pool in FreeNAS. FreeNAS has expectations about things and if you break those expectation (which is virtually guaranteed if you didn't make the pool in FreeNAS) then things can go very wrong.

To make matters worse, if your "old" pool is the single-disk pool I'm seeing and the disk is failing, you can (and should) expect ZFS to crash when you get to corrupted data. This is normal for ZFS and shouldn't be surprising at all. This is why we are so strong with our convictions to use RAIDZ2 when you make pools. All it takes is 1 disk to fail and another disk to have a few bad sectors to crash a RAIDZ1 pool/vdev forever.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
The first listing was just the mirror attach sample, cyberjock. The second output was his and looked ok (though not redundant).

I'm guessing the crash is due to not meeting min hardware requirements. But it could be lots of things. Post your hardware specs, hama4tux.

Unfortunately there isn't much that can be done if that is the case. I wouldn't expect the system to crash on a read error... but stranger things have happened.

Not sure what outs you are going to have. Maybe boot FreeBSD and pray for lighter requirements, or OmniOS. Basically you get to enter scramble mode to try and secure your data. I suspect there are multiple issues at play.
 

hama4tux

Dabbler
Joined
Nov 11, 2014
Messages
14
Cyber Jock - well my english isnt good, so sometime it could be confusing.

mjws00 - My HW config is - Intel Celeron 1037U, 8GB rams. Actualy i have connected 3 HDD
- 2TB - WD GREEN - OLD (ZFS POOL - my datasets)
- 3TB - WD RED - BACKUP (I want make here backup of WD GREEN)
- 2TB - WD RED - There i wana make POOL with GREEN - if green would work after LLF (low level format)
But i gues that i am found problem on GREEN runing ZFS - Check file system - and when i Run copy - system crash ... I am just guesing
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
That's better than I thought we'd see. So that is a plus.

I'd start looking at copying small chunks to see if there is a certain single file that kills the copy. I'd possibly try mounting the 3TB in a workstation/client and transfer over the network. I would probably get ugly and just attach the second device as a mirror at some point, with the intent to clean it up and restore to a nice pool later in desperation. I might even image that drive, and try and work from a fresh copy. But we're into non-simple solutions. Of course the best answer is. Build a mirrored pool, restore the backup. :)

@cyberjock may have even more bright ideas.
 

hama4tux

Dabbler
Joined
Nov 11, 2014
Messages
14
I am waiting when finish check file system. and i will run copy one more time ... by the way i am doing it right? that i made on 3TB new ZFS and start copy data to mount point directly(I want deatch GREEN - replace it by 3TB red ), simply backup would be easyer, but i need to still run services on my nas :] i cant do long break down.., i have there 3 jails services....:(

So in realy bad situation i will copy data trought network... but my notebook hadnt esata so it will be to slow., Well i prefer Raidz2 too but no money no funny:p and 3TB must go back to job, when i finish migration:(
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
No real choice on any of this but to just work through it. When you hit a snag you try a different approach, until you run out of options or it simply isn't worth it to proceed. It shouldn't be hard to break down the copy into bite size chunks and see what is up. Good Luck.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
There is no low level format on modern disks...

With whatever magic you are doing, you can only expect the firmware on a disk to remap bad sector(s).

If your bad sector count was very low and stopped increasing you may be fine...
 
Status
Not open for further replies.
Top