morar emilian's picture

i have installed turnkey on my computer

one hard drive is shared during the setup

and i have one hdd remaining that does not apear in the share directory

how do i make that hdd available on the network ?

thank you

Jeremy Davis's picture

As TKL is basically Ubuntu Server 8.04 this is generic info for Ubuntu 8.04. You could probably do this from Webmin but the following instructions use the command line.

Firstly, I still consider myself a Linux noob and I haven't tested these instructions so I offer no guarantee that this will work (but hopefully it will).

I think that if it is mounted as a sub folder in the already shared folder it would be automatically shared by samba (as a folder of the root share - but perhaps not - I'd be interested to hear if it does).

To list currently attached drives use the command:

fdisk -l

This command will identify the hard drives as either '/dev/hd' (generally ide/pata drives) or '/dev/sd' (generally sata, scsi or usb drives) followed by a letter (eg sda, sdb, sdc etc and hda, hdb, hdc etc). Hopefully you should be able to work out which one is the 2nd hard drive. If not, run the command with only your primary hdd attached, then attaching the 2nd drive and running it again should clarify which is the 2nd drive.

To create the folder in which to mount this hard drive use something like this:

mkdir /existing_shared_folder/new_folder_name

Where you obviously replace "existing_shared_folder" with the name of the root shared folder, and "new_folder_name" with the name you wish to give the folder where the contents of your 2nd hdd will be. Now to get it to auto load on reboot, edit fstab (you can replace nano with your text editor of preference):

nano /etc/fstab

Assuming that you have SATA drives, the 2nd hard drive is identified as 'sdb' and the file system which the drive is formatted with is ext3 (which I would recommend), add a new line like this:

/dev/sdb1   /existing_shared_folder/new_folder_name   ext3   defaults   0 2

Save and exit (ctrl-X in nano). Now run the command:

mount -a

Assuming that it works, it should now be mounted to the specified folder and will auto mount on reboot.

Hope that helps.

Add new comment