[OpenAFS] Re: recover data from corrupted volume

Derrick Brashear shadow@gmail.com
Sat, 19 Jan 2013 12:50:50 -0500


the data is already as right as it will ever be; all you need to do is
recover the file modes and owners.

i suppose in that regard you could do something like

        find /oldvicepX \( -type d -o -type f \) -print -ls | \
        while IFS= read -r src ; do
        IFS= read -r perms
        tgt="/vicepX${src#/oldvicepX}"
        if [ -f "$tgt" -o -d "$tgt" ]; then
        set -- $perms
        p=`echo "$3" | \
        sed -e 's/.\(...\)\(...\)\(...\)/u=\1,g=\2,o=\3/' -e 's/-//g'`
        chown -- "${5}:${6}" "$tgt"
        chmod -- "$p" "$tgt"
        fi
        done

and skip rsync entirely.


On Sat, Jan 19, 2013 at 12:33 PM, Dimitris Z <dimitrisz@gmail.com> wrote:
> Hi,
>
> The original disks should not have been wiped (need to confirm this
> with the hardware guy) so I am gonna try resurrect the old array and
> redo the rsync. This may be tricky though given there was at least one
> disk with bad sectors but we did that once already so I am optimistic.
>
> Cheers,
>
>
> On Sat, Jan 19, 2013 at 4:02 PM, Derrick Brashear <shadow@gmail.com> wrote:
>> On Fri, Jan 18, 2013 at 8:22 PM, Dimitris Z <dimitrisz@gmail.com> wrote:
>>> Thanks everyone for your replies.
>>>
>>> It looks like the rsync I did did not preserve ownership information.
>>> This may explain why the salvager cannot do a proper restoration of
>>> the volumes or why the volumes are not working. Is there a way to get
>>> around this? It does not really matter if they are salvaged with the
>>> correct owner, as long as they can be salvaged.
>>
>> rsync again and sync back the ownership and mode data, if you still
>> have the originals,
>> and everything comes back. did you wipe the dying disk already?
>>
>>
>>
>>
>> --
>> Derrick



-- 
Derrick