Re: [Vserver] How best to unhashify

From: Herbert Poetzl <>
Date: Tue 14 Mar 2006 - 13:04:33 GMT
Message-ID: <>

On Tue, Mar 14, 2006 at 09:58:50AM +1100, Tony Lewis wrote:
> With reckless abandon, I vhashified a couple of vserver Ubuntu guests
> with no exclusions. Now I find that upgrading is a problem. These
> vservers are just for fun, so no harm done, but I'm curious as to the
> best way to unhashify, should a mistake be made.
> Would it be:
> for each file in /vservers/.hash
> for all files in /vservers/* (except /vservers/.hash) with the same
> inode
> cp the file, preserving username, perms, timestamp, to a temp file
> rm the file
> mv the copied file to the original file
> remove the file in /vservers/.hash
> Or is there a more elegant way?

something like this (untested) should do the trick:

find /vservers/guest -type f -exec showattr {} \; | gawk '/^----UI-/ { printf "cp -a %s %s.unhash\nmv %s.unhash %s\n",$2,$2,$2,$2; }' | sh

it will break unified files but leave 'normal' hardlinks
as is, probably not a big deal in your case ...


> Tony
> _______________________________________________
> Vserver mailing list
Vserver mailing list
Received on Tue Mar 14 13:05:20 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 14 Mar 2006 - 13:05:22 GMT by hypermail 2.1.8