[Bug 1288106] [NEW] Regular 'find' searches of cron jobs, should not search BTRFS snapshots

Nikola M 1288106 at bugs.launchpad.net
Wed Mar 5 08:07:05 UTC 2014


Public bug reported:

'find' util that get called to index files on disk , goes crazy if there are new BTRFS snapshots of main System subvolume (@) 
and starts searching inside of them making index for various scheduled tasks, 
even if snapshot contents is identical to that indexed before.
(BTRFS unlike ZFS have it's snapshots exposed as at least read-only and even read-write by default at the root of snapshotted subvolume mountpoint - /@snapshotname par example for system subvolume)

How to reproduce: use BTRFS as root (/, system) filesystem.
make Several BTRFS snapshots of main system subvolume (@)
watch as find util constantly searches inside of snapshots, at the time in day designated to run daily and other cron jobs.

It could also go for other snapshots, not only system one, (@/home , whatever)
where a) aether program invoking find in cron job should be aware of BTRFS specifics
and not waste time in searching in consequent snapshots, but only look at differences in files between them,
b) or find util itself could be made more clever to recognize BTRFS snapshots
c) or some other tool for searching should be used, that recognize BTRFS and ZFS snapshots (they reside in hidden .zfs directory, if implemented, so I suppose they are spared from find redudant searches?, for now)

I go for a)  for starters, because at least 2 main system subvolumes (@ and @home) could avoid such find-trashing of their snapshots. and go for c) and/or b) in the future,
where is a) is used, there could be a list of BTRFS subvolumes somewhere in /etc, that presents Paths where indexing should be avoided, or indexing gets done only on changed parts between snapshots.

Also, not fixing this bug could lead of people stop using BTRFS because
of Ubuntu not recognizing it's specifics and with large snapshotting use
(that is quite inexpensive on copy-on-write filesystems) could lead to
trashing systems with redundant find work.

Alternative d) is that BTRFS itself in Ubuntu does not expose BTRFS subvolume snapshots in the filesystem mount point,
but at least to do that somewhere where 'find' can not find it or does not mount subvolume snapshots at all until needed.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: anacron 2.3-19ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-17.31-generic 3.11.10.3
Uname: Linux 3.11.0-17-generic x86_64
NonfreeKernelModules: zfs zunicode zavl zcommon znvpair nvidia
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Wed Mar  5 08:35:51 2014
InstallationDate: Installed on 2012-10-26 (494 days ago)
InstallationMedia: Xubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120822.1)
MarkForUpload: True
SourcePackage: anacron
UpgradeStatus: Upgraded to saucy on 2014-02-10 (22 days ago)

** Affects: anacron (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug saucy third-party-packages

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to anacron in Ubuntu.
https://bugs.launchpad.net/bugs/1288106

Title:
  Regular 'find' searches of cron jobs, should not search BTRFS
  snapshots

Status in “anacron” package in Ubuntu:
  New

Bug description:
  'find' util that get called to index files on disk , goes crazy if there are new BTRFS snapshots of main System subvolume (@) 
  and starts searching inside of them making index for various scheduled tasks, 
  even if snapshot contents is identical to that indexed before.
  (BTRFS unlike ZFS have it's snapshots exposed as at least read-only and even read-write by default at the root of snapshotted subvolume mountpoint - /@snapshotname par example for system subvolume)

  How to reproduce: use BTRFS as root (/, system) filesystem.
  make Several BTRFS snapshots of main system subvolume (@)
  watch as find util constantly searches inside of snapshots, at the time in day designated to run daily and other cron jobs.

  It could also go for other snapshots, not only system one, (@/home , whatever)
  where a) aether program invoking find in cron job should be aware of BTRFS specifics
  and not waste time in searching in consequent snapshots, but only look at differences in files between them,
  b) or find util itself could be made more clever to recognize BTRFS snapshots
  c) or some other tool for searching should be used, that recognize BTRFS and ZFS snapshots (they reside in hidden .zfs directory, if implemented, so I suppose they are spared from find redudant searches?, for now)

  I go for a)  for starters, because at least 2 main system subvolumes (@ and @home) could avoid such find-trashing of their snapshots. and go for c) and/or b) in the future,
  where is a) is used, there could be a list of BTRFS subvolumes somewhere in /etc, that presents Paths where indexing should be avoided, or indexing gets done only on changed parts between snapshots.

  Also, not fixing this bug could lead of people stop using BTRFS
  because of Ubuntu not recognizing it's specifics and with large
  snapshotting use (that is quite inexpensive on copy-on-write
  filesystems) could lead to trashing systems with redundant find work.

  Alternative d) is that BTRFS itself in Ubuntu does not expose BTRFS subvolume snapshots in the filesystem mount point,
  but at least to do that somewhere where 'find' can not find it or does not mount subvolume snapshots at all until needed.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: anacron 2.3-19ubuntu2
  ProcVersionSignature: Ubuntu 3.11.0-17.31-generic 3.11.10.3
  Uname: Linux 3.11.0-17-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair nvidia
  ApportVersion: 2.12.5-0ubuntu2.2
  Architecture: amd64
  Date: Wed Mar  5 08:35:51 2014
  InstallationDate: Installed on 2012-10-26 (494 days ago)
  InstallationMedia: Xubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120822.1)
  MarkForUpload: True
  SourcePackage: anacron
  UpgradeStatus: Upgraded to saucy on 2014-02-10 (22 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/anacron/+bug/1288106/+subscriptions



More information about the foundations-bugs mailing list