Bug 607527 - support xfs
support xfs
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kexec-tools (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Cong Wang
Chao Ye
:
Depends On:
Blocks: 740277
  Show dependency treegraph
 
Reported: 2010-06-24 06:05 EDT by CAI Qian
Modified: 2013-09-29 22:18 EDT (History)
5 users (show)

See Also:
Fixed In Version: kexec-tools-2_0_0-125_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 740277 (view as bug list)
Environment:
Last Closed: 2010-11-11 09:45:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (757 bytes, patch)
2010-06-28 03:57 EDT, Cong Wang
no flags Details | Diff
Proposed patch based on Eric's suggestion (1.27 KB, patch)
2010-07-16 02:48 EDT, Cong Wang
no flags Details | Diff
updated version (1.17 KB, patch)
2010-07-23 05:41 EDT, Cong Wang
no flags Details | Diff

  None (edit)
Description CAI Qian 2010-06-24 06:05:57 EDT
Description of problem:
Currently, use xfs fs as a dump target is not working out of the box due to,

msh: can't execute 'fsck.xfs': No such file or directory

I suppose we need either to fix busybox to include fsck.xfs or bring the utility there manually.

Version-Release number of selected component (if applicable):
kexec-tools-2.0.0-84.el6
Comment 1 CAI Qian 2010-06-24 06:15:19 EDT
Also, we need to be able to mount the xfs in the kdump kernel which currently busybox is lacking.
Comment 2 Cong Wang 2010-06-28 03:57:25 EDT
Created attachment 427336 [details]
Proposed patch

Does this patch fix the problem?
Comment 3 CAI Qian 2010-06-28 05:07:53 EDT
As I said, you will probably need to train busybox to xfs.

/sbin/fsck.xfs: XFS file system.
mount: mounting /dev/mapper/VolGroup-lv_swap on /mnt failed: No such device
dropping to initramfs shell
exiting this shell will reboot your system
/ #
Comment 6 Eric Sandeen 2010-06-29 14:43:19 EDT
A couple things.

1) you don't need xfs userspace to mount an xfs filesystem.
2) fsck.xfs is a no-op in any case:

fsck.xfs(8)                                  fsck.xfs(8)

NAME
       fsck.xfs - do nothing, successfully

Not sure what the goal of running fsck in the scripts is, but fsck.xfs isn't going to do much for you.

xfs_repair is used to actually repair a broken filesystem, xfs has no need for a boot-time fsck of an uncleanly-unmounted filesystem - it has a metadata journal for this purpose.

-Eric
Comment 7 Eric Sandeen 2010-06-29 14:44:43 EDT
FWIW if you really want fsck.mkfs, busybox could probably do what xfsprogs -used- to do, and just link it to /bin/true :)

-Eric
Comment 8 Cong Wang 2010-07-15 02:29:27 EDT
Cai, I made an xfs image and mounted it manually inside busybox, there is no problem. So, please check:

1) if you can mount your xfs filesystem manually inside busybox in a normal kernel;
2) if you still can't mount it in the second kernel.
Comment 9 Han Pingtian 2010-07-15 05:23:36 EDT
I can dump the vmcore to the xfs partition, though there is an error message:

msh: can't execute 'fsck.xfs': No such file or directory
Comment 10 Eric Sandeen 2010-07-15 13:11:38 EDT
I'm surprised at all the discussion here, I think the problem is not obscure, and it can easily be fixed.

What is the reason for calling fsck from mkdumprd in any case?  Perhaps it can just be skipped altogether for xfs.

Or, if you wish, do something similar to what btrfs has:

            DUMP_FSTYPE=$config_opt
            if [ "$DUMP_FSTYPE" = "btrfs" ] ;then
                kdump_chk "test -f /sbin/btrfsck" "Unsupported type $DUMP_FSTYPE"
                bin="$bin /sbin/btrfsck"
            else

but like this:

            DUMP_FSTYPE=$config_opt
            if [ "$DUMP_FSTYPE" = "xfs" ] ;then
                kdump_chk "test -f /sbin/xfs_repair" "Unsupported type $DUMP_FSTYPE"
                bin="$bin /sbin/xfs_repair"
            else

if you can somehow get xfs_repair into the environment.  In general, though, I don't understand why a repair/fsck is needed.
Comment 11 Cong Wang 2010-07-16 02:48:15 EDT
Created attachment 432310 [details]
Proposed patch based on Eric's suggestion
Comment 12 Cong Wang 2010-07-23 05:41:47 EDT
Created attachment 433907 [details]
updated version
Comment 14 Han Pingtian 2010-07-25 04:34:08 EDT
There is a  problem. If I don't load xfs module, the dump will fail in initrd and enter user-space:

....
Saving to the local filesystem /dev/mapper/vg1-vol1
mount: mounting /dev/mapper/vg1-vol1 on /mnt failed: No such device
Attempting to enter user-space to capture vmcore
....

here, the /dev/mapper/vg1-vol1 is the xfs partition. But if I load xfs module and make kdump to rebuild the initrd, the dump will success in initrd.
Comment 17 Chao Ye 2010-08-17 02:12:09 EDT
Verified with -139.el6:
=================================================================================
......
Free memory/Total memory (free %): 44896 / 114780 ( 39.1148 )
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
  Found volume group "vg_ibmx365505" using metadata type lvm2
Activating logical volumes
  3 logical volume(s) in volume group "vg_ibmx365505" now active
Free memory/Total memory (free %): 43944 / 114780 ( 38.2854 )
Saving to the local filesystem UUID=6657a61b-9727-4d68-adf9-d96208afaeea
XFS mounting filesystem dm-2
Starting XFS recovery on filesystem: dm-2 (logdev: internal)
Ending XFS recovery on filesystem: dm-2 (logdev: internal)
Free memory/Total memory (free %): 42564 / 114780 ( 37.0831 )
Copying data                       : [100 %] 
Saving core complete
......
=================================================================================
Change Status to VERIFIED.
Comment 18 releng-rhel@redhat.com 2010-11-11 09:45:47 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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