lvm2在线更换硬盘
2008-04-28      
打印自: 安恒公司
地址: HTTP://gentoo.anheng.com.cn/news/article.php?articleid=1538
lvm2在线更换硬盘
将mount状态下,把vg0/home卷从/dev/sda7移动到/dev/sdb7
YZ:/# df -h /home
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg0-home   32G   23G  9.5G  71% /home
YZ:/# pvmove  -n /dev/mapper/vg0-home /dev/sdb7 /dev/sda7
  /dev/sdb7: Moved: 1.2%
  /dev/sdb7: Moved: 2.4%
  /dev/sdb7: Moved: 3.5%
  /dev/sdb7: Moved: 12.9%
  /dev/sdb7: Moved: 14.0%
  /dev/sdb7: Moved: 15.1%
  /dev/sdb7: Moved: 16.3%
  /dev/sdb7: Moved: 17.4%
  /dev/sdb7: Moved: 26.7%
  /dev/sdb7: Moved: 27.8%
  /dev/sdb7: Moved: 28.9%
  /dev/sdb7: Moved: 30.1%
  /dev/sdb7: Moved: 31.2%
  /dev/sdb7: Moved: 32.3%
  /dev/sdb7: Moved: 39.0%
  /dev/sdb7: Moved: 40.2%
  /dev/sdb7: Moved: 46.0%
  /dev/sdb7: Moved: 47.2%
  /dev/sdb7: Moved: 48.2%
  /dev/sdb7: Moved: 87.5%
  /dev/sdb7: Moved: 88.7%
  /dev/sdb7: Moved: 89.9%
  /dev/sdb7: Moved: 94.9%
  /dev/sdb7: Moved: 96.1%
  /dev/sdb7: Moved: 97.3%
  /dev/sdb7: Moved: 98.4%
  /dev/sdb7: Moved: 99.7%
  /dev/sdb7: Moved: 100.0%
大约30分钟完成操作。

责任编辑: admin