g2p / bedup

Btrfs deduplication
http://pypi.python.org/pypi/bedup
GNU General Public License v2.0
323 stars 50 forks source link

bedup.filesystem.NotPlugged Error #51

Open stratbasher opened 10 years ago

stratbasher commented 10 years ago

Hello,

I've installed BTRFS on my External Hard Drive and was hoping to use bedup for deduplication. I'm running Ubuntu Server 14.04.1, kernel version 3.16.0-031600-generic, and python version 2.7.6. Upon running "sudo bedup scan /ext/path/to/directory" or "sudo bedup scan uuid-here", I get this error and stacktrace....

Traceback (most recent call last):
  File "/usr/local/bin/bedup", line 9, in <module>
    load_entry_point('bedup==0.9.0', 'console_scripts', 'bedup')()
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/__main__.py", line 487, in script_main
    sys.exit(main(sys.argv))
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/__main__.py", line 476, in main
    return args.action(args)
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/__main__.py", line 147, in vol_cmd
    [volpath], tt, recurse=True)
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 584, in load_vols
    vol = self._get_vol_by_path(volpath, desc=VolDesc(volpath, True))
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 424, in _get_vol_by_path
    return self._get_vol(fd, desc)
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 443, in _get_vol
    fs = self.get_fs(uuid=fs_uuid)
  File "/home/adam/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 398, in get_fs
    raise NotPlugged(uuid)

That's as far as I can get. Is this related to #26 ?

jgmtfia commented 10 years ago

I have the same problem.

Linux dad 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

~ $ python --version

Python 2.7.6

~/bin/bedup dedup /root/Btrfs

Traceback (most recent call last): File "/root/bin/bedup", line 9, in load_entry_point('bedup==0.9.0', 'console_scripts', 'bedup')() File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/main.py", line 487, in script_main sys.exit(main(sys.argv)) File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/main.py", line 476, in main return args.action(args) File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/main.py", line 147, in vol_cmd [volpath], tt, recurse=True) File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 584, in load_vols vol = self._get_vol_by_path(volpath, desc=VolDesc(volpath, True)) File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 424, in _get_vol_by_path return self._get_vol(fd, desc) File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 443, in _get_vol fs = self.get_fs(uuid=fs_uuid) File "/root/.local/lib/python2.7/site-packages/bedup-0.9.0-py2.7-linux-x86_64.egg/bedup/filesystem.py", line 398, in get_fs raise NotPlugged(uuid) bedup.filesystem.NotPlugged: ebf2696f-e890-46ae-a9e4-c7e918b1866b

I don't know enough for the code to provide any hints

386 def get_fs(self, uuid): 387 assert isinstance(uuid, UUID) 388 if uuid not in self._fs_map: 389 if uuid in self.device_info: 390 db_fs, fs_created = get_or_create( 391 self.sess, BtrfsFilesystem, uuid=str(uuid)) 392 else: 393 # Don't create a db object without a live fs backing it
394 try: 395 db_fs = self.sess.query( 396 BtrfsFilesystem).filter_by(uuid=str(uuid)).one() 397 except NoResultFound: 398 raise NotPlugged(uuid) 399 fs = BtrfsFilesystem2(self, db_fs, uuid) 400 self._fs_map[uuid] = fs 401 return self._fs_map[uuid]

g2p commented 9 years ago

FWIW, this is similar to #33 and may have the same workaround.

ptman commented 7 years ago

I'm getting NotPlugged when running bedup scan with either mount path or uuid

muggenhor commented 6 years ago

I have the same problem. Both with mount path and UUID. Not using any path finishes within 2.4 seconds and I'm not seeing any size differences (and am expecting some, because I've got several Debian LXC containers on this system with quite some file overlap).

I'm running this from within a LXC Debian Stretch container on an OpenWRT (armhf) host. The root subvolume is mounted within that container, so perfectly accessible.