-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Grzegorz JaÅkiewicz wrote:
| On Thu, 18 Nov 2004 15:16:29 -0500, Jeff Mahoney <[EMAIL PROTECTED]> wrote:
|
|
|>If the filesystem is already established, you can't switch hashes. The
|>hash is global to the filesystem, so if you were to change it, lookups
|>would fail and you wouldn't be able to find any of your files.
|>
|>If you're creating a new filesystem, you can use the --hash argument to
|>mkreiserfs. Under most circumstances, the filesystem code will
|>automatically discover which hash you're using at mount time.
|
|
| Thanks, but the trick is that I would like to switch over existing
| partition to other hash.
| I know, I can copy over all data on side, and recreate partition from
| scratch, but it's just way too painfull. It should be possible to do
| this in much easier way.
| So you say, that reiserfs doesn't store filenames in strucures, but
| uses just hashes to lookup ? Shouldn't it be possible to go through
| all structures on the partition, and recreate hashes, but using
| different key function ?
| I am prepared to spend some time,and do this.
|

As Vladimir said, you'd need to write a special tool to do this. It
would be far more cost effective to use a spare drive or tape backup to
backup your filesystem and restore it again.

To highlight why this would be such a complex operation, consider that
the hashed entries are sorted by the hash. With small directories, this
is fairly trivial since you can just shuffle the entries around inside
the same item. However, with a large directory (where large is defined
as the length of all filenames + associated keys is larger than a disk
block), the directory can be split over several nodes. Once you start
shuffling nodes around, you're essentially rebuilding the tree, and
that's far more complex and time consuming than simply copying the data
off and restoring it back.

Sorry we don't have an easier answer for you. :(

- -Jeff

- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBqidcLPWxlyuTD7IRAnb9AJ93lAymaFd2O6jotBU/56nU77e5bgCdF124
KzpH9IKqR+nG0c+jIGDTN98=
=UDnU
-----END PGP SIGNATURE-----

Reply via email to