Copy from read only pool to external back up drive.

Status
Not open for further replies.

james21984

Cadet
Joined
Aug 21, 2018
Messages
7
System:
Freenas 9.10
motherboard: ASRock E3C226D2I Mini ITX Server Motherboard LGA 1150 Intel C226
CPU: Intel Core i3-4170
Ram: 16GB non-ECC ram
Four 4TB hard drives in RaidZ2
One 4TB hard drive in USB enclosure

I had bought non-ECC ram by mistake originally then never got around to replacing it. From reading other posts it seems this may have contributed to the original problem. Raidz2 pool became unaccessible and freenas would not respond to anything. I reinstalled freenas on the flash drive and attempted to import the pool but the system would just reboot on normal import through the GUI. I was able to import it as read only through CLI but now I can not seem to figure out how to copy the data to the hard drive connected via USB. Below is the result of zpool import. Also I am posting zpool status after importing as read only. I am not that well versed in freenas but it seems the MediaDrive pool should be able to be imported normally but so far it seems to be a no go. I have 98% of the data from it backed up so it is not terrible if I cannot get anything copied but if I can get the other 2% of data copied off that would be great.

The only reference to copying data I can seem to find is with send and receive which seem to require snapshots however, when I try to do so I get a message saying a snapshot cannot be done when the pool is in read only. Any help on how to copy the data from the pool to the external hard drive would be appreciated.

[root@freenas] ~# zpool import
pool: JAILS
id: 10801889089018461470
state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and
the '-f' flag.
see: http://illumos.org/msg/ZFS-8000-EY
config:

JAILS ONLINE
gptid/644b0065-9294-11e8-81df-d05099c0bf1b ONLINE

pool: MediaDrive
id: 5983258818703635859
state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and
the '-f' flag.
see: http://illumos.org/msg/ZFS-8000-EY
config:

MediaDrive ONLINE
raidz2-0 ONLINE
gptid/b184ba9c-0ca4-11e6-a246-d05099c0bf1b ONLINE
gptid/b24dbf7c-0ca4-11e6-a246-d05099c0bf1b ONLINE
gptid/b304d197-0ca4-11e6-a246-d05099c0bf1b ONLINE
gptid/b434e670-0ca4-11e6-a246-d05099c0bf1b ONLINE


[root@freenas] ~# zpool status
pool: BackUp
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
BackUp ONLINE 0 0 0
gptid/e1dd5e3f-a4bc-11e8-bc05-d05099c0bf1b ONLINE 0 0 0

errors: No known data errors

pool: MediaDrive
state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption. Applications may be affected.
action: Restore the file in question if possible. Otherwise restore the
entire pool from backup.
see: http://illumos.org/msg/ZFS-8000-8A
scan: scrub in progress since Sun Aug 5 00:00:16 2018
4.26T scanned out of 4.26T at 1/s, (scan is slow, no estimated time)
192K repaired, 100.01% done
config:

NAME STATE READ WRITE CKSUM
MediaDrive ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
gptid/b184ba9c-0ca4-11e6-a246-d05099c0bf1b ONLINE 0 0 0
gptid/b24dbf7c-0ca4-11e6-a246-d05099c0bf1b ONLINE 0 0 0
gptid/b304d197-0ca4-11e6-a246-d05099c0bf1b ONLINE 0 0 0
gptid/b434e670-0ca4-11e6-a246-d05099c0bf1b ONLINE 0 0 0

errors: 6 data errors, use '-v' for a list

pool: freenas-boot
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
da0p2 ONLINE 0 0 0

errors: No known data errors
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Have you tried mounting the USB drive? Also the odds of non-ECC ram eating your data and ZFS seeing errors on your disks is extremely low. Odds are the controller or cabling or driver issues caused the fault. Have you check the smart data for the drives?
 

james21984

Cadet
Joined
Aug 21, 2018
Messages
7
The USB drive is mounted. But I have no idea what to enter in CLI to copy data from the main pool (MediaDrive) to the back up USB drive. The main pool can only be mounted as read only in CLI and does not show in the GUI.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
The USB drive is mounted. But I have no idea what to enter in CLI to copy data from the main pool (MediaDrive) to the back up USB drive. The main pool can only be mounted as read only in CLI and does not show in the GUI.
What did you do to mount the USB drive?
 

james21984

Cadet
Joined
Aug 21, 2018
Messages
7
The USB drive was mounted through the GUI. It is the BackUp pool that shows in the zpool status above.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
So this backup drive will not be used with windows? Was there any data on the backup drive? You can use the cp command to copy data from one location to another. i.e. cp -R /mnt/oldpool/ /mnt/newpool/. This would copy all files from existing data sets. you could also use zfs send and receive to effectively
clone the old pool to the new on.
 

pro lamer

Guru
Joined
Feb 16, 2018
Messages
626
Tl;dr

If you suspect ram problem... Have you run RAM tests recently then?

EDIT: if the RAM broke down your backup may get EDIT2: even more corrupted too...

Sent from my mobile phone
 
Last edited:

james21984

Cadet
Joined
Aug 21, 2018
Messages
7
The back up drive is a fresh unused drive I had but not used yet. @kdragon75, I do not believe I can use send receive as that seems to require snapshots which I can not do with a read only pool as I stated above. cp would be the command to copy everything from one pool to the other?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
The back up drive is a fresh unused drive I had but not used yet. @kdragon75, I do not believe I can use send receive as that seems to require snapshots which I can not do with a read only pool as I stated above. cp would be the command to copy everything from one pool to the other?
Good point on the snapshots:confused:. As for cp, yeah its just a file copy.
 

james21984

Cadet
Joined
Aug 21, 2018
Messages
7
When I try
cp -Rv /mnt/MediaDrive /mnt/BackUp/

I get a message saying
cp: /mnt/MediaDrive: No such file or directory

What am I doing wrong?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
add a slash and * at the end. Otherwise its looking for the file MediaDrive
cp -Rv /mnt/MediaDrive/* /mnt/BackUp/
If you google a command and just add BSD MAN you will find the FreeBSD Manual page that give lots of details.
 

james21984

Cadet
Joined
Aug 21, 2018
Messages
7
It just says
cp: No match.

I ran ls /mnt but for some reason it only shows BackUp. But when I run zfs list it shows the mount point as /mnt/MediaDrive. I mounted the MediaDrive pool with
zpool import -f -o readonly=on -fNR /mnt MediaDrive

Where does the pool get mounted when it is read only?
 
Status
Not open for further replies.
Top