Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1.6] Fail to set resource disk to xfs type in RHEL-7 #400

Closed
yuxisun1217 opened this issue Aug 31, 2016 · 1 comment
Closed

[2.1.6] Fail to set resource disk to xfs type in RHEL-7 #400

yuxisun1217 opened this issue Aug 31, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@yuxisun1217
Copy link

Hi,

Do we support xfs type for resource disk now? Because xfs type is the default file system type in RHEL-7.
If we want to support xfs type, it seems that mkfs.xfs command doesn't have -F option(Line128 in azurelinuxagent/daemon/resourcedisk/default.py: shellutil.run("mkfs." + fs + " " + partition + " -F")). I think we can use '-f' if the type is xfs. Thanks!

WALA version: 2.1.6
OS: RHEL-7.3 internal build

Reproduce steps:

  1. Set ResourceDisk.Filesystem=xfs in waagent.conf.
  2. Deprovision this VM. Capture an image. Create a new VM base on this image.

Actual Result:
Cannot format /dev/sdb1 to xfs type.
Error logs in waagent.log:
2016/08/31 16:23:55.060711 ERROR run cmd 'mkfs.xfs /dev/sdb1 -F' failed
2016/08/31 16:23:55.084195 ERROR Error Code:1
2016/08/31 16:23:55.089074 ERROR Result:mkfs.xfs: invalid option -- 'F'
unknown option -F

@hglkrijger hglkrijger self-assigned this Aug 31, 2016
@hglkrijger hglkrijger added this to the v2.1.7 milestone Aug 31, 2016
@hglkrijger hglkrijger added the bug label Aug 31, 2016
@yuxisun1217
Copy link
Author

Hi @hglkrijger ,

I find that if I use xfs file system, the "swapon /mnt/resource/swapfile" command returns error:
2016/09/29 11:05:27.795097 ERROR run cmd 'swapon /mnt/resource/swapfile' failed
2016/09/29 11:05:27.821972 ERROR Error Code:255
2016/09/29 11:05:27.826900 ERROR Result:swapon: /mnt/resource/swapfile: swapon failed: Invalid argument
2016/09/29 11:05:27.848735 ERROR Failed to enable swap (000005)/mnt/resource/swapfile

I google it and find that it is because the fallocate does not physically allocate the space -- but swapon syscall requires a real space. (https://bugzilla.redhat.com/show_bug.cgi?id=1129205#c3)
So for xfs file system, perhaps we have to use "dd" instead of "fallocate". I tried "dd" and it works well on xfs file system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants