最近工作上遇到一個問題,就是要將xfsprogs build到mips的target board上,經過一番努力後,終於成功將xfsprogs build到image裏頭。
之後mount了一顆ide硬碟,裏面有四個partition,第一個為swap,二、三為ext3的file system,第四個為xfs file system。
接著我必須對第四個partition作 xfs_check,一開始會出現 Out of Memory的問題,於是我將swap打開,過程如下:
swapon /dev/hd1
xfs_check /dev/hda4
問題來了,xfs_check偶而可以順利執行完畢,但更多時候會出現 Out of Memory的錯誤。
請問是否有高手,同好遇過此類型的問題,是有辦法可以避掉這個錯誤?
PS: 我確定我的swap是有開啟的。另外我也嘗試過掛另一顆swap硬碟,但一樣會出現 Out of Memory的錯誤。 (苦惱)
Log 如下:
uclibc[~]# swapon /dev/hda1
Adding 249992k swap on /dev/hda1. Priority:-1 extents:1 across:249992k
uclibc[~]# xfs_check /dev/hda4 ==> 這次順利執行完畢,但下一次就出現錯誤了
uclibc[~]# xfs_check /dev/hda4
oom-killer: gfp_mask=0x200d2, order=0
Mem-info:
DMA per-cpu:
cpu 0 hot: low 0, high 90, batch 15 used:5
cpu 0 cold: low 0, high 30, batch 7 used:28
DMA32 per-cpu: empty
Normal per-cpu: empty
HighMem per-cpu: empty
Free pages: 3336kB (0kB HighMem)
Active:6817 inactive:4895 dirty:0 writeback:2 unstable:0 free:819 slab:543 mapped:8528 pagetables:35
DMA free:3276kB min:2268kB low:2832kB high:3400kB lots:4536kB active:27332kB inactive:19580kB present:321536kB pages_scanned:56 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA32 free:0kB min:0kB low:0kB high:0kB lots:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Normal free:0kB min:0kB low:0kB high:0kB lots:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:128kB low:128kB high:128kB lots:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 3*4kB 19*8kB 10*16kB 7*32kB 6*64kB 6*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 3748kB
DMA32: empty
Normal: empty
HighMem: empty
Swap cache: add 9603, delete 9493, find 3986/4555, race 260+0
Free swap = 246728kB
Total swap = 249992kB
Free swap: 246728kB
80384 pages of RAM
0 pages of HIGHMEM
67095 reserved pages
147 pages shared
110 pages swap cached
Out of Memory: Killed process 724 (xfs_db).
Killed