Re: Reproducible block structure

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

 



On Mon, Dec 09, 2013 at 09:03:23PM -0800, Jitesh Shah wrote:
> Hello all,
> Assuming I have the latest ext4 system, I have a question ->
> Scenario -> I have 5 HDDs on which I burn the same block image on.
> These HDDs are usually mounted RO when used in production. For
> upgrading, I connect each one to an isolated machine, mount it as RW
> and run a script to update files (basically add, delete, modify
> files).
> 
> Now, if the script is ran in the SAME way for all 5 HDDs, is it
> guaranteed that these HDDs will be same at the block level too? (i.e.
> block allocation/deallocation will follow the same pattern). Assume
> single-core system with only one process modifying the HDD in
> predetermined order.
> 
No, you can't assume it, although ext4 might do the same write patterns, the
caches behind the scenes might change the way you'll be writing the data there.

> If there is no way to provide such a guarantee in a default ext4
> install, is there an ext4 option (ordered?) which can provide this
> guarantee?
>
ordered option for journal will guarantee journal ordering but not what you're
aiming for.

> Why do I ask -> I am tinkering with the idea of block level
> verification of images. If the above guarantees can be provided, I can
> easily hash the raw HDD for verification purposes.
>

I'm not sure if you'll be able to do it, different HDDs, even from the same
vendor might have slightly differences which might change the write patterns.
There are also some performance improvements like delalloc and mballoc that
might not have the same allocation result in all your HDDs.

Maybe (although I'm not the best person to ensure it), you can have success on
that if you disable HDDs write caches and use a filesystem less optimized and
with no journal, like ext2, or maybe use synchronous writes with ext4 but even
with sync writes, I'm not sure if you'll be able to have exactly the same
situation on all hdds, due the journal and the dynamic allocation algorithms

> Thanks,
> Jitesh
> 
> PS: I am not subscribed to the mailing list, so please include my id
> in the response if your email client does not put it there already!

Please, subscribe to maillist. This help to keep the talk in the maillist and
avoid to take a look if somebody already answered you
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux