Best way to replace a disk in an LVM? - SUN
This is a discussion on Best way to replace a disk in an LVM? - SUN ; Our Solaris 9 server has a disk c3t9d0 which reports via SMART that it
is failing. However, it has no uncorrected errors yet, so it should be
ok to just copy the data off of it (rather than restoring the ...
-
Best way to replace a disk in an LVM?
Our Solaris 9 server has a disk c3t9d0 which reports via SMART that it
is failing. However, it has no uncorrected errors yet, so it should be
ok to just copy the data off of it (rather than restoring the whole
volume from tape). It is part of this lvm, from /etc/lvm/md.tab
d60 1 4 /dev/dsk/c4t0d0s2 \
/dev/dsk/c4t1d0s2 \
/dev/dsk/c3t8d0s2 \
/dev/dsk/c3t9d0s2
We have a spare disk which is exactly the same kind as these four.
It seems to me that the easiest thing to do would be to
1. shutdown (power off)
2. stuff in the new disk (for instance, as c4t2d0)
3. boot to single user
4. dd if=/dev/rdsk/c3t9d0s2 of=/dev/rdsk/c4t2d0s2 bs=2048
5. shut down again (power off)
6. pull the failing one
7. replace it with the new one
8. boot normally.
It looks like this copy also be done with "metareplace", but is there
any advantage in doing so? In terms of physically swapping the disk it
is in an external JBOD, and I'd prefer to power that (and therefore the
whole system) down when the disks are inserted or extracted. Down time
isn't a critical issue on this system.
Is there some other method which is better in some way than what I have
outlined above?
Thanks,
David Mathog
-
Re: Best way to replace a disk in an LVM?
David Mathog wrote:
I replaced the disk uneventfully as described in the preceding post.
One modification to note for future reference, this:
> 4. dd if=/dev/rdsk/c3t9d0s2 of=/dev/rdsk/c4t2d0s2 bs=2048
had a very slow transfer rate (monitored with: iostat sd53 sd32 1)
After some experimentation, it was found that the maximum transfer speed
on this system this was attained using the disk block device in
conjunction with a larger block size:
dd if=/dev/dsk/c3d9d0s2 of=/dev/dsk/c4t2d0s2 bs=16384
When run that way the entire 147GB was copied in 44 minutes, for an
average transfer rate of 55MB/sec. (This was between two Ultra320
Maxtor Atlas 10KV disks.) Also worth noting, the dd command used at
least 7 GB of the system's 8 GB of RAM to buffer this transfer, which is
why at the beginning it could read at 75MB/sec while only writing at 55
MB/sec, and at the end, it could continue to write for 160 seconds after
all reads on the input disk had ceased.
Regards,
David Mathog