gpt4 book ai didi

linux - 'cat/proc/swaps' 什么都不返回

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:35:36 25 4
gpt4 key购买 nike

<分区>

请不要再在这个问题上浪费您的时间...我最终删除了整个 VM 并创建了另一个。我这样做所花费的时间少于解决问题所花费的时间。我有几个处于 RAID 模式的 SSD。

感谢所有尝试解决问题的人!

当我运行命令 cat/proc/swaps 时,我遇到了 ubnuntu 没有显示事件交换空间的问题。这是我运行的命令列表。我什至添加了一个新的交换空间(文件:/swapfile1)只是为了确保至少有一个交换空间,但我仍然一无所获。

hebbo@ubuntu-12-lts:~$ sudo fdisk -l
[sudo] password for hebbo:

Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders, total 52428800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e3a7a

Device Boot Start End Blocks Id System
/dev/sda1 * 46569472 52426751 2928640 82 Linux swap / Solaris
/dev/sda2 2046 46567423 23282689 5 Extended
/dev/sda5 2048 46567423 23282688 83 Linux

Partition table entries are not in disk order
hebbo@ubuntu-12-lts:~$ sudo su

root@ubuntu-12-lts:/home/hebbo# cat /proc/swaps
Filename Type Size Used Priority
root@ubuntu-12-lts:/home/hebbo# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
524288+0 records in
524288+0 records out
536870912 bytes (537 MB) copied, 1.18755 s, 452 MB/s
root@ubuntu-12-lts:/home/hebbo# mkswap /swapfile1
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=cb846612-5f27-428f-9f83-bbe24b410a78
root@ubuntu-12-lts:/home/hebbo# chown root:root /swapfile1
root@ubuntu-12-lts:/home/hebbo# chmod 0600 /swapfile1
root@ubuntu-12-lts:/home/hebbo# swapon /swapfile1


root@ubuntu-12-lts:/home/hebbo# cat /proc/swaps
Filename Type Size Used Priority
root@ubuntu-12-lts:/home/hebbo#

知道如何解决这个问题吗?

这是在 vmware VM 中运行内核 3.9.0 的 ubuntu 12.04 LTS。

提前致谢!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com