* It is not possible to restore file from a mounted snapshot using a hardlink
@ 2011-02-27 13:20 dexen deVries
[not found] ` <201102271420.57110.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: dexen deVries @ 2011-02-27 13:20 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA
Hello,
The following is more of a feature request than problem report, actually.
I've mounted an older snapshot and tried to restore (add it to the current
filesystem state) by creating a hardlink.
Roughly like:
mount /dev/sdb3 ~/current
mount.nilfs2 /dev/sdb3 ~/old -o ro,cp=1234
cd ~/current
ln ~/old/file.bin ./restored-file.bin
The `ln' returned `Invalid cross-device link'.
I expected such hardlink to have semantics of re-using all the data blocks &
metadata of file.bin from snapshot as restored-file.bin, so no duplication of
data blocks happens.
Regards,
--
dexen deVries
``One can't proceed from the informal to the formal by formal means.''
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: It is not possible to restore file from a mounted snapshot using a hardlink
[not found] ` <201102271420.57110.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-02-27 15:56 ` Jérôme Poulin
2011-02-27 17:08 ` dexen deVries
2011-02-27 16:02 ` Jérôme Poulin
1 sibling, 1 reply; 4+ messages in thread
From: Jérôme Poulin @ 2011-02-27 15:56 UTC (permalink / raw)
To: dexen deVries; +Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In fact, hard links are not supposed to work but cp --reflink
*should* work but it does not seem to. cp --reflink is what you would
need to achieve what you want.
Envoyé de mon appareil mobile.
Jérôme Poulin
Solutions G.A.
On 2011-02-27, at 08:20, dexen deVries <dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello,
>
>
> The following is more of a feature request than problem report, actually.
>
> I've mounted an older snapshot and tried to restore (add it to the current
> filesystem state) by creating a hardlink.
> Roughly like:
> mount /dev/sdb3 ~/current
> mount.nilfs2 /dev/sdb3 ~/old -o ro,cp=1234
> cd ~/current
> ln ~/old/file.bin ./restored-file.bin
>
> The `ln' returned `Invalid cross-device link'.
>
> I expected such hardlink to have semantics of re-using all the data blocks &
> metadata of file.bin from snapshot as restored-file.bin, so no duplication of
> data blocks happens.
>
>
> Regards,
> --
> dexen deVries
>
> ``One can't proceed from the informal to the formal by formal means.''
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: It is not possible to restore file from a mounted snapshot using a hardlink
[not found] ` <201102271420.57110.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-02-27 15:56 ` Jérôme Poulin
@ 2011-02-27 16:02 ` Jérôme Poulin
1 sibling, 0 replies; 4+ messages in thread
From: Jérôme Poulin @ 2011-02-27 16:02 UTC (permalink / raw)
To: dexen deVries; +Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Just after replying I noticed you talked about cp= and noticed I sent
to the nilfs mailing list and not btrfs ! So cp --reflink does not
work on NILFS but would be a nice feature :)
Envoyé de mon appareil mobile.
Jérôme Poulin
Solutions G.A.
On 2011-02-27, at 08:20, dexen deVries <dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello,
>
>
> The following is more of a feature request than problem report, actually.
>
> I've mounted an older snapshot and tried to restore (add it to the current
> filesystem state) by creating a hardlink.
> Roughly like:
> mount /dev/sdb3 ~/current
> mount.nilfs2 /dev/sdb3 ~/old -o ro,cp=1234
> cd ~/current
> ln ~/old/file.bin ./restored-file.bin
>
> The `ln' returned `Invalid cross-device link'.
>
> I expected such hardlink to have semantics of re-using all the data blocks &
> metadata of file.bin from snapshot as restored-file.bin, so no duplication of
> data blocks happens.
>
>
> Regards,
> --
> dexen deVries
>
> ``One can't proceed from the informal to the formal by formal means.''
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: It is not possible to restore file from a mounted snapshot using a hardlink
2011-02-27 15:56 ` Jérôme Poulin
@ 2011-02-27 17:08 ` dexen deVries
0 siblings, 0 replies; 4+ messages in thread
From: dexen deVries @ 2011-02-27 17:08 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA
On Sunday 27 of February 2011 16:56:25 you wrote:
> In fact, hard links are not supposed to work but cp --reflink
> *should* work but it does not seem to. cp --reflink is what you would
> need to achieve what you want.
I'm much surprised why hardlink shouldn't work.
I used the `stat' command on a file that's both in snapshot and (uchanged) in
current filesystem state and both inode and device fields (st_ino and st_dev)
are the same. Thus I don't get why Linux would consider that a cross-device
hardlink. After all, it's the same filesystem, just different views of it.
Perhaps Linux' VFS is to blame...
--
dexen deVries
``One can't proceed from the informal to the formal by formal means.''
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-27 17:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27 13:20 It is not possible to restore file from a mounted snapshot using a hardlink dexen deVries
[not found] ` <201102271420.57110.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-02-27 15:56 ` Jérôme Poulin
2011-02-27 17:08 ` dexen deVries
2011-02-27 16:02 ` Jérôme Poulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).