- 论坛徽章:
- 0
|
原帖由 刘世伟 于 2008-3-2 12:17 发表 ![]()
减小的时候,resize文件系统的时候,最好多减点,最后再用不带参数的resize把它自动扩到lv的大小相同。
嗯... 這個方式是非常好的建議 
不過依據我之前測試研究的例子還說,若是配置的 PE 最小組成比方為 4M 好了,那 LVM 管理上就是以 4M 為基本單位。比方要用 lvextend 調整為 99M 好了,那實際上會配置 100M (4M 的倍數) 。而於 lvreduce 來說若是要減少成為 39M 的話,調整就是縮減成為 40M。
擴增測試像是:
- [root@expert ~]# lvdisplay /dev/backup/test
- --- Logical volume ---
- LV Name /dev/backup/test
- VG Name backup
- LV UUID uc0kCc-yi9W-t9pK-D4Rf-22BB-K3Cl-QogAPp
- LV Write Access read/write
- LV Status available
- # open 0
- LV Size 108.00 MB
- Current LE 27
- Segments 1
- Allocation inherit
- Read ahead sectors 0
- Block device 253:5
- [root@expert ~]#
- [root@expert ~]# lvextend -L +1M /dev/backup/test
- Rounding up size to full physical extent 4.00 MB
- Extending logical volume test to 112.00 MB
- Logical volume test successfully resized
复制代码
縮減部份, 測試如下:
- [root@expert ~]# lvdisplay /dev/backup/test
- --- Logical volume ---
- LV Name /dev/backup/test
- VG Name backup
- LV UUID uc0kCc-yi9W-t9pK-D4Rf-22BB-K3Cl-QogAPp
- LV Write Access read/write
- LV Status available
- # open 0
- LV Size 104.00 MB
- Current LE 26
- Segments 1
- Allocation inherit
- Read ahead sectors 0
- Block device 253:5
- [root@expert ~]# lvreduce -L 95M /dev/backup/test
- Rounding up size to full physical extent 96.00 MB
- WARNING: Reducing active logical volume to 96.00 MB
- THIS MAY DESTROY YOUR DATA (filesystem etc.)
- Do you really want to reduce test? [y/n]: y
- Reducing logical volume test to 96.00 MB
- Logical volume test successfully resized
复制代码
所以依據這樣情況來是比較不會有縮減錯誤導致資料遺失的問題。
-- |
|