SOLVED Replacing a non-full disk with a smaller disk?

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
This question has only arisen due to the fact that I have a 2TB drive among my 1TB drive filled pool. I used the 2TB drive to replace a failing 1TB it was all I had at the time. Now, I know that the 2TB disk is only using 1TB of space given it's in a vdev of 1TB drives. Is there any chance that I can replace that 2TB drive with a working 1TB given that it is only using 1TB in ZFS. This question is due to failure to follow best practices, haha. I knew that I'd hit this situation eventually but it's worth a shot to ask.

Thanks guys,
Vito Reiter
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
This question has only arisen due to the fact that I have a 2TB drive among my 1TB drive filled pool. I used the 2TB drive to replace a failing 1TB it was all I had at the time. Now, I know that the 2TB disk is only using 1TB of space given it's in a vdev of 1TB drives. Is there any chance that I can replace that 2TB drive with a working 1TB given that it is only using 1TB in ZFS. This question is due to failure to follow best practices, haha. I knew that I'd hit this situation eventually but it's worth a shot to ask.

Thanks guys,
Vito Reiter
Yes, you can replace the 2TB with a 1TB drive, provided the new 1TB drive has the same (or more) capacity as the other 1TB drives in your pool.
 

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
Yes, you can replace the 2TB with a 1TB drive, provided the new 1TB drive has the same (or more) capacity as the other 1TB drives in your pool.

Sweet, just another amazing feature of ZFS saves my day once again. Thanks for the quick reply man, I appreciate it!
 

paylesspizzaman

Explorer
Joined
Sep 1, 2015
Messages
92
This worked for me too. I had 2 vdevs full of 8TB disks, I wanted to expand my pool by replacing one vdev (one disk at a time) with 10TB disks. One of the vdevs was mostly full and the other wasn't. Not thinking about trying to balance vdevs, the first disk I replaced was in the mostly empty vdev. After the resilver started I realized I should have replaced disks in the other vdev. After the resilver was done, I was pleasantly surprised that the FreeNAS GUI allowed me to replace the 10TB drive with the original 8TB again.
 
Top