今天给虚拟机上的/sirsi文件系统扩容,看下所在的vg是有空余pp(300G以上)的
但是:
unicorn:/ #chfs -a size=+300G /sirsi
chfs: 0506-945 The /dev/fslv00 JFS2 filesystem superblock is corrupted.
unicorn:/ #fsck -p /sirsi
The current volume is: /dev/fslv00
File system is currently mounted.
Unable to read primary superblock.
Unable to read either superblock.
根据度娘:http://www.loveunix.net/thread-58908-1-1.html
尝试,但是还是不行
unicorn:/ #dd count=1 bs=4k skip=31 seek=1 if=/dev/fslv00 of=/dev/fslv00
dd: 0511-051 The read failed.
: A system call received a parameter that is not valid.
0+0 records in.
0+0 records out.
unicorn:/ #fsck /dev/fslv00
The current volume is: /dev/fslv00
File system is currently mounted.
Unable to read primary superblock.
Unable to read either superblock.
最后没有办法,反正里边数据没用就想删除lv,但莫名其妙fsopen failed: There is a request to a device or address that does not exist.
经过一番折腾,最后varyoff datavg和exportvg都报错,但是又无法varyonvg,因为vg底下的lv全部是活动的无法umount,而在varyoffvg之前这之前又无法umount lv ,总之是死循环了,只好重启AIX
重启后/sirsi文件系统已经umount,并且所有lv都是关闭状态。
unicorn:/ #df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 19.50 6.29 68% 5042 1% /
/dev/hd2 10.00 8.56 15% 32847 2% /usr
/dev/hd9var 9.75 9.49 3% 4386 1% /var
/dev/hd3 5.00 4.99 1% 64 1% /tmp
/dev/hd1 0.25 0.25 1% 10 1% /home
/proc - - - - - /proc
/dev/hd10opt 0.25 0.15 42% 2232 7% /opt
unicorn:/ #lsvg -l datavg
datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 closed/syncd N/A
fslv00 jfs2 18608 18608 2 closed/syncd /sirsi
fslv01 jfs2 306 306 1 closed/syncd /fslv00
然后我关闭了vg,并且export一下
unicorn:/ #varyoffvg datavg
unicorn:/ #exportvg datavg
unicorn:/ #
在varyonvg之后很显然应该没法再varyon、以及对里边任何fs、lv下手了。
unicorn:/ #varyonvg datavg
0516-008 varyonvg: LVM system call returned an unknown
error code (3).
unicorn:/ #rmfs /sirsi
rmfs: 0506-915 No record matching /sirsi was found in /etc/filesystems.
unicorn:/ #rmlv /dev/fslv01
Warning, all data contained on logical volume /dev/fslv01 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
0516-306 getlvodm: Unable to find /dev/fslv01 in the Device
Configuration Database.
0516-912 rmlv: Unable to remove logical volume /dev/fslv01.
unicorn:/ #rmlv /dev/fslv00
Warning, all data contained on logical volume /dev/fslv00 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? yes
0516-306 getlvodm: Unable to find /dev/fslv00 in the Device
Configuration Database.
0516-912 rmlv: Unable to remove logical volume /dev/fslv00.
此时再lsvg可以看到datavg已经不见了
unicorn:/ #lsvg
rootvg
此时观察pv,都是none,可以新做vg了。
unicorn:/ #savebase
unicorn:/ #lspv
hdisk0 00cb2ee577b260d8 rootvg active
hdisk1 00cb2ee5d8a4af69 rootvg active
hdisk2 00cb2ee53b98536b None
hdisk3 00cb2ee5ca400c87 None
————————————————————————————————————————————————————————————————
开始重新建vg
————————————————————————————————————————————————————————————————
1,由于防止之前的pvid再ODM中没有刷新
因此,我
unicorn:/ # chdev -l hdisk2 -a pv=clear
hdisk2 changed
unicorn:/ # chdev -l hdisk3 -a pv=clear
hdisk3 changed
unicorn:/ #
2.为两块盘新建pvid
unicorn:/ #chdev -l hdisk3 -a pv=yes
hdisk3 changed
unicorn:/ #chdev -l hdisk2 -a pv=yes
hdisk2 changed
unicorn:/ #
3.新建vg,但是报这两个pv在被vg占用,尼玛之前的datavg我都清了还占用个毛线?查了一下被哪个vg占用,却得到一堆天书??
unicorn:/ #mkvg -y datavg hdisk2 hdisk3
0516-1398 mkvg: The physical volume hdisk2, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-1398 mkvg: The physical volume hdisk3, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-862 mkvg: Unable to create volume group.
unicorn:/ #lqueryvg -p hdisk2
512
24
19482
3
2
3
0
32512
4
1
1
0
0
38397
128
0
0
0
0
0
16128
艹,难道之前删除的datavg还阴魂不散?
unicorn:/ #reducevg -d datavg hdisk2
0516-306 getlvodm: Unable to find volume group datavg in the Device
Configuration Database.
0516-882 reducevg: Unable to reduce volume group.
unicorn:/ #man lqueryvg
Manual entry for lqueryvg not found or not installed.
我不管了,我force行吗?别问我后果是啥
unicorn:/ #mkvg -f -y datavg hdisk2 hdisk3
datavg
unicorn:/ #lsvg
rootvg
datavg
unicorn:/ #lsvg datavg
VOLUME GROUP: datavg VG IDENTIFIER: 00cb2ee500004c000000014d1cf537ea
VG STATE: active PP SIZE: 512 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1198 (613376 megabytes)
MAX LVs: 256 FREE PPs: 1198 (613376 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
unicorn:/ #
美呢,进去了
unicorn:/ #lsvg -p datavg
datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 399 399 80..80..79..80..80
hdisk3 active 799 799 160..160..159..160..160
创建文件系统
unicorn:/ #crfs -v jfs2 -g datavg -m /sirsi -a size=550G -a agblksize=2048 -a logname=INLINE
File system created successfully.
576118228 kilobytes total disk space.
New File System size is 1153433600
mount上,并且修改开机自动挂载
#mount /sirsi
#vi /etc/filesystems
******省略前边*******
/sirsi:
dev = /dev/fslv00
vfs = jfs2
log = INLINE
mount = automatic
account = false
O了~喝乌鸡汤去了~
unicorn:/etc #df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 19.50 6.29 68% 5036 1% /
/dev/hd2 10.00 8.56 15% 32847 2% /usr
/dev/hd9var 9.75 9.49 3% 4385 1% /var
/dev/hd3 5.00 4.99 1% 64 1% /tmp
/dev/hd1 0.25 0.25 1% 10 1% /home
/proc - - - - - /proc
/dev/hd10opt 0.25 0.15 42% 2232 7% /opt
/dev/fslv00 550.00 549.29 1% 4 1% /sirsi
本文出自 “8420107” 博客,转载请与作者联系!
原文地址:http://8430107.blog.51cto.com/8420107/1641685