Bug 607527 - support xfs
Summary: support xfs
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kexec-tools   
(Show other bugs)
Version: 6.0
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Cong Wang
QA Contact: Chao Ye
Depends On:
Blocks: 740277
TreeView+ depends on / blocked
Reported: 2010-06-24 10:05 UTC by Qian Cai
Modified: 2013-09-30 02:18 UTC (History)
5 users (show)

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)
Last Closed: 2010-11-11 14:45:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 07:57 UTC, Cong Wang
no flags Details | Diff
Proposed patch based on Eric's suggestion (1.27 KB, patch)
2010-07-16 06:48 UTC, Cong Wang
no flags Details | Diff
updated version (1.17 KB, patch)
2010-07-23 09:41 UTC, Cong Wang
no flags Details | Diff

Description Qian Cai 2010-06-24 10:05:57 UTC
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):

Comment 1 Qian Cai 2010-06-24 10:15:19 UTC
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 07:57:25 UTC
Created attachment 427336 [details]
Proposed patch

Does this patch fix the problem?

Comment 3 Qian Cai 2010-06-28 09:07:53 UTC
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 18:43:19 UTC
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)

       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.


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


Comment 8 Cong Wang 2010-07-15 06:29:27 UTC
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 09:23:36 UTC
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 17:11:38 UTC
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:

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

but like this:

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

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 06:48:15 UTC
Created attachment 432310 [details]
Proposed patch based on Eric's suggestion

Comment 12 Cong Wang 2010-07-23 09:41:47 UTC
Created attachment 433907 [details]
updated version

Comment 14 Han Pingtian 2010-07-25 08:34:08 UTC
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 06:12:09 UTC
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 14:45:47 UTC
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.