Adding A Hard Drive And Removing Another One
We haven't used /dev/sdf until now. We will now create the partition /dev/sdf1 (25GB) and add that to our fileserver volume group.
kilo:~#fdisk /dev/sdf
kilo:~# pvcreate /dev/sdf1
Physical volume "/dev/sdf1" successfully created
Add /dev/sdf1 to our fileserver volume group:Physical volume "/dev/sdf1" successfully created
kilo:~#:vgextend fileserver /dev/sdf1
kilo:~#:vgdisplay
That's it. /dev/sdf1 has been added to the fileserver volume group. Now let's remove /dev/sdb1. Before we do this, we must copy all data on it to /dev/sdf1
kilo:~# pvmove /dev/sdb1 /dev/sdf1
/dev/sdb1: Moved: 1.9%
. . .
/dev/sdb1: Moved: 100.0%
/dev/sdb1: Moved: 1.9%
. . .
/dev/sdb1: Moved: 100.0%
kilo:~# vgreduce fileserver /dev/sdb1
Removed "/dev/sdb1" from volume group "fileserver"
Removed "/dev/sdb1" from volume group "fileserver"
kilo:~# vgdisplay
kilo:~# pvremove /dev/sdb1
kilo:~# pvremove /dev/sdb1
kilo:~# pvdisplay
Không có nhận xét nào:
Đăng nhận xét