Bug 707209 - e4defrag does not work with LVM device nodes.
Summary: e4defrag does not work with LVM device nodes.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: 16
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-24 12:09 UTC by Peter Hjalmarsson
Modified: 2012-09-08 20:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-02 17:15:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Hjalmarsson 2011-05-24 12:09:04 UTC
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 14:50:24 UTC
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 18:49:04 UTC
(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 10:59:23 UTC
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 19:03:15 UTC
Ok, I finally sent a patch upstream for this.  Sorry for the long delay.

Comment 5 Peter Hjalmarsson 2012-08-02 15:33:44 UTC
(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 16:57:10 UTC
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 17:07:29 UTC
I have survived so far.;)
Just close it.

Comment 8 Eric Sandeen 2012-08-02 17:15:39 UTC
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.