地址:蘭州市城關區科技街88號
電話:(86)0931-8265989
傳真:(86)0931-8260768
手機:13909315556
郵箱:ygb@jrhdec.com
解答:
1. 我們先在rootvg中創建一個文件係統,例如/sunsmall
#lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
fslv04 jfs2 2 2 1 open/syncd /sunsmall
#more /etc/filesystems
/sunsmall:
dev = /dev/fslv04
vfs = jfs2
log = /dev/hd8
mount = false
options = rw
account = false
2. 卸載該文件係統
#umount /sunsmall
#lsvg -l rootvg
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
fslv04 jfs2 2 2 1 closed/syncd /sunsmall
3. 使用cplv命令將該lv移動至另一個vg,例如datavg中
#cplv -v datavg fslv04
cplv: Logical volume fslv04 successfully copied to fslv00
#lsvg -l datavg
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
dumplv jfs2 4864 4864 7 open/syncd /dump
fslv00 jfs2 4 4 1 closed/syncd N/A
我們可以看到datavg中產生了一個新的lv。
4. 修改/etc/filesystems,使得文件係統/sunsmall對應於datavg中的新的lv和datavg中的log設備(如果該log設備不是現存的,則需要單獨創建)。
#more /etc/filesystems
/sunsmall:
dev = /dev/fslv00
vfs = jfs2
log = /dev/loglv00
mount = false
options = rw
account = false
5. 重新加載文件係統/sunsmall
#mount /sunsmall
#lsvg -l datavg
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
dumplv jfs2 4864 4864 7 open/syncd /dump
fslv00 jfs2 4 4 1 open/syncd /sunsmall
可以看到這個文件係統已經移動到了datavg中。
6. 刪除舊的lv設備fslv04
#rmlv fslv04
Warning, all data contained on logical volume fslv04 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume fslv04 is removed.