Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Fix "edquota: Cannot stat() mounted device /dev/root"

This guide explains why edquota shows this error and how to fix it. It needs root access, so it is for VPS and dedicated server owners.

Email2 min read10 steps

What does the error mean?

A disk quota is a limit on how much space a user may use. The edquota command edits those limits. To do its job, it looks at each disk listed on the server.

The word "stat" means to look up details about a file or device. The error says edquota tried to look at a device called /dev/root and could not find it. On many servers, /dev/root is a name in the mount list that does not exist as a real file. So quota tools get confused.

Warning

You will edit a system file. A mistake can stop the server from starting. Take a backup first, and keep a spare copy of every file you change.

Steps

  1. Log in to your server over SSH as root. SSH is a safe way to type commands on a remote server.
  2. Run this command to see the real name of your main disk.
    df -h /
    It shows the disk or partition that holds the main files. Note the name in the first column.
  3. Look at the mounted list.
    cat /etc/mtab | grep root
    This shows any line that mentions /dev/root.
  4. Back up the file that lists your disks.
    cp /etc/fstab /etc/fstab.bak
    This makes a spare copy of the disk list.
  5. Open /etc/fstab in an editor such as nano.
    nano /etc/fstab
  6. Check that the main disk line uses its real device name or its UUID, not /dev/root. A UUID is a unique ID for a disk. You can see it with the blkid command.
  7. Check that the options for that line include usrquota or usrjquota, as needed for quotas.
  8. Save the file and exit.
  9. Apply the change.
    mount -o remount /
    This tells the server to reload the settings for the main disk.
  10. Rebuild the quota files and try again.
    quotacheck -cugm /
    edquota -u username
    Replace username with the user you want to edit.
Tip: On servers with cPanel, there is a tool called /scripts/fixquotas. It repairs quotas in a safe way. Try it first before editing files by hand.

If it still fails

Do not guess with disk settings. Open a ticket at https://secure.hostvento.com/submitticket.php and tell support the full error and what you changed.

Quick recap

  • The error means edquota cannot find a disk named /dev/root.
  • You need root access.
  • Back up /etc/fstab before any change.
  • Use the real device name or UUID, and make sure quota options are on.
  • Remount, then run quotacheck and edquota again.