Bug 707209 - e4defrag does not work with LVM device nodes.
e4defrag does not work with LVM device nodes.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: e2fsprogs (Show other bugs)
16
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Eric Sandeen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-24 08:09 EDT by Peter Hjalmarsson
Modified: 2012-09-08 16:38 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-02 13:15:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Hjalmarsson 2011-05-24 08:09:04 EDT
Description of problem:
On my laptop e4defrag does not work with device nodes handled by LVM.

Version-Release number of selected component (if applicable):
e2fsprogs-1.41.14-2.fc15.x86_64
kernel-2.6.38.6-27.fc15.x86_64

How reproducible:
# e4defrag -test -c /dev/mapper/vg_ferra-lv_root 
File is not regular file
 "/dev/mapper/vg_ferra-lv_root"
# e4defrag -test -c /dev/vg_ferra/lv_root 
File is not regular file
 "/dev/vg_ferra/lv_root"


Actual results:
See how to reporoduce.

Expected results:
Same as for:
# e4defrag -test -c /dev/sda3
<Fragmented files>                             now/best          ratio
1. /boot/grub/grub.conf                          2/1            33.33%



Additional info:
This is a pretty standard and updated Fedora 15 install, the partitioning are the same as the LiveCD does when the first half of the harddrive is filled with Windows7.
Comment 1 Eric Sandeen 2011-05-24 10:50:24 EDT
Ugh.  I knew I should have turned off e4defrag for F15.

This is probably because the devicemapper node is a symlink.  If you point it at the ultimate target of the symlink it probably works, and e4defrag needs to deref the symlink (it needs a lot of things, actually...)

Can you confirm?
Comment 2 Peter Hjalmarsson 2011-05-24 14:49:04 EDT
(In reply to comment #1)
> Ugh.  I knew I should have turned off e4defrag for F15.
> 

Hehe, yeah. It seems to have problems all over, but at least some of them (like e4defrag complaining about bad filedescriptors) seems to work when compiling and running e4defrag from git.


> This is probably because the devicemapper node is a symlink.  If you point it
> at the ultimate target of the symlink it probably works, and e4defrag needs to
> deref the symlink (it needs a lot of things, actually...)
> 
> Can you confirm?

[xake@ferra ~]$ mount | grep '/ '
/dev/mapper/vg_ferra-lv_root on / type ext4 (rw,relatime,seclabel,barrier=1,data=ordered)
[xake@ferra ~]$ ls -l /dev/mapper/vg_ferra-lv_root
lrwxrwxrwx. 1 root root 7 24 maj 19.24 /dev/mapper/vg_ferra-lv_root -> ../dm-2
[xake@ferra ~]$ sudo e4defrag -test -c /dev/dm-2 
Filesystem is not mounted
[xake@ferra ~]$

So e4defrag cannot see it being mounted.
And these problems are not fixed in git.
Comment 3 David Kovalsky 2011-12-02 05:59:23 EST
Still a valid report for F16, I can't it to work:


# e4defrag  -test -c /
Filesystem is not ext4 filesystem


NOT True!

# mount |grep root
/dev/mapper/vg_kovinek-root_3 on / type ext4 (rw,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered)


# e4defrag -test  -c /dev/mapper/vg_kovinek-root_3 
File is not regular file
 "/dev/mapper/vg_kovinek-root_3"


# readlink /dev/mapper/vg_kovinek-root_3
../dm-5


# e4defrag -test  -c /dev/dm-5 
Filesystem is not mounted


# rpm -qf `which e4defrag`
e2fsprogs-1.41.14-2.fc15.x86_64


And it doesn't work on a file either:

# e4defrag -test -c fedora-release-16-1.noarch.rpm
Filesystem is not ext4 filesystem



# uname -a
Linux kovinek 3.1.2-1.fc16.x86_64 #1 SMP Tue Nov 22 09:00:57 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-noarch
Distributor ID: Fedora
Description:    Fedora release 16 (Verne)
Release:        16
Codename:       Verne
Comment 4 Eric Sandeen 2012-07-19 15:03:15 EDT
Ok, I finally sent a patch upstream for this.  Sorry for the long delay.
Comment 5 Peter Hjalmarsson 2012-08-02 11:33:44 EDT
(In reply to comment #4)
> Ok, I finally sent a patch upstream for this.  Sorry for the long delay.

And that patch "WORKSFORME" when I tried it out. Thanks.
Comment 6 Eric Sandeen 2012-08-02 12:57:10 EDT
how critical is this for you to have fixed in fedora right now?  It's in rawhide now, unless you really need it backported to a release I'll just close it UPSTREAM.

Thanks,
-Eric
Comment 7 Peter Hjalmarsson 2012-08-02 13:07:29 EDT
I have survived so far.;)
Just close it.
Comment 8 Eric Sandeen 2012-08-02 13:15:39 EDT
Ok - Really, I'll push it to a release if you need it, but just trying to triage work a bit here.

Thanks,
-Eric

Note You need to log in before you can comment on or make changes to this bug.