Adding disks

Status
Not open for further replies.

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
very basic question
using FreeNAS-8.3.1-RELEASE-p2-x64
Have things fairly configured and just getting around to this question.

In storage - view disks
I don’t see the + sign referred to in the documentation. So I don’t see how to add disks
Also in the view disks - I don’t see a way to delete entries - allot of orphan entries for disks I’ve added and removed.

This is how I add a disk.
Storage - add volume - get the name ada1p1, then manually mount it - this is for removable - hot swappable - or ntfs

I have the case now where I have a usb drive that the system "sometimes" mounts itself - and I’d like to see if the system is recognizing the device.

How do I get a list of attached devices
Where is the add/remove in view disks (writing this Im getting the feeling its read only view<grin)


Thanks
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
New disks appear automatically as long as you have hot swap-capable hardware, otherwise you may need to reboot, or you can try "camcontrol rescan" from the command line, or maybe one of a few other things, depending on the specific controller you have.
 

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
Thank you for that. This is what I get

[bob@freenas] /mnt# camcontrol devlist
<SAMSUNG HD103UJ 1AA01112> at scbus1 target 0 lun 0 (pass0,ada0)
<ST3000DM001-1CH166 CC24> at scbus2 target 0 lun 0 (pass1,ada1)
<UFD USB Flash Drive 1100> at scbus8 target 0 lun 0 (pass2,da0)
<WD Ext HDD 1021 2021> at scbus9 target 0 lun 0 (da1,pass3)

[bob@freenas] /mnt# fdisk /dev/da1
fdisk: could not detect sector size

it looks like the order da1,pass3 could be the problem.
Can you tell me how to get this mounted and understand how thease drives are suposed to get detected. In this case its a usb device
Thanks
Bob
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No, the ordering of those is merely a typical sign of being detected after boot and is non-problematic.

"fdisk" is the old way to manage disks. The new way is to use the gpart tool. You might first want to wipe the PC MBR off the disk.

Code:
dd if=/dev/zero of=/dev/${disk} bs=512 count=64 


is usually sufficient; I believe the GUI offers an equivalent way. But really at this point I'd expect the device to be available from the GUI for use anyways.
 

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
I have data on there that I need - I cant dd the drive. The gpart is good to know... maybe I can create ntfs partitions in the future :)

But for now - I still have my original question

how to mount usb external drives. Based on my findings posted how would I mount it?

how to manage the view discs page in the gui - ie remove defunct entries

from my research there was a + sign in the view disk where you could specify this - there dosnt seem to be anything like that in 8.2

- - - Updated - - -

fyi - I was just using fdisk to see if the system recognized the device -
 

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
Hi - sorry I did not see the message notification, I would have responded earlier...

Here is what I have

[bob@DIME521] /mnt/VOLUME.3TB/bob# camcontrol dev
<SAMSUNG HD103UJ 1AA01112> at scbus1 target 0 lun 0 (pass0,ada0)
<ST3000DM001-1CH166 CC24> at scbus2 target 0 lun 0 (pass1,ada1)
<UFD USB Flash Drive 1100> at scbus8 target 0 lun 0 (pass2,da0)
<WD Ext HDD 1021 2021> at scbus9 target 0 lun 0 (da1,pass3)

[bob@DIME521] /mnt/VOLUME.3TB/bob# gpart show da1
=> 63 732565953 da1 MBR (2.7T)
63 193 - free - (772k)
256 732565760 1 ntfs (2.7T)

Thanks
 

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
also.. Ive rebooted a few times since this morning and it dosnt seem to make a difference.
For the record - this used to work - I dont know of changing anything other than it stopped appearing in the add - volume menu
see attachment
 

Attachments

  • usb-screenshot.jpg
    usb-screenshot.jpg
    53.4 KB · Views: 583

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
While posting I realised the USB3T was not in /mnt so I created it. From what I recall this was done automatically as I dont think it would survive a reboot

[bob@DIME521] /mnt# mkdir

detach and attach the drive

[bob@DIME521] /mnt# camcontrol rescan all
Re-scan of bus 0 was successful
...
Re-scan of bus 9 was successful

[bob@DIME521] /mnt# ls -lrt USB3T/
total 1
drwxr-xr-x 2 root wheel 512 May 28 22:56 ./
drwxrwxr-x 6 root wheel 512 May 28 22:56 ../

[bob@DIME521] /mnt# gpart show da1
=> 63 732565953 da1 MBR (2.7T)
63 193 - free - (772k)
256 732565760 1 ntfs (2.7T)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Okay, so that's all pretty good, it looks like it sees your disk and can read it. So I really don't do much of anything like what you're doing, and have no idea about your specific problem, but the stuff you "need to know" about twiddling from the CLI:

1) The device node will show up as "/dev/da1"something, you can do "ls -l /dev/da1*" to see what options are available, and it'll be something like "/dev/da1p1" or "/dev/da1s2" or something. FreeBSD's geom subsystem has changed enough stuff and I've done sufficiently little with it by hand that I can't reliably guess and just look myself.

2) The command to manually mount an ntfs filesystem is "mount_ntfs", which is simply "mount_ntfs /dev/da1p1 /mnt/USB3T", but there's a warning in the FreeBSD manual that says

WRITING
There is limited writing ability. Limitations: file must be nonresident
and must not contain any sparces (uninitialized areas); compressed files
are also not supported. The file name must not contain multibyte charac-
ters.

so I *strongly* suggest you use "mount_ntfs -o ro /dev/da1p1 /mnt/USB3T" if you value your data, to make it read-only. I have no idea what FreeNAS tries to do with such a device or how it is supposed to present it, but hopefully this gives you some stuff to work with.
 

Bobuser

Dabbler
Joined
May 12, 2013
Messages
13
there we go...

[bob@DIME521] /mnt# ntfs-3g /dev/da1s1 /mnt/USB3T/
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.

[bob@DIME521] /mnt# ls -ltr USB3T/
total 93
drwxrwxrwx 1 root wheel 0 Mar 31 08:34 linux-files/
drwxrwxrwx 1 root wheel 0 Apr 23 15:20 lab_share/
...

weird from the begining I tried to mount as ntfs-3g /dev/da1
and wasnt working... needed the s1

Thanks for walking through this !! Im running late here...

How about my other question as far as the usefulness of view disks. I dont see any value there.
There is no way to "view new disks" or add disk - what happened to the + sign.

That would avoid having to figure out mounting it manually.
The edit window is minimal as far as being useful and there is no way to remove very stale entries.

Im seeing myself having to mount it by hand every time. The drive is used as a removeable backup to the main system.


Thank you
 
Status
Not open for further replies.
Top