fusefs device naming

I have disk with NTFS and have fusefs installed. In the /dev directory I have three entities which correspond to this disk.
Code:
/dev/ad4s1
/dev/ntfs/MYDISKLABEL
/dev/fuse0
By libgeom I got relations between adXXX and /dev/ntfs/XXXXXXXXX - all ok. But how can I get relations between adXXXX and fuseX?
 
If I recall correctly the /dev/fuse0 device is used to communicate between the userland parts and the kernel module. It doesn't refer to any specific FUSE filesystem.
 
SirDice said:
If I recall correctly the /dev/fuse0 device is used to communicate between the userland parts and the kernel module. It doesn't refer to any specific FUSE filesystem.

mount (and getmntinfo) returns:
Code:
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/md0 on /var/run (ufs, local)
devfs on /var/dhcpd/dev (devfs, local)
/dev/fuse0 on /mnt/big_share/big_4 (fusefs, local, synchronous)
/dev/fuse1 on /mnt/big_share/big_6 (fusefs, local, synchronous)
/dev/fuse2 on /mnt/big_share/big_5 (fusefs, local, synchronous)
/dev/fuse3 on /mnt/big_share/big_1 (fusefs, local, synchronous)
/dev/fuse4 on /mnt/big_share/big_3 (fusefs, local, synchronous)

glabel list (and libgeom) returns:
Code:
Geom name: ad16s1
Providers:
1. Name: ntfs/BIG500_3
   Mediasize: 500107829760 (465G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e0
   secoffset: 0
   offset: 0
   seclength: 976773105
   length: 500107829760
   index: 0
Consumers:
1. Name: ad16s1
   Mediasize: 500107829760 (465G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e1

Geom name: ad14s1
Providers:
1. Name: ntfs/BIG500_1
   Mediasize: 500104200704 (465G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r1w1e0
   secoffset: 0
   offset: 0
   seclength: 976766017
   length: 500104200704
   index: 0
Consumers:
1. Name: ad14s1
   Mediasize: 500104200704 (465G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r1w1e1

Geom name: ad12s1
Providers:
1. Name: ntfs/BIG1000_5
   Mediasize: 1000202241024 (931G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e0
   secoffset: 0
   offset: 0
   seclength: 1953520002
   length: 1000202241024
   index: 0
Consumers:
1. Name: ad12s1
   Mediasize: 1000202241024 (931G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e1

Geom name: ad6s1
Providers:
1. Name: ntfs/BIG2000_6
   Mediasize: 2000398901760 (1.8T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e0
   secoffset: 0
   offset: 0
   seclength: 3907029105
   length: 2000398901760
   index: 0
Consumers:
1. Name: ad6s1
   Mediasize: 2000398901760 (1.8T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e1

Geom name: ad4s1
Providers:
1. Name: ntfs/BIG500_4
   Mediasize: 500105217024 (465G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e0
   secoffset: 0
   offset: 0
   seclength: 976768002
   length: 500105217024
   index: 0
Consumers:
1. Name: ad4s1
   Mediasize: 500105217024 (465G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32256
   Mode: r1w1e1

Start script:

Code:
sh /usr/local/etc/rc.d/fusefs start
ntfs-3g -o rw,local=ru_RU.UTF-8 /dev/ntfs/BIG500_4 /mnt/big_share/big_4
ntfs-3g -o rw,local=ru_RU.UTF-8 /dev/ntfs/BIG2000_6 /mnt/big_share/big_6
ntfs-3g -o rw,local=ru_RU.UTF-8 /dev/ntfs/BIG1000_5 /mnt/big_share/big_5
ntfs-3g -o rw,local=ru_RU.UTF-8 /dev/ntfs/BIG500_1 /mnt/big_share/big_1
ntfs-3g -o rw,local=ru_RU.UTF-8 /dev/ntfs/BIG500_2 /mnt/big_share/big_2
ntfs-3g -o rw,local=ru_RU.UTF-8 /dev/ntfs/BIG500_3 /mnt/big_share/big_3

How can I understand which fuseX relates to a concrete adXXXXX?

Problem: from my software I want to get the size (free size) of logical disks (I mean endpoint disks with a concrete filesystem). I use a block of code from the df utility. And I have a string list of adXsXX disks. I tried to get disk sizes, but because the getmntinfo returns /dev/fuse0 (instead of /dev/ad4s1 or /dev/ntfs/BIG500_4) I can't do this! Because I don't know which fuseX I need to use to detect the size of the disk. I need to know the relations between the naming of fuseX and adXsXX.

PS
Sorry for my english, I hope it is clear at this time.
 
Back
Top