可用的交换空间为 0 MB

[oracle@oracle11g-std database]$ ./runInstaller -silent -ignorePrereq  -responseFile  /home/oracle/database/response/db_install.rsp
正在启动 Oracle Universal Installer...


检查临时空间: 必须大于 120 MB。   实际为 5449 MB    通过

检查交换空间: 可用的交换空间为 0 MB, 所需的交换空间为 150 MB。    未通过 <<<<

[root@oracle11g-std ~]# swapon -s
Filename                                Type            Size    Used    Priority
[root@oracle11g-std ~]#---结果为空

[root@oracle11g-std ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           773        328        445          0         42        108
-/+ buffers/cache:        177        596
Swap:            0          0          0--------------------------------显示为空
[root@oracle11g-std ~]# lvdisplay 
  --- Logical volume ---
  LV Name                /dev/vg_oracle11gstd/lv_root
  VG Name                vg_oracle11gstd
  LV UUID                ICHlPw-t84Z-5CKo-dZmC-s9zV-65tB-Fowgyt
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                19.00 GiB
  Current LE             4864
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/vg_oracle11gstd/lv_swap
  VG Name                vg_oracle11gstd
  LV UUID                iVSDgb-BQc0-cZHP-1xCt-KZ91-vcdM-uW0y8g
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                500.00 MiB
  Current LE             125
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   -------lv显示正常
[root@oracle11g-std ~]# mount -a
之后还是一样,没有mount上
[root@oracle11g-std ~]# ll -l  /dev/vg_oracle11gstd/lv_swap
lrwxrwxrwx. 1 root root 7  5月 10 20:02 /dev/vg_oracle11gstd/lv_swap -> ../dm-1
查看挂载点也正常
[root@oracle11g-std ~]# swapoff on /dev/vg_oracle11gstd/lv_swap  
swapoff: on: swapoff failed: 没有那个文件或目录--------------感觉这个提示的有问题啊

swapoff: /dev/vg_oracle11gstd/lv_swap: swapoff failed: 无效的参数
[root@oracle11g-std ~]#  ll -l /dev/vg_oracle11gstd/lv_swap  
lrwxrwxrwx. 1 root root 7  5月 10 20:02 /dev/vg_oracle11gstd/lv_swap -> ../dm-1
[root@oracle11g-std ~]# swapon -v /dev/vg_oracle11gstd/lv_swap
swapon on /dev/vg_oracle11gstd/lv_swap
swapon: /dev/mapper/vg_oracle11gstd-lv_swap: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/mapper/vg_oracle11gstd-lv_swap: pagesize=4096, swapsize=1644167168, devsize=524288000
swapon: /dev/mapper/vg_oracle11gstd-lv_swap: last_page 0x62000000 is larger than actual size of swapspace
swapon: /dev/vg_oracle11gstd/lv_swap: swapon failed: 无效的参数----------这个是关键,也就是说挂载文件本身是有问题的,需要重建

[root@oracle11g-std ~]# mkswap /dev/mapper/vg_oracle11gstd-lv_swap  
mkswap: /dev/mapper/vg_oracle11gstd-lv_swap: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 511996 KiB
no label, UUID=a2ec0b37-431f-4afd-a165-254fc4a2035f
[root@oracle11g-std ~]# swapon -v /dev/vg_oracle11gstd/lv_swap  
swapon on /dev/vg_oracle11gstd/lv_swap
swapon: /dev/mapper/vg_oracle11gstd-lv_swap: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/mapper/vg_oracle11gstd-lv_swap: pagesize=4096, swapsize=524288000, devsize=524288000
[root@oracle11g-std ~]# mount -a
[root@oracle11g-std ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       511992  0       -1
[root@oracle11g-std ~]# 

总结:
使用resize减小swap之后需要常见swap,不然会出现上面的问题

你可能感兴趣的:(linux)