You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issue #52: LXC resize and creation with mfsbdev
This commit fixes two critical issues with LXC containers on mfsbdev storage:
1. LXC creation failure: "Device size reported to be zero"
- Root cause: mfsbdev map creates a 0-byte file, causing mkfs.ext4 to fail
- Solution: Added truncate command in alloc_image() to set correct file size
- This allows LXC to mkfs the file directly for rootfs creation
2. LXC resize failure: "can't resize this image format"
- Fixed volume_resize() with proper path handling
- Added mfsnbdlink socket support for multi-cluster deployments
- Implemented proper .size file updates after resize
3. Added get_mfsbdev_size() helper function
- Queries actual volume size from mfsbdev daemon
- Parses 'mfsbdev list' output for accurate size reporting
- Supports custom NBD socket paths via mfsnbdlink
Tested successfully on moosefs-storage:
- LXC creation: ✅ 2GB rootfs created correctly
- LXC resize: ✅ 2GB → 4GB resize works perfectly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments