Replace failed drive in UFS volume

Status
Not open for further replies.

ausmike

Cadet
Joined
Jan 18, 2015
Messages
6
I have a basic system with 5 drives making up a UFS volume. One of the drives has failed, so the volume now reports as degraded. I can't seem to find any documentation or other web info that tells you how to replace the failed drive.
If I just physically replace the drive, my volume reports that it is "unable to determine free space" and I can't access it at all.
With the bad drive installed, when I click on "Volume Status", I don't get anything.
The UFS volume manager only seems to allow creating new volumes (it offers the failed drive as the only option in a new volume).
Is there a set of steps required to replace a drive in a UFS volume, other than just plugging the new one in?

System Info:
Build
FreeNAS-9.2.1.8-RELEASE-x64 (e625626)
PlatformIntel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz
Memory6121MB

Thanks
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I'd expect the manual to say something about that, but so few people here use UFS that you're unlikely to get a fast answer.
 
D

dlavigne

Guest
The section in the docs on replacing a failed drive is supposed to work for both UFS and ZFS. If following those instructions isn't successful, post the type of UFS volume (eg mirror, stripe, RAID3).
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Considering that UFS isn't supported on FreeNAS 9.3+, if there was an error in the 9.2.1.x documentation it's a bit late to fix it now. ;)
 
D

dlavigne

Guest
Just to clarify, I wasn't think documentation, I was thinking which FreeBSD command to use to determine the status of the volume :smile:
 

ausmike

Cadet
Joined
Jan 18, 2015
Messages
6
dlavigne

I tried to follow the ZFS documentation for replacing a hard drive, but none of the menus or options the doc's showed appear for the UFS volume. When I select the storage main menu, it lists my volume, but I only get three options (buttons) at the bottom of the screen "Detach Volume", "Change Permissions" and "volume Status". The volume status screen does not show anything.

I believe I set up the volume as Raid5, but can't be exactly sure as I can't see anything in the web interface that allows me to see that info for a UFS volume.

Thanks
 
D

dlavigne

Guest
Hardware RAID5? Software UFS graid5 isn't supported in FreeNAS (though it was in the old .7 days). Any idea how long ago the volume was originally setup and what the OS was at the time? What does gpart list say?
 

ausmike

Cadet
Joined
Jan 18, 2015
Messages
6
I honestly can't remember the system asking what raid to use. I created the volume by entering the volume name and selecting the five drives and it did the rest. If it had asked about raid, I would of selected what ever was the highest, I was aiming for reliability over space . The system was only set up about two months ago, so no OS updates since then. If I had more than 6GB of memory, I would of set up a ZFS volume instead, but the doco all said a minimum of 8GB for ZFS

The gpart list has a lot of info, what do you need to know as I can't see anything that indicates RAID levels?

Thanks
 
D

dlavigne

Guest
Let's see if it's a RAID3 then. Post the output of graid3 list and graid3 status.
 

ausmike

Cadet
Joined
Jan 18, 2015
Messages
6
It is raid three, the graid3 status report

Name Status Components
raid3/mainvol DEGRADED ada5 (ACTIVE)
ada4 (ACTIVE)
ada3 (ACTIVE)
ada2 (ACTIVE)

The list report

Geom name: mainvol
State: DEGRADED
Components: 5
Flags: NONE
GenID: 1
SyncID: 1
ID: 2344069741
Zone64kFailed: 0
Zone64kRequested: 128986
Zone16kFailed: 806
Zone16kRequested: 25035
Zone4kFailed: 0
Zone4kRequested: 5694
Providers:
1. Name: raid3/mainvol
Mediasize: 2000431446016 (1.8T)
Sectorsize: 2048
Stripesize: 16384
Stripeoffset: 0
Mode: r1w1e2
Consumers:
1. Name: ada5
Mediasize: 500107862016 (465G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
State: ACTIVE
Flags: NONE
GenID: 1
SyncID: 1
Number: 4
Type: PARITY
2. Name: ada4
Mediasize: 500107862016 (465G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Flags: NONE
GenID: 1
SyncID: 1
Number: 3
Type: DATA
3. Name: ada3
Mediasize: 500107862016 (465G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Flags: NONE
GenID: 1
SyncID: 1
Number: 2
Type: DATA
4. Name: ada2
Mediasize: 500107862016 (465G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
State: ACTIVE
Flags: NONE
GenID: 1
SyncID: 1
Number: 1
Type: DATA

ada1 is the failed drive
 

korvarn85

Cadet
Joined
May 14, 2015
Messages
3
Hello ausmike, I'm experiencing the very same issue with the very same configuration, was you able to solve your problem following dlavigne instructions?

Thanks a lot both!
 

ausmike

Cadet
Joined
Jan 18, 2015
Messages
6
korvarn
Yes it did, in fact the web page with the graid3 options had an example of the two commands to replace a failed drive which I followed. I then did a graid3 status and I could see that the array was synchronizing
 

korvarn85

Cadet
Joined
May 14, 2015
Messages
3
Hey thanks for the good news!

For example, if I have to replace drive in "ada3", shall I issue the following first:

graid3 remove -n 0 ada3

and then I can power off the server, disconnect the ada3 drive, replace it with a new drive, boot the server, and issue the following command

graid3 insert -n 0 data ada3

Any help is greatly appreciated! :smile:
 

ausmike

Cadet
Joined
Jan 18, 2015
Messages
6
Firstly, you need the name of the volume and you need to know which drive number ada3 is.
To do this, start a shell and type in "graid3 list | less"

upload_2015-5-15_20-19-22.png


In my case, the volume is called mainvol. Use Ctrl V to page down till you see ada3

upload_2015-5-15_20-21-18.png


Note the number for it. In my case, its 2 (press Q to exit from the "less" STDOUT viewer)

Once you have those two bits of info, in my case, the remove command becomes

graide3 remove -n 2 mainvol

you would need to replace the 2 with your drive number and the mainvol with your volume name.

After putting the new drive in, in my case, the insert command is

graid3 insert -n 2 mainvol ada3

Again, you would need to replace the 2 with your drive number and the mainvol with your volume name. Once this is done type in
"graid3 status"
to see it rebuilding
 

korvarn85

Cadet
Joined
May 14, 2015
Messages
3
Perfect, thanks for the detailed explanation, I'll perform a backup and will try your steps

Thanks again for you time!
 
Status
Not open for further replies.
Top