I'm trying to configure a file sharing server using Ubuntu server (with samba). I want the shared files to be saved on an external hard drive (2TB) because the space on the desktop's (which is a new one by the way) hard drive may not be sufficient.

My question is: On installation, how do i partition such that i have the OS on the computer's hard drive and the file server on the external hard drive? OR is there a better way of doing this? A "How to" guide will be appreciated.


After lots of research i've found an answer. Decided to answer incase anyone else ever needs this:

So the best way to do this (i think) is to install ubuntu on the computer's hard drive and then use the external drive for file shares.

After installing ubuntu on the internal drive, format the external drive to ext4 (ext3 if you wish). You can do this from the command line. Create only one primary partition since this will be used for only file storage. Check out this link for how to format a drive from command line: http://www.ehow.com/how_5853059_format-linux-disk.html

Once you've done that, you need to mount the drive. Create a new folder in /media For example, we can call it "ext". Run "mkdir /media/ext". You're going to mount the drive to this folder.

Run "fdisk -l" to get the /dev/xxx name of the partition on the external hard drive. Lets say it's /dev/sdb1. Then, run "mount /dev/sdb1 /media/external" to mount the drive to the /media/external folder.

That's it. The drive has been partitioned.

Then, you can create your folders for your samba shares in the /media/ext folder and this will create them on the external drive. For example, If you run "mkdir /media/ext/Public", this would create a folder called Public on the drive. It could then point to /media/external/Public in the samba configuration file (path = /media/external/Public).

Hope it helps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.