Mounting and *sharing* NTFS drives - can it be done?

Status
Not open for further replies.

ChrisJ

Cadet
Joined
Jul 16, 2011
Messages
3
Hello all

Can FreeNAS provide access over the network to NTFS-formatted drives that already contain data? That is, without copying the data to a ZFS volume, or otherwise re-shuffling the file system.

I have been searching and reading for several days, trying to determine whether this can be done at all, and if so, how to do it. If I've missed something obvious about FreeNAS' capabilities, shame on me, but it sure sounds like it's able to do this.

Here's what I have done:

1. Installed FreeNAS-8.0.1-BETA4-amd64 on a 2GB USB stick. No problems booting from that, accessing GUI, etc.

2. Physically installed an "empty" 500GB SATA drive in the FreeNAS box. Created a ZFS volume on it (Storage --> Create Volume) which cleared its data. No problem, I expected that. The volume shows up in Storage tab.

3. Created a CIFS share and mapped a network drive to that share from Win7 box, no problems, reading/writing across the network is fine.


OK, so I know how to make a new ZFS volume and share it. Great - but I also want to share drives that are already full of data, not just empty ones.


Next:

4. Physically installed another 500GB SATA drive in the FreeNAS box, one with lots of data on it this time. FreeNAS can see the drive (ada1s1) and I would be able to create a ZFS volume on it right now, but that would of course clear all its data, and I don't want to do that.

5. Attempted to import the NTFS volume via the GUI. That is, on the Storage tab, click Import Volume, provide a name, select the disk, select NTFS, click Import Volume button. This fails with "Some error ocurred while labelling the disk."

[Aside: After that step, the drive is no longer readable in a Win7 system! Windows sees the partition as RAW and offers to format it. Uh, thank you, but no.]

It seems importing through the GUI doesn't work -- but a little searching suggests that mounting from CLI does? Here goes:

6. Open the shell (option 9 from the console menu.) Create a mount-point, and mount the NTFS drive.

Code:
% mkdir /mnt/hdtv
% mount -t ntfs /dev/ada1s1 /mnt/hdtv


where ada1s1 is the partition (?) on ada1, the actual drive, and hdtv is an arbitrary label.

As I understand it, mount -t ntfs is read-only; I could use ntfs-3g instead, for read-write.

7. Navigate to /mnt/hdtv and I can see my files. Hooray!


...but so what? FreeNAS still doesn't list the drive in Active Volumes on the Storage tab of the GUI, which means I still can't configure a CIFS share and actually access the volume over the network.


The mount also doesn't persist through a reboot. I found a thread suggesting the solution was to make changes in /conf/base/etc. I installed WinSCP and got connected via SSH, navigated my way through the filesystem, but I don't know what I'm supposed to be doing in there.

Any suggestions on what I'm missing? Can this be done at all?

Thanks.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I don't know if this would be persistent or what other consequences there are, but in /conf/base/etc there is fstab where you could add your mountpoint, and in /conf/base/etc/local/ there is smb.conf where you could export your mountpoint. You'd need to 'mount -uw /' to edit those files.

It would be nice if the GUI had a way to do this, my guess is at some point in the future it will.
 

ChrisJ

Cadet
Joined
Jul 16, 2011
Messages
3
Hmm, thanks for the suggestion!

I tried adding the mount point to /conf/base/etc/fstab, but I guess I don't know what the syntax should be. When I rebooted, I got an error and startup aborted.

Here's what I put into fstab:

Code:
/dev/ada1s1 /mnt/hdtv ntfs-3g rw 0 0


And here's what I saw on reboot:

Code:
Mounting local file systems:mount: /mnt/hdtv: No such file or directory
Mounting /etc/fstab filesystems failed, startup aborted


I guess at this time /mnt/hdtv doesn't exist, which I don't really understand since I did create it (with mkdir) before rebooting?
 
Status
Not open for further replies.
Top