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-next>] [day] [month] [year] [list]
Date:	Wed, 16 Apr 2014 16:46:42 +0800
From:	Wayne Chou <gmmark12@...il.com>
To:	linux-ext4@...r.kernel.org
Subject: ext4_orphan_cleanup errors during mount a LVM snapshot

Dear all,

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

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.

- Wayne
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ