xfs
[Top] [All Lists]

Re: UUIDs / stable identifiers for files and directories?

To: wojtek@xxxxxxxxxxxx
Subject: Re: UUIDs / stable identifiers for files and directories?
From: Nathan Scott <nathans@xxxxxxx>
Date: Thu, 11 Nov 2004 08:46:07 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <OF8FFE0282.5F31F4D3-ONC1256F48.005BD0F2-C1256F48.005E93C3@xxxxxxxxxxxx>
References: <OF8FFE0282.5F31F4D3-ONC1256F48.005BD0F2-C1256F48.005E93C3@xxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.3i
On Wed, Nov 10, 2004 at 05:52:57PM +0100, wojtek@xxxxxxxxxxxx wrote:
> Hello,
> 
> Is it true that every file and directory has its own UUID? And if so: is it
> accessible to user programs? Can it be made accessible?

Hmm, if you mean UUID's like those described in libuuid(3), then
no - each filesystem has a UUID, but not each file.  Each file has
an inode number of course... and XFS does provide mechanisms to get
to files and directories via inode number.

> We want to develop a system that would store part of its data in the
> filesystem, and part in the database. It would be very convenient to have
> an unique and stable (surviving backup -  restore, dump) filesystem object
> identifiers, and also uid -> path, or open by uid functionality.

There's an XFS API to do what you want, I think - open_by_handle(3)
and friends; this is used extensively by xfsdump and DMAPI to do
the sorts of thing you're talking about there.

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>