Volume DEGRADED

Status
Not open for further replies.

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Hi, there. My RAID1 volume is showing Status as DEGRADED. I can still access all the data, so no problem there. I am getting a yellow Alert, WARNING the volume status is UNKNOWN: one or more devices could not be opened. Sufficient replicas exist for the fool to continue functioning in a degraded state. Attach the missing device and online it using "zpool online".

We had a power outage recently, so I am guessing that is the cause. I will be buying a UPS tomorrow, so please don't flame me. :)

Complete newbie here. Can someone explain in layman terms how I can get back to a HEALTHY status?

thank you!!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
There's a way to do this from the GUI but for discussion here the CLI is easier.

Go to the command line and type "zpool status"

Paste the results here inside a CODE block
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
I had a peek inside the machine and found out that the power supply to the drive in question had become disconnected. I reconnected the drive and turned the system back on. It took along time to come online, but now I am showing HEALTHY again.

Does Freenas automatically sync the two drives then in a situation like this? As I said the volume shows HEALTHY and I can access all the data as normal. I am assuming I am good to go, but I would like some advice to confirm this as I am a little nervous now and want to make sure I still have redundant data protection.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
ZFS is a little smarter than your average RAID array. While we refer to its parity-based protection strategy as "RAIDZ", it is actually allocating things in a manner that results in storage of parity along with a stripe. It is ... different. Look at http://pthree.org/2012/12/05/zfs-administration-part-ii-raidz/ for a picture.

ZFS will (currently) treat the failed drive as present, and as long as enough data was written to the RAIDZ to successfully reconstruct the data, it allows it to happen. Otherwise it reports a write error. You can see the logic around line 1900 of vdev_raidz.c

When you perform a scrub, assuming that anything was "written" to the missing drive, the data will be reconstructed and updated as part of the scrub.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Oh. So I'm half asleep. The answer to your question is "please run a scrub."
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Thanks for the info! I ran the scrub from the gui and it appears to be finished. I don't see any report or anything from the scrub, but the volume is still showing healthy and the alert is green and all data still accessible.

do you think I am in good shape?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Go to the CLI and type "zpool status".

It'll tell you what happened in the heading line called "scan:"
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
I have two other volumes on this machine. So when I put in the zpool status command, it zips past the pool in question and I am left only able to see the last pool which has always been working. Is there a way to scroll up or otherwise see what's going on?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
zpool status | less
This allows you to scroll up and down through the output. Hit q to exit.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
You can either
- SSH into your machine with a client supporting scrolling (e.g. Putty for Windows)
- Dump the output into a file: "zpool status > /mnt/yourPool/status.txt"
- Only view output for the restored pool: "zpool status POOLNAME" (replace POOLNAME with the name of the pool)

[edit]
Ah yeah, wasn't sure if less is part of FreeNAS ;)
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
-Tried "zpool status > /mnt/yourPool/status.txt", it returns "/mnt/yourPool/status.txt: No such file or directory."

-Tried "zpool status POOLNAME", it returns "cannot open 'poolname': no such pool"

I tried all three volume/pool names in the above with identical results. Volume/Pool names are: main_server, tb_disk, spare

??
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
That worked, thank you!

"scan: scrub repaired 0 in 1h33m with 0 error on Mon Sep 23"
"errors: No known errors"
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Ah yeah, wasn't sure if less is part of FreeNAS ;)

less became an integral part of FreeBSD many years ago, I believe when it became dual-licensed (BSD/GPL). The old pager that came from Net/2 was crap in comparison. :smile: more is a link to less.
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
So, with my scan results, does it look like I am good to go?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well yeah, don'tchathink? I don't know how much happier sounding it could get.
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
I hear you brother! thanks for your help!
 
Status
Not open for further replies.
Top