If I have a directory exposed over a SAMBA share and a user, from either a Linux or Windows system, moves a file from one place to another on that share, does SAMBA know to ask the operating system for a move operation and keep the inode number?

Similarly does renaming a file on a SAMBA share keep the inode number consistent?

Bonus question that might need to be its own question: I use rsync to create differencing backups within the server (CentOS 7) from the device to a different backup device. Can the differencing backup track inode numbers on the device and the backup, to itself correctly track the file move/rename?

Update: 24/01/2018

On my installation, a move operation does in fact preserve inode number.

  • Windows 7 x64 Professional
  • Centos 7 3.10.0-514.16.1.el7.x86_64
  • Samba version 4.4.4

Are there any other qualifying system configuration specifics I should list above?

  • 1
    It sounds like you already have a samba share and a client, I would say try ls -i $file (prints the inode of the file) before and after each operation to see. – Centimane Apr 11 '16 at 12:20
  • Funny answer. In a sample space of one, whatever the result I wouldn't know if it were reliable or to-be-expected. – J Collins Apr 11 '16 at 18:01
  • Well I didn't post an answer, just a comment in the hopes of leading you. Are you performing a statistical analysis? Just curious? Or absolutely need the inode to remain the same for an application to work (which sounds like a dreadful app)? If not 1 or 3, you can probably just test it to see for yourself. – Centimane Apr 11 '16 at 22:26
  • I'd like to know the expected behaviour by design, something reliable. Then if my system doesn't do that thing then I know where to look for issues. Also I don't know if SAMBA's behaviour is dependent on the client operating system or even version, or if it is designed to be absolutely consistent. It seemed possible different client's operating systems may issue different commands to represent a move. Like I say in the question, the ultimate goal is having a robust backup system, and that relies on knowing what user's systems might do to the files. – J Collins Apr 12 '16 at 0:15
  • On your comment 'sounds like a dreadful app', is there a more robust way of establishing true file identity? – J Collins Apr 12 '16 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.