Replace a disk vith virtual disk

Status
Not open for further replies.

Pierremenard

Dabbler
Joined
Mar 13, 2012
Messages
15
Hello,

I have 3 old pata drive in my freenas ZFS RAID0 configuration (+ 3 Sata): 350 GB, 40 GB and 80GB.
Now I have 1 new Sata drive and I would like to replace the 3 PATA with this new one.

My idea was to create 3 virtual disk from 3 different partition (or maybe from 3 disk images from the same partition) on the new drive and than run a zpool replace PATA1 VDISK1, PATA2 VDISK2, PATA3 VDISK 3.

It seems no cakewalk and I need a step by step guide. Can anyone help me?

F.
 

Pierremenard

Dabbler
Joined
Mar 13, 2012
Messages
15
Ok, I managed it by myself. In case other noobs need help, the steps are

1. Create three partitions (zfs) with "gpart add" with desired dimension. Remember that each partition have to be at least equal to the drive you want to replace.
2. Write down the size and the name of partition (e.g. ada5p2 500 gb, ada5p3 250 gb, ada5p4 200 gb)
3. Run "zpool status [pool]" and write down the name of the drives you want to replace with the size (e.g. ada0p2 450 gb etc)
4. Start the resilvering with "zpool replace [pool] [old drive name from point 3] [new partition name from point 2] (e.g. "zpool replace Media ada0p2 ada5p2).

I have to do the resilvering one by one, even if openbsd support more than 1 silvering at the time. Maybe I have som limitiation due to ram/processor.

F.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Pierre,

There have been a few other discussions about doing this. While it's possible, it's a very bad idea for anything other than playing. What is the reason you are doing this?


To anyone else reading this and considering trying it, DON'T DO IT!!


EDIT: It is not possible to resilver more than 1 disk at a time, and you should NEVER replace more than 1 disk a time.
 

Pierremenard

Dabbler
Joined
Mar 13, 2012
Messages
15
Hi ProtoSD,

I'm doing it because 1 disk has a lower power consumption than 3. When I started the pool I had several small disk and I wanted to reduce the number. I asked in the forum and I was told this is possible...
As I'm experiencing some problem right now, could you please tell me what's the problem in doing so?

F.

p.s. you get no error if you try to resilver more than 1 disk at a time, it would be nice to receive a warning message when you try to do so...
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi ProtoSD,

I'm doing it because 1 disk has a lower power consumption than 3. When I started the pool I had several small disk and I wanted to reduce the number. I asked in the forum and I was told this is possible....

Yes, there are a lot of things you can do with Unix and it will happily comply, that doesn't mean because it works it is a good thing.

Take a look at this discussion:

http://forums.freenas.org/showthrea...-add-a-drive-later-on&highlight=virtual+drive
 
Status
Not open for further replies.
Top