Re: [PATCH] Export MDRAID bitmap on disk structure in UAPI header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

在 2025/01/02 19:48, Tomas Mudrunka 写道:
Just curious, what you guys do for filesystems like ext4/xfs, and
they just define the same structure in user-space tools.

looks like your tool do support to create ext4 images, and it's using
ext4's use-space tools directly. If it's true, do you consider to use
mdadm directly?

Thanks,
Kuai

Yes, we do use external tools when possible. It is not possible with mdadm.
Mdadm cannot create disk image of MD RAID array. Kernel does this.

I'm a bit confused here, if you mean metadata, I think it's mdadm that
write init metadata to disk, the only exception is dm-raid.

We want/need purely userspace generator, so we don't have to care about
permissions, losetup, kernel-side mdraid runtime, etc... We just want
to generate valid image without involving kernel in any way.

I believe mdadm can do this, Mtkaczyk what do you think?

The problem is that system service will recognize raid disks and
assemble the array automatically, you might what to disable them.

Thanks,
Kuai

I was using mdadm before switching to genimage and it adds complexity of
handling all the edge cases of kernel states.
Mkfs.ext4 can create image without involving kernel, mdadm cannot, it always
instructs kernel to create the metadata for it when creating array.

In my opinion we should decide whether it makes sense for kernel to export
the structures in header file and either provide all of them, or provide none.
That might be valid reasoning to say every userspace program should include
its own definitions of structures. But providing half does not make any sense.

I wonder if mdadm needs some of definitions that i have omitted from UAPI.

Tom

.






[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux