All of lore.kernel.org
 help / color / mirror / Atom feed
* Nested NTFS volumes within Windows SMB share may result in inode collisions in linux client
@ 2023-03-01 22:07 Andrew Walker
  2023-03-01 22:37 ` Paulo Alcantara
  2023-08-21 18:57 ` Paulo Alcantara
  0 siblings, 2 replies; 12+ messages in thread
From: Andrew Walker @ 2023-03-01 22:07 UTC (permalink / raw)
  To: linux-cifs

On my Windows server I mounted multiple NTFS volumes within the same
share and played around until I was able to create directories with
the same fileid number.

 ```
PS C:\SHARE> fsutil file queryFileID SUBDS/foo
File ID is 0x00000000000000000001000000000026
PS C:\SHARE> fsutil file queryFileID .\SUBDS3\TESTFOLDER\
File ID is 0x00000000000000000001000000000026
```
The Linux SMB client then grants these two directories the same devid
/ inode pair.

```
root@truenas[/tmpcifs]# stat SUBDS/foo
  File: SUBDS/foo
  Size: 0         Blocks: 0          IO Block: 1048576 directory
Device: 5eh/94d Inode: 281474976710694  Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-03-01 13:13:42.425159200 -0800
Modify: 2023-03-01 13:13:42.425159200 -0800
Change: 2023-03-01 13:13:42.425159200 -0800
 Birth: 2023-02-22 10:49:37.331907600 -0800

root@truenas[/tmpcifs]# stat SUBDS3/TESTFOLDER
  File: SUBDS3/TESTFOLDER
  Size: 0         Blocks: 0          IO Block: 1048576 directory
Device: 5eh/94d Inode: 281474976710694  Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-03-01 12:25:56.283589300 -0800
Modify: 2023-03-01 12:25:56.268165700 -0800
Change: 2023-03-01 12:25:56.268165700 -0800
 Birth: 2023-03-01 11:48:09.617084100 -0800
```

Windows identifies mounted volumes via reparse point:
https://learn.microsoft.com/en-us/windows/win32/fileio/determining-whether-a-directory-is-a-volume-mount-point

This is also clearly visible in packet captures.

Andrew

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-21 18:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 22:07 Nested NTFS volumes within Windows SMB share may result in inode collisions in linux client Andrew Walker
2023-03-01 22:37 ` Paulo Alcantara
2023-03-02  1:33   ` Andrew Walker
2023-03-02  1:49     ` Steve French
2023-03-02  4:12       ` Andrew Walker
2023-03-02 19:18       ` Tom Talpey
2023-03-02 19:23         ` Steve French
2023-03-02 19:32           ` Tom Talpey
2023-03-02 19:38             ` Andrew Walker
2023-03-02 19:42           ` ronnie sahlberg
2023-03-02 18:00     ` Paulo Alcantara
2023-08-21 18:57 ` Paulo Alcantara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.