Skip to contentSkip to conversation

accessing object version from user space?

Lustre-devel Erich Focht 2 participants 4 messages May 3, 2011 – May 5, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

is there a way to access the file objects version information (epoch, transno, whatever is used for version based recovery) from user space? If yes, is that possible for lustre 1.8.x, too? Looking for a way to check (quickly) whether a file has changed while copying it away...

Erich

#1 lore raw
Quoted 3 lines · Erich Focht

is there a way to access the file objects version information (epoch, transno, whatever is used for version based recovery) from user space? If yes, is that possible for lustre 1.8.x, too? Looking for a way to check (quickly) whether a file has changed while copying it away...

Comparing the ctime at the start/end of the copy should be enough for that.

Cheers, Andreas
--
Andreas Dilger
Principal Engineer
Whamcloud, Inc.

#2 lore raw
Quoted 6 lines · Andreas Dilger
Quoted 3 lines · Erich Focht

is there a way to access the file objects version information (epoch, transno, whatever is used for version based recovery) from user space? If yes, is that possible for lustre 1.8.x, too? Looking for a way to check (quickly) whether a file has changed while copying it away...

Comparing the ctime at the start/end of the copy should be enough for that.

You mean ctime of Lustre file, or ctime of file objects on OSTs? Is there a nice way to access those? Maybe I'm a bit paranoid, but what if a client loses connection to MDS while continuing to write to OSTs? Just a thought...

Thanks & best regards,
Erich

#3 lore raw
Quoted 6 lines · Erich Focht
Quoted 5 lines · Andreas Dilger
Quoted 3 lines · Erich Focht

is there a way to access the file objects version information (epoch, transno, whatever is used for version based recovery) from user space? If yes, is that possible for lustre 1.8.x, too? Looking for a way to check (quickly) whether a file has changed while copying it away...

Quoted 6 lines
Quoted 1 line

Comparing the ctime at the start/end of the copy should be enough for that.

You mean ctime of Lustre file, or ctime of file objects on OSTs? Is there a nice way to access those?
Maybe I'm a bit paranoid, but what if a client loses connection to MDS while continuing to write to OSTs? Just a thought...

The ctime is derived from the latest ctime of the MDS inode and OST objects (ctime is not allowed to go backward), so even if the client is disconnected from the MDS it will get the latest ctime from the OSTs if the files are being modified there.

Cheers, Andreas
--
Andreas Dilger
Principal Engineer
Whamcloud, Inc.