lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Apr 2014 10:33:22 -0600
From:	Andreas Dilger <adilger@...ger.ca>
To:	Wayne Chou <gmmark12@...il.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: ext4_orphan_cleanup errors during mount a LVM snapshot

On Apr 16, 2014, at 2:46 AM, Wayne Chou <gmmark12@...il.com> wrote:
> I create a LVM snapshot from a mounted ext4 file system by:
> "lvcreate -kn --snapshot --name snap1 /dev/mapper/vg1/lv1"
> 
> And after I mount this snapshot to another folder like:
> "mount -t ext4 /dev/mapper/vg1-snap1 /mnt/test"
> the following messages prompted in dmesg:
> 
> [ 2445.480908] EXT4-fs (dm-6): orphan cleanup on readonly fs
> [ 2445.502317] EXT4-fs (dm-6): ext4_orphan_cleanup: deleting
> unreferenced inode 131180
> [ 2445.502355] EXT4-fs (dm-6): ext4_orphan_cleanup: deleting
> unreferenced inode 131176
> [ 2445.502360] EXT4-fs (dm-6): ext4_orphan_cleanup: deleting
> unreferenced inode 131175
> [ 2445.502366] EXT4-fs (dm-6): ext4_orphan_cleanup: deleting
> unreferenced inode 131174
> [ 2445.502372] EXT4-fs (dm-6): ext4_orphan_cleanup: deleting
> unreferenced inode 131173
> [ 2445.502376] EXT4-fs (dm-6): 5 orphan inodes deleted

The first question is whether you are experiencing any actual problems
as a result of the orphan inode cleanup?  This is normal behaviour if
there are applications with open-unlinked files when the snapshot is taken,
or if the system crashes at this point.  The orphan cleanup will free up
these open-unlinked inodes and their blocks at mount time, keeping the
filesystem consistent.

> To find out what the reason is, I use 'lsof' on lv1's mount point before I take
> the snapshot.  Then I got some MySQL services that opened these temporary files
> which causes the orphan inodes in LVM snapshots:
> mysqld    26257 admin    7u   REG  253,5        0 131173
> /LV1/.system/tmp/ibTidhzb (deleted)
> mysqld    26257 admin    8u   REG  253,5        0 131174
> /LV1/.system/tmp/ibgWhCYc (deleted)
> mysqld    26257 admin    9u   REG  253,5        0 131175
> /LV1/.system/tmp/ibJE5pne (deleted)
> mysqld    26257 admin   10u   REG  253,5        0 131176
> /LV1/.system/tmp/ibsvL9hg (deleted)
> mysqld    26257 admin   14u   REG  253,5        0 131180
> /LV1/.system/tmp/ibcz1qOM (deleted)
> 
> 
> From the above investigation, the problem gets solved if I
> disable the MySQL service before taking the LVM snapshot.
> 
> However, I wonder if there's any other way to solve this issue.
> For example, can I just blindly remove these orphan inodes when
> ext4_freeze() is called?  Thank you.

What problem needs to be solved?  Is it just the printing of these
error messages that is confusing, or something else?

Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ