Hi all,
So, I wanted to replace a failed disk by a good one.
The new disk has never been used. I made some GPT operations to add partitions, exactly like other disks.
1) power down the sever
2) replace the disk
3) power up the server
4) zpool replace stockage gpt/disk6
it created a disk named "old" and I got this ( I supposed the disk1 have to be changed too ...)
in this post:
https://forums.freebsd.org/threads/18519/
this method was recommended:
But ... humm ... it seems to be done on single user mode, the resilver operation takes a day, even more, and my users can not wait such a long time, and I'm not sure to do that during the weekend ....
so, I need some helps, thanks.
regards
So, I wanted to replace a failed disk by a good one.
The new disk has never been used. I made some GPT operations to add partitions, exactly like other disks.
Code:
uname -ar
FreeBSD myserver.mynet.net 8.2-RELEASE FreeBSD 8.2-RELEASE
gpart create -s gpt ad10
gpart add -b 128 -s 4194304 -t freebsd-swap -l swap-disk6 ad10
gpart add -t freebsd-zfs -l disk6 ad10
2) replace the disk
3) power up the server
4) zpool replace stockage gpt/disk6
it created a disk named "old" and I got this ( I supposed the disk1 have to be changed too ...)
Code:
NAME STATE READ WRITE CKSUM
stockage DEGRADED 0 0 32
raidz2 DEGRADED 0 0 126
gpt/disk7 ONLINE 0 0 0
gpt/disk1 ONLINE 0 0 0 127K resilvered
replacing DEGRADED 0 0 0
gpt/disk6/old UNAVAIL 0 0 0 cannot open
gpt/disk6 ONLINE 0 0 0 1.22T resilvered
gpt/disk0 ONLINE 0 0 0
gpt/disk3 ONLINE 0 0 0
gpt/disk2 ONLINE 0 0 0
gpt/disk5 ONLINE 0 0 0
gpt/disk4 ONLINE 0 0 0
in this post:
https://forums.freebsd.org/threads/18519/
this method was recommended:
- zpool export <poolname>
- shutdown the ZFS box
- physically remove the drive
- zero the drive (see below)
- physically attach the drive
- boot the ZFS box to single-user mode
- /etc/rc.d/hostid start
- zpool import <poolname> (should come up DEGRADED with ad14 marked as missing)
- zpool replace <poolname> ad14
But ... humm ... it seems to be done on single user mode, the resilver operation takes a day, even more, and my users can not wait such a long time, and I'm not sure to do that during the weekend ....
so, I need some helps, thanks.
regards