Odd questions about drive replacement

Status
Not open for further replies.

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
So my configuration's a little unusual, which sometimes leads me to wonder about odd things. My pool is composed of three mismatched RAIDZ2 vdevs: 6 x 6 TB, 6 x 4 TB, and 3 x 2 TB + 3 x 3 TB. Ordinarily you can't replace a drive with a smaller drive, but this setup leaves me with a few questions.

One of the 2 TB drives in the last vdev is failing, so I've ordered a 3 TB drive to replace it. If I also replace the other 2 TB drives with 3 TB drives, of course, the vdev (and thus the pool) will expand, but just replacing one drive won't have that effect. So after I replace one 2 TB drive with a 3 TB drive, 1 TB of the space on that 3 TB drive isn't going to be used in the vdev at all. Could I subsequently replace that 3 TB drive with another 2 TB drive? Logic suggests I could, but I've never had the opportunity to test.

Similarly, could I replace one of the existing 3 TB drives with a 2 TB drive? Again, logic suggests I should be able to--1 TB of the capacity on those drives isn't being used, since they're in a RAIDZ2 vdev with 2 TB drives.

I'm not likely to actually want to do this, but it does make me wonder.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Makes me wonder too. From what I believe, when you replace a 2TB drive with a 3TB drive, all the space of the 3TB drive is allocated but of course that extra 1TB of capacity isn't used just because you can't stripe more data to it than what the other drives have available. So does ZFS treat it like a 2TB drive or a 3TB drive, good question.

I wouldn't expect an issue with replacing the 3TB drive with a 2TB drive since the pool was only limited to 2TB drives in the first place, but if you try it, please post those results.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
So my configuration's a little unusual, which sometimes leads me to wonder about odd things. My pool is composed of three mismatched RAIDZ2 vdevs: 6 x 6 TB, 6 x 4 TB, and 3 x 2 TB + 3 x 3 TB. Ordinarily you can't replace a drive with a smaller drive, but this setup leaves me with a few questions.

One of the 2 TB drives in the last vdev is failing, so I've ordered a 3 TB drive to replace it. If I also replace the other 2 TB drives with 3 TB drives, of course, the vdev (and thus the pool) will expand, but just replacing one drive won't have that effect. So after I replace one 2 TB drive with a 3 TB drive, 1 TB of the space on that 3 TB drive isn't going to be used in the vdev at all. Could I subsequently replace that 3 TB drive with another 2 TB drive? Logic suggests I could, but I've never had the opportunity to test.

Similarly, could I replace one of the existing 3 TB drives with a 2 TB drive? Again, logic suggests I should be able to--1 TB of the capacity on those drives isn't being used, since they're in a RAIDZ2 vdev with 2 TB drives.

I'm not likely to actually want to do this, but it does make me wonder.

It worked when I did it.

To be sure you can partition the drive and add the partition through the CLI

It should Work fine. The vdev only expands IF auto expand is on and all drives are larger.
 

rosabox

Explorer
Joined
Jun 8, 2016
Messages
77
It works, in my 8 disk raidz2 pool (5x1,5TB;3x2TB) I had to replace one of the 2TB drives (bad sectors) and I had only a 1,5TB replacement disk and it went well.
 
Status
Not open for further replies.
Top