Mailinglist Archive: opensuse (1355 mails)

< Previous Next >
Re: [opensuse] zypper dup very busy defragging btrfs, when there is nobtrfs partition...
  • From: Richard Brown <RBrownCCB@xxxxxxxxxxxx>
  • Date: Thu, 7 Jun 2018 17:49:36 +0200
  • Message-id: <CAA0b23x6NLwSDMRxjQVQi7Wb44DFh1e2UDZR9DseLfVr0B=pUw@mail.gmail.com>
On 7 June 2018 at 14:37, Carlos E. R. <robin.listas@xxxxxxxxxxxxxx> wrote:
Hi,

zypper dup of one 42.3 system to 15.0 on a VBox guest.

After this question:

1904 packages to upgrade, 607 to downgrade, 762 new, 291 to remove, 8 to
change vendor, 8 to change arch.
Overall download size: 1.97 GiB. Already cached: 0 B. After the operation,
additional 1.3 GiB will be used.
Continue? [y/n/...? shows all options] (y):
Do you agree with the terms of the license? [yes/no] (no): yes

The system gets busy for minutes with snapper.py, and later with
btrfs-defrag-pl, but there are no btrfs partitions at all:


lsblk --output NAME,KNAME,RA,RM,RO,SIZE,TYPE,FSTYPE,LABEL,

NAME KNAME RA RM RO SIZE TYPE FSTYPE LABEL
sda sda 512 0 0 20G disk
├─sda1 sda1 512 0 0 7M part
├─sda2 sda2 512 0 0 4G part swap swap_1
├─sda3 sda3 512 0 0 10G part ext4 Main
└─sda4 sda4 512 0 0 6G part xfs Home
sdb sdb 512 0 0 20G disk
├─sdb1 sdb1 512 0 0 4G part swap swap_2
├─sdb2 sdb2 512 0 0 12G part ext4 Usr
└─sdb3 sdb3 512 0 0 4G part crypto_LUKS
└─cr_sdb3 dm-0 512 0 0 4G crypt xfs
sdc sdc 512 0 0 20G disk
└─sdc1 sdc1 512 0 0 4.9G part reiserfs Reiserfs


I can understand testing for btrfs then exiting, but it takes minutes at 100%
CPU.

Very strange

"btrfs-defrag-pl" probably related to "btrfs-defrag-plugin.py", which
is provided by the btrfsmaintenance package

No package requires btrfsmaintenance, but it is recommended by
btrfsprogs and the minimal_base pattern

The python script itself is a zypper plugin running after rpm commit,
to defrag the rpmdb folder specifically

The script itself checks that the filesystem containing the rpmdb is btrfs

Snipping the relevant lines from the script:

PATH=subprocess.check_output(["rpm", "--eval", "%_dbpath"],
**popen_kwargs).strip()
...
def fstype(path):
ret=qx('stat -f --format=%T "'+path+'"')
return ret.rstrip()
...
if fstype(PATH) != 'btrfs':
self.ack()
return
...

So the questions now are

Q1 where does your system think it's rpmdb is located? Run "rpm --eval
%_dbpath" to give the exact same answer that the script will get

Q2 why does the script think it's btrfs? Run "stat -f --format=%T
$ANSWER_TO_Q1" to give the exact same answer to the script

Q3 if Q2 doesn't say it's btrfs, then you've found a legitimate bug
with the plugin in the btrfsmaintenance package that justifies a bug
report with this debugging information to make it very clear that the
return isn't being called as expect when the filesystem is not btrfs

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References