[fuse-discuss] fixes for ntfs-3g and fusermount as root - review please

Mark Phalan Mark.Phalan at Sun.COM
Wed Nov 21 05:32:55 PST 2007


On Wed, 2007-11-21 at 05:05 -0800, Sean McNamara wrote:
> One further observation: I am really unsure as to the naming
>  conventions and meanings of the various disk devices under /dev on
>  Solaris. I'm a convert from the Linux community. So I am not sure why
>  /dev/dsk and /dev/rdsk are different, thus providing different results
>  here:
> 
> # ntfs-3g /dev/dsk/c1t0d0p2 /mnt/winc/
> fuse: mount failed: Invalid argument
> # ntfs-3g /dev/rdsk/c1t0d0p2 /mnt/winc/
> ntfs_attr_pread: ntfs_pread failed: Invalid argument
> Failed to read NTFS $Bitmap: Invalid argument
> 
> 1. Should I use /dev/dsk or /dev/rdsk?

Use /dev/rdsk. /dev/dsk/<disk> is a character device
whereas /dev/rdsk/<disk> is a block device.

> 
> 2. FYI: All three of my disks are SATA. a. One of them ("SATA-1" as
>  detected by the mobo) has two NTFS partitions (all data). b. SATA-2
>  has a single NTFS partition containing only data. c. SATA-3 has
>  Windows XP in the first primary partition, and the rest (more than
>  half the disk) is ZFS for Solaris.
> 
> 3. Given 2. above, my intuition is that Solaris, like Linux, numbers
>  the disks by the logical unit detection order defined by the SATA
>  controller. The "other" way that it /could/ detect them is by the boot
>  order in the BIOS; Windows and GRUB do this. Since my BIOS boot order
>  is the reverse of the plugged order, and my / (ZFS) partition is
>  mounted as /dev/dsk/c2t0d0s0, I am led to believe that, to access
>  SATA-1, I'd bring up /dev/dsk/c0t0d0*.

That sounds right.. I'm no expert on this but I do know that:

'c' -> controller
't' -> target
'd' -> disk

> 
> 4. Since Solaris indiscriminately creates the full factorial of device
>  nodes, I'm guessing that devices ending in "s#" are "slice" numbers,
>  as in Union FS or ZFS, so ntfs-3g or any other filesystem would not be
>  mountable through a "slice". I'm also guessing the "p#" endings
>  indicate the raw partition table entries.

Slices in Solaris are kinda like partitions in the DOS world.. The short
story being that you can ignore the slice numbers if its not formatted
for Solaris.

> 
> Given all this, if I wanted to mount the zero-based partition 0 on the
>  one-based SATA-2, I would use:
> 
> ntfs-3g /dev/dsk/c1t0d0p0 /mnt/winc
> OR ???
> ntfs-3g /dev/rdsk/c1t0d0p0 /mnt/winc
> 

p0 stands for the whole disk (I think). p1 -> p4 stand for the primary
partitions on that disk. Currently Solaris doesn't have extended
partition support - but I think its coming soon.

Try:

ntfs-3g /dev/rdsk/c1t0d0p1 /mnt/winc


> Also, if the partition ordinals in the partition table happen to be 2
>  and 5, with only two partitions, will Solaris say "okay, you have two
>  partitions, so they're called p0 and p1", or will it faithfully
>  represent them as p1 and p4?

I don't know for sure but I think you'd be able to see the first one as
p1 but you wouldn't be able to see the second one at all as Solaris
currently doesn't support extended partitions.

I'm no expert in this area so hopefully someone else will correct me if
I got something wrong.

> 
> Thanks for your help as I try to understand this OS and get it to suit
>  my needs. :)

No problem!

-Mark



More information about the fuse-discuss mailing list