Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
BTRFS: can not delete directory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 283

PostPosted: Sun Jun 05, 2016 1:45 pm    Post subject: BTRFS: can not delete directory Reply with quote

I found that I can't delete empty directory "/root/.local/share/Trash/files/srv".
It's weird. Is it a BTRFS bug?

Code:
fpemud-workstation / # trash-empty
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/trash-empty", line 5, in <module>
    sys.exit(main())
  File "/usr/lib64/python2.7/site-packages/trashcli/cmds.py", line 31, in empty
    ).run(*sys.argv)
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 937, in run
    parse(argv)
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 806, in __call__
    self.default_action()
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 963, in _empty_all_trashdirs
    self.trashdirs.list_trashdirs()
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 879, in list_trashdirs
    self.emit_home_trashcan()
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 884, in emit_home_trashcan
    self.home_trashcan.path_to(return_result_with_volume)
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 238, in path_to
    out('%(HOME)s/.local/share/Trash' % self.environ)
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 883, in return_result_with_volume
    self.on_trash_dir_found(trashcan_path, '/')
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 979, in _analize_trash_directory
    self.trashdir.each_orphan(self.on_orphan_found)
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 1081, in each_orphan
    if not self.file_reader.exists(trashinfo_path): action(file_path)
  File "/usr/lib64/python2.7/site-packages/trashcli/trash.py", line 836, in delete_orphan
    self._file_remover.remove_file(path_to_backup_copy)
  File "/usr/lib64/python2.7/site-packages/trashcli/fs.py", line 25, in remove_file
    shutil.rmtree(path)
  File "/usr/lib64/python2.7/shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib64/python2.7/shutil.py", line 254, in rmtree
    os.rmdir(path)
OSError: [Errno 1] Operation not permitted: '/root/.local/share/Trash/files/srv'

fpemud-workstation / # rm -rf /root/.local/share/Trash/files/srv
rm: cannot remove '/root/.local/share/Trash/files/srv': Operation not permitted

fpemud-workstation / # ls -la /root/.local/share/Trash/files/srv
total 0
drwxr-xr-x 1 root root 0 Jul  9  2015 .
drwx------ 1 root root 6 Jun  5 16:42 ..

fpemud-workstation / # ls -la /root/.local/share/Trash/files
total 0
drwx------ 1 root root  6 Jun  5 16:42 .
drwx------ 1 root root 10 Jun  5 16:41 ..
drwxr-xr-x 1 root root  0 Jul  9  2015 srv


Code:
fpemud-workstation / # mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=3932304k,nr_inodes=983076,mode=755)
/dev/bcache0 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=5,subvol=/)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
configfs on /sys/kernel/config type configfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sdd1 on /boot type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/126 type tmpfs (rw,nosuid,nodev,relatime,size=786848k,mode=700,uid=126,gid=990)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=786848k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6013

PostPosted: Sun Jun 05, 2016 4:25 pm    Post subject: Reply with quote

Did you accidentally create a volume there? (`btrfs subvol list /root`)
Back to top
View user's profile Send private message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 283

PostPosted: Mon Jun 06, 2016 12:55 pm    Post subject: Reply with quote

Ah, yes you're right:
Code:
fpemud-workstation / # btrfs subvol list /
ID 415 gen 240850 top level 5 path var/lib/machines
ID 442 gen 316764 top level 5 path root/.local/share/Trash/files/srv
ID 448 gen 289540 top level 5 path srv


Err, what I should do then?
Why I have these sub-volumes?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum