You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行mount -o remount,rw /命令后无法正常启动且磁盘空间异常的问题求助

执行mount -o remount,rw /命令后无法正常启动且磁盘空间异常的问题求助

Hey there, let's break down what's probably going on here and get your system back up and running smoothly. That odd behavior where deleting files shrinks the total disk size but leaves available space stuck at zero is a classic clue—here are the most likely causes and fixes:

1. You might have run out of inodes (not just raw disk space)

Linux uses inodes to track file metadata, and even if you have free storage, if all inodes are used up, you can't create new files. This usually happens when you've got tons of tiny files (like cache entries, temporary logs, or mail queue files) cluttering up the system.

  • First, check your inode usage in recovery mode with this command:

    df -i /
    

    Look at the Use% column for inodes—if it's sitting at 100%, that's your culprit.

  • To find which directories are hoarding all the inodes, run this to count files per top-level directory:

    find / -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr
    

    Head into the directories with the highest counts (usually /tmp, /var/cache, or /var/spool/mqueue) and delete any unnecessary tiny files. For example:

    rm -rf /tmp/*
    

    Just double-check you're not deleting anything critical before hitting enter!

2. Hidden mounts are hiding actual used space

Sometimes, if you mount another partition over an existing directory that already had files, those original files get "hidden" but still take up space. When you delete files from the mounted directory, you're only touching the new partition's files—not the hidden ones.

  • Compare the output of these two commands to spot discrepancies:
    df -h /  # Shows the system's reported used space
    du -sh / # Calculates the actual space used by files
    
    If du shows way less space used than df, you've got hidden mounts. Run mount to list all active mounts, then unmount non-essential ones (like /mnt/your-drive or /var/tmp) with:
    umount /mnt/your-drive
    
    After unmounting, you'll see the hidden files in the original directory—delete any you don't need.

3. File system corruption is messing with space calculations

Your original mount command had a typo (mount -o remount,rw/, instead of mount -o remount,rw /), which could have triggered file system errors, leading to incorrect space reporting.

  • In recovery mode, run a file system check on your root partition. First, find your root partition device name with:

    blkid
    

    Look for the partition labeled / or root (it'll look like /dev/sda1 or /dev/nvme0n1p2).

  • Then run the check (make sure the partition isn't mounted first, which it usually isn't in recovery mode):

    fsck -y /dev/sda1
    

    The -y flag auto-approves fixes—this should repair any corruption causing the wonky space stats.

4. Fix the mount command typo

Just to cover bases, make sure you're using the correct remount command if you need to re-enable read-write mode later:

mount -o remount,rw /

Once you've tried these steps, reboot your system and see if it boots normally. If you still run into issues, share the output of the commands you ran—I can help dig deeper!

备注:内容来源于stack exchange,提问作者DvdG

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 12:34:32