× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: What demon is creating the shares if using web admin ui

ilansch
Aspirant

What demon is creating the shares if using web admin ui

Hi, I have ReadyNAS 6.5.1.

If I go to the WEB Admin UI, And create a new share, what demon is running on the machine and actually creates the directory and configure the share (for example NFS/SMB shares)? - i want to track down this demon and strace it.

I noticed that all directories created on the primary btrfs partition, are created with the same fsid and inode.

e.g if i received the machine with the default SMB shares: Documents/Videos/Music/Pictures, when going via linux bash:

 

root@ReadyNAS-Test:/data# ls -lia
total 48
256 drwxr-xr-x 1 root root 146 Feb 2 10:20 .
256 drwxr-xr-x 1 root root 198 Jan 30 15:33 ..
256 drwxrwxrwx 1 root root 90 Feb 2 12:06 .apps
256 drwxrwxrwx+ 1 guest guest 64 Feb 2 12:17 Documents
256 drwxr-xr-x 1 admin admin 64 Feb 1 16:53 home
256 drwxrwxrwx+ 1 guest guest 20 Nov 20 13:13 Music
256 drwxrwxrwx+ 1 guest guest 52 Feb 1 18:30 nfs
256 drwxrwxr-x+ 1 guest guest 20 Feb 2 12:30 nfs2
256 drwxrwxrwx+ 1 guest guest 20 Nov 20 13:13 Pictures
256 drwxr-xr-x 1 root root 100 Feb 2 12:30 ._share
256 drwxr-xr-x 1 root root 0 Nov 20 13:13 .timemachine
256 drwxr-xr-x 1 root root 0 Nov 20 13:54 .vault
256 drwxrwxrwx+ 1 guest guest 20 Nov 20 13:13 Videos
root@ReadyNAS-Test:/data# mkdir myNewShare
root@ReadyNAS-Test:/data# ls -lia
total 48
256 drwxr-xr-x 1 root root 166 Feb 2 12:50 .
256 drwxr-xr-x 1 root root 198 Jan 30 15:33 ..
256 drwxrwxrwx 1 root root 90 Feb 2 12:06 .apps
256 drwxrwxrwx+ 1 guest guest 64 Feb 2 12:17 Documents
256 drwxr-xr-x 1 admin admin 64 Feb 1 16:53 home
256 drwxrwxrwx+ 1 guest guest 20 Nov 20 13:13 Music
259 drwxr-xr-x 1 root root 0 Feb 2 12:50 myNewShare
256 drwxrwxrwx+ 1 guest guest 52 Feb 1 18:30 nfs
256 drwxrwxr-x+ 1 guest guest 20 Feb 2 12:30 nfs2
256 drwxrwxrwx+ 1 guest guest 20 Nov 20 13:13 Pictures
256 drwxr-xr-x 1 root root 100 Feb 2 12:30 ._share
256 drwxr-xr-x 1 root root 0 Nov 20 13:13 .timemachine
256 drwxr-xr-x 1 root root 0 Nov 20 13:54 .vault
256 drwxrwxrwx+ 1 guest guest 20 Nov 20 13:13 Videos
root@ReadyNAS-Test:/data#


Note that the new directory that was created via linux bash has inode 259.
Why the directories created via WEB Admin UI are created with same INODE ?

Message 1 of 5
StephenB
Guru

Re: What demon is creating the shares if using web admin ui

You created a directory; the ReadyNAS software created subvolumes (which can have snapshots, quotas, etc).

 

BTRFS subvolumes always have inode 256, that's the way the file system identifies that they are subvolumes.

Message 2 of 5
ilansch
Aspirant

Re: What demon is creating the shares if using web admin ui

Thanks for reply.

 

I understand that ReadyNASOS give the same inode to each subvolume.
Since the filesystem partition is shared for all subvolumes, it means that behind the scenes there are different inodes for these directories.
how can I in kernel space retreive the real inode of these subvolume ? or in usermode ?

Message 3 of 5
StephenB
Guru

Re: What demon is creating the shares if using web admin ui

You are perhaps assuming that btrfs inodes are all unique indices like they are in ext.  That's not the case. 

 

 

That of course does lead to the question on how you identify and retrieve the right inode structure for a given btrfs object.  That's an area I haven't explored, so I don't know.

Message 4 of 5
mdgm-ntgr
NETGEAR Employee Retired

Re: What demon is creating the shares if using web admin ui

Some apps create shares. You could look at how apps do it.

Message 5 of 5
Top Contributors
Discussion stats
  • 4 replies
  • 2247 views
  • 0 kudos
  • 3 in conversation
Announcements