Other Help Install a HDD to existing 11.2 system

I have a hdd that shows up as ada0 and has one existing ntfs partition on it. I would like to make this a fixed drive for storage on my freshly setup FreeBSD 11.2.

I have tried may things from around the internet and the freeBSD manual (I didn't quite understand the /etc/fstab from fstab in the manual)

Regardless, could someone walk me through the process please? I've been trying for many hours now.
 
what format are you going to use?
I run v12 and ntfs as far as I know is a read only format, so it might still be the the same with v11.2. NTFS = read only.

You will need to look into that. especially if you're going to use it for storage for FreeBSD exclusively then you might really want to change its format to UFS, or another format that FreeBSD can read and write to.

For which ever one you do pick.

look into how to mount it using your terminal. Whence you get it to mount via a terminal then add that to your fstab in a slightly modified form.
just follow the headings to know where to put what.
Code:
# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/ada1s1a    /               ufs     rw      1       1
For example on my laptop I have a ext4 partition. to mount this via cli ( in lue of automount, which I use). taking if off automount. (that part just requires I open a file manager and click on that arrow to unmount it.)

to find my (partitons) slices.
Code:
$ ls /dev/ada*
/dev/ada0    /dev/ada0s2  /dev/ada1s1  /dev/ada1s2
/dev/ada0s1  /dev/ada1    /dev/ada1s1a
now using the terminal (cli) to find the correct mount command.
Code:
mount -t ext2fs /dev/ada1s2 /mnt

well, that worked, so now unmount it, then make preps to add it to the fstab
Code:
umount /mnt
create a mount point if one does not exist.
Code:
$ mkdir -p /home/userx/myextdrive
in /etc/fstab add the formula to now mount the slice to the mount point.
Code:
# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/ada1s1a    /               ufs     rw      1       1
#added by me
/dev/ada1s2  /home/userx/myextdrive ext2fs rw   1 0
now mount it via fstab
Code:
mount -a
it is now mounted
Code:
$ ls /home/userx/myextdrive
bin        etc        lib64      mnt        root       srv        usr
boot       home       lost+found opt        run        sys        var
dev        lib        media      proc       sbin       tmp

If anything goes wrong the system will definitely notify you of the infraction .

NOTE:
ada0 is the device notation, you may need to add a slice into it in order to actually use it. Which the '0' (zero) indicates first drive, if you have two then you should look for ada1.

That being another BIG Point, Make sure you have the right drive and slice before modifying it in anyway whatsoever. The drive notation is zero based.
0 = 1
1 = 2
2 = 3
so on and so forth. Whereas the slice notation is not. 1s, s2, or s1a s2a etc.
 
I have a hdd that shows up as ada0 and has one existing ntfs partition on it. I would like to make this a fixed drive for storage on my freshly setup FreeBSD 11.2.

I have tried may things from around the internet and the freeBSD manual (I didn't quite understand the /etc/fstab from fstab in the manual)

Regardless, could someone walk me through the process please? I've been trying for many hours now.
If you want to use the drive in a fixed way only with FreeBSD, it's better to format it with either UFS or ZFS, so FreeBSD can speak to it in a native language.
The process is described very well in the FreeBSD handbook (always your good friend): https://www.freebsd.org/doc/handbook/disks-adding.html

The fstab file is just a table listing the partitions you want the system to automatically know (and mount).
The process is, first you format the disk by creating a new partition table (GPT is recommended), adding one or more partitions to it.
It is advisable to set labels for the partitions (gpart add -l ...) because after that the partitions can be referenced by name instead of device number. This has the advantage that names are constant and device names could change if you rearrange your hardware.
If you add the partition with "gpart add -l data ....." it will be accessible also under "/dev/gpt/data" and you should not use the device name in the fstab.
Then you add the partition to the fstab and chose a mountpoint, for example: "/data" or whatever you prefer.

That's it, it's quite simple.
And if you chose using ZFS, do not add the disk to fstab. ZFS manages its so called storage pools automatically.
 
Wow! thank you both very much
userxbw, I appreciate how much detail you put into explaining this. That helps immensely.
roccobaroccoSC, I did not know that NTFS was a problem in BSD.

Yeah, I am completely new. The whole reason for me using FreeBSD was to make a media server appliance on an embedded intel board that I have. My original idea was to have the drive in NTFS format so that I could slide it out of the media server (it is in a hot swap enclosure) and load or delete content with my Windows machine. The BSD box boots from a small SD card. Also. The BSD box is headless and I am only interacting with it through a serial port.

If I make the drive a native BSD format such as UFS, then I would want to be able to manage its contents with FTP over the LAN. Right???

That will likely lead to another post. Sorry and thanks in advance if I make it that far.

Ok. I will attempt to format and mount this drive in UFS or ZFS.
 
If I make the drive a native BSD format such as UFS, then I would want to be able to manage its contents with FTP over the LAN. Right???
Yes. But I suggest you set up a simple Samba share. That will make it a lot easier for you to copy to/from your Windows machines.
 
Or you could simply use SSH. You can manage your content from Windows over the network by using Putty for commands and WinSCP for copying files.
 
Back
Top