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?

  • 3
    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, 2016 at 12:20
  • 1
    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, 2016 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, 2016 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, 2016 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, 2016 at 0:16

1 Answer 1


Be careful if the Samba share's Linux top directory has two or more mounted Linux filesystems somewhere underneath it in the directory hierarchy.

If you then move something from under one of those sub-mounted filesystems' mountpoint to the other within the same Samba share, I'm pretty sure you can count on the Linux inode changing. You should test it out to be sure, though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .