Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Nov 2015 19:30:21 -0800
From:      "alex.burlyga.ietf alex.burlyga.ietf" <alex.burlyga.ietf@gmail.com>
To:        "Mikhail T." <mi+thun@aldan.algebra.com>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: Recovering an unlink-ed, but still opened file
Message-ID:  <CA%2BJhTNTDE_orbEj5EV1VXjSB%2BtNWNmNQdSR9Q07aKZH5eWD8oA@mail.gmail.com>
In-Reply-To: <56591999.1040001@aldan.algebra.com>
References:  <5658E498.9070700@aldan.algebra.com> <CA%2BJhTNQh2CKwuEsKcc0v=G=0zG4a5JQTYO56bXv%2B3MmZ8=MVDg@mail.gmail.com> <56591999.1040001@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
fdescfs is no use here to:-( Is the file on NFS mount by any chance? Then
there is .nfsXXXXX files.

Alex.
On Nov 27, 2015 19:03, "Mikhail T." <mi+thun@aldan.algebra.com> wrote:

> On 27.11.2015 21:46, alex.burlyga.ietf alex.burlyga.ietf wrote:
>
> If you know which process and which file descriptor, should be able to
> just copy from /proc/<pid>/fd/<fd> to a file. I would try that first.
>
> I know this trick -- and even used it on Solaris once. It may work on
> Linux too. But not on FreeBSD:
>
> tail -f /var/log/messages > /var/tmp/l &
> [1] 13954
> mi@narawntapu:/usr/src (829) rm /var/tmp/l
> mi@narawntapu:/usr/src (830) ls -l /proc/13954/fd
> ls: /proc/13954/fd: No such file or directory
>
> Worse, our linprocfs does not support that either:
>
> mi@narawntapu:/usr/src (831) ls -l /compat/linux/proc/13954/fd
> lr--r--r--  1 mi  wheel  0 27 =D0=BB=D0=B8=D1=81 22:00 /compat/linux/proc=
/13954/fd ->
> *unknown*
>
> Perhaps more importantly, even if the trick worked, it wouldn't have been=
,
> what I asked for -- it would've allowed me to create a copy of the file.
> I'd like to be able to restore access to the original -- so that, for
> example, whatever the process writes to it is still available, etc. Can
> that be done somehow? Thanks! Yours,
>
> -mi
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BJhTNTDE_orbEj5EV1VXjSB%2BtNWNmNQdSR9Q07aKZH5eWD8oA>