1

For unknown reason, the ownership of this directory changed. This is a mount point: VM-data is /dev/sda3 which is a btrfs file system.

When I changed it back, I got an error,

chown: changing ownership of 'VM-data': No space left on device

but it seems to have worked.

linux-7gt2:/srv # ls -l
total 16
drwxr-xr-x 1 root root   0 Sep 25  2014 ftp
drwxr-x--- 1 tftp tftp   0 Apr 28 07:04 tftpboot
drwxr-xr-x 1 root root 176 Oct 26  2014 VM-data
drwxr-xr-x 1 root root  36 Oct 26  2014 www
linux-7gt2:/srv # chown john:users VM-data
chown: changing ownership of ‘VM-data’: No space left on device
linux-7gt2:/srv # ls -l
total 16
drwxr-xr-x 1 root root    0 Sep 25  2014 ftp
drwxr-x--- 1 tftp tftp    0 Apr 28 07:04 tftpboot
drwxr-xr-x 1 john users 176 Oct 26  2014 VM-data
drwxr-xr-x 1 root root   36 Oct 26  2014 www
linux-7gt2:/srv # 

There is 133GB free on that device, according to fd. "no space" is also the kind of misleading errors I got from a program that was using files in that directory, because it could not write to it. So I wonder if that is the real error or not?

This is the top of a mounted tree, so I wonder if there is something special about how to set ownership and permissions for the file system as a whole that I need to worry about.


update

It seems to be a glitch in btrfs made it go into read-only mode. Marking it root is probably also part of the defensive lock-down when it detects some error.

I don't know how to check to see if a mount is ro or rw. I only know what I asked of it, and that differs.

I never saw any indication of errors either. On a desktop OS, can something be turned on to alert the user?

  • Is your device mounted with read / write perms ? – Luis Sieira Aug 27 '15 at 23:13
  • What do df and df -i show for /srv/VM-data? Also, can you chown on say a subdirectory of that directory (i.e. is the error only on the top-level dir, or also on subdirs)? – thrig Aug 27 '15 at 23:32
  • @thrig I didn't try chown on subdirs, but touch to try writing a file: still gave "disk full" even with permission fixed. I think it remounted ro on its own accord, but don't know how to check that directly. – JDługosz Aug 27 '15 at 23:45
  • What I did do is try another partition that was mounted with the same text in fstab. So I know default,discard normally works ok and is rw (the meaning of default didn't change from yesterday). – JDługosz Aug 27 '15 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.