Welcome! Log In Create A New Profile

Advanced

newbie installed debian, needs NAS - now what?

Posted by scsnospam 
scsnospam
newbie installed debian, needs NAS - now what?
November 09, 2010 12:49AM
Ok, I have debian up and running following Jeff's instructions, on my new dockstar. The goal is to make this a NAS server. What packages do I need to install? Any configuration guides would be appreciated as well.

thanks!
Re: newbie installed debian, needs NAS - now what?
November 09, 2010 03:27AM
how about you're trying to google first?

basicly u just need to mount your hdd(s) to a spot and share them with samba.
Re: newbie installed debian, needs NAS - now what?
November 09, 2010 06:26AM
As Elfish said, Google might be a better bet for you on configuring a NAS. Keep in mind that the main, if not only, purpose of this site is to get Debian running on this hardware. No trivial task, obviously. But once you've got Debian up and running, then your Dockstar is just like any other generic Debian computer out there, and you can take advantage of a huge expertise base, much larger than the few of us who read this forum.

A lot of people use Debian, and I'm sure there are pretty good guides out there, which would be a lot more helpful to you than the few hurried steps someone might write in the forum. For example, searching for "NAS debian" on Google gave this site as the first hit: http://versia.com/2009/11/19/nas-debian-lenny-raid1-encrypted/ Granted, it's for Lenny and not Squeeze, but the basics should be the same. It also may be a lot more complicated than you need; just skip past the RAID and encryption stuff and look at NFS and SAMBA.

Good luck!
Re: newbie installed debian, needs NAS - now what?
November 09, 2010 10:59AM
You can set up samba or other file servers. This is a good reference to start with: http://www.rudiswiki.de/wiki/DockStarAutoMountSamba. I am not particular like the auto mount usb part, though, because I would like to have more control.
Re: newbie installed debian, needs NAS - now what?
November 09, 2010 07:21PM
Definitely better places to find this info, but as I just hacked together a quick and dirty Samba setup script for my new dockstar install I thought I would contribute. No warranty of course...

Install packages...
apt-get install samba smbfs samba-common-bin samba-tools smbclient
Backup files we're going to modify
cp /etc/samba/smbusers /etc/samba/smbusers.orig
cp /etc/samba/smb.conf /etc/samba/smb.conf.orig
if [ -e /etc/samba/smbusers ];then cp /etc/samba/smbusers /etc/samba/smbusers.orig; fi
Fix smb.conf to allow share browsing to work correctly (i.e. smbtree)
perl -pi -e 's#^\[global].*$#"$&\n    client lanman auth = yes\n"#e' /etc/samba/smb.conf
perl -pi -e 's#name resolve order.*$#"$&\n    name resolve order = lmhosts wins bcast host\n"#e' /etc/samba/smb.conf
We're going to use user authentication so add a user named 'user' and set a samba password
useradd -d /home/user -s /bin/bash user
mkdir -p /home/user
chown -R user:user /home/user
smbpasswd -a user
echo "    user = \"user\"" >> /etc/samba/smbusers
Create a directory to share
mkdir /home/user/files
chown user /home/user/files
Add the shared directory info to smb.conf
cat - >> /etc/samba/smb.conf <<END
[files]
   comment = Some files
   valid users = user
   browseable = yes
   read only = no
   locking = no
   path = /home/user/files
   guest ok = no

END
Start up samba
/etc/init.d/samba restart
Have a look for shares
smbtree



Edited 1 time(s). Last edit at 12/27/2010 07:22PM by petergunn.
Re: newbie installed debian, needs NAS - now what?
November 10, 2010 12:01AM
thanks for the tips guys. Will try out some stuff and report back. This may be a stupid question, but once I have debian running, can i simply add an NTFS formatted, pre-backed-up USB drive to the dockstar, and share that on the network via samba running on debian?
Re: newbie installed debian, needs NAS - now what?
November 10, 2010 02:49AM
if you install ntfs-3g. yes.

but the speed will be pretty slow...
Re: newbie installed debian, needs NAS - now what?
November 18, 2010 06:28PM
Well, ntfs-3g access is slow, like you guys pointed out. I formatted my drive to ext3, and it runs much better. Now, has anyone tried running Gallery on this? Either v 2 or 3? I tried installing Gallery 3, but every photo upload fails, and I am not sure why. I tried both large and small files.

Does anyone have suggestions for other photo sharing servers like Gallery? I also tried Coppermine, but that failed as well with all uploads.

My main goal is to make this a family photo sharing server...

thanks!
Re: newbie installed debian, needs NAS - now what?
November 18, 2010 09:34PM
I tried gallery2 when I was still running PogoPlug Linux. It didn't work very well. The software itself was fine, but the helper apps (ffmpeg, imagemagick) ground my Dockstar to a halt for 5-10 minutes per page as it generated thumbnails. It wasn't pretty. I haven't tried under Debian yet to see if that was an Archlinux thing, or if it was a Dockstar limitation. Since Gallery 3 isn't in Debian yet, if I were to try again I'd go with the gallery2 package that's included. Maybe you missed a dependency or something so you had errors, I'm not sure.

As for other packages, I've used cthumb before (which would have the advantage on a Dockstar of having static webpages, so no generation on the fly to slow things down), and a friend of mine uses libapache-gallery-perl (simple to use, just drop photos into a directory, but all it does is display pictures). As for others, I haven't tried them so I can't speak to them. These days, I tend to use PicasaWeb from Google more.
Borgel
Re: newbie installed debian, needs NAS - now what?
November 21, 2010 04:30AM
Thanks petergunn! That list of packages was just what I was looking for, and now everything works.
Peter Gunn,
Thank you very much. After floundering around for quite a while, what you posted was exactly what I needed to get Samba up and running on my dockstar! I really appreciate it that you took the time to post!
Thanks,
Tim
Re: newbie installed debian, needs NAS - now what?
December 10, 2010 04:17PM
petergunn,

I followed your commands above but had a couple of problems.

useradd -d al

returned ...

useradd: invalid home directory 'al'

there is a /home/al directory

Then I did ...

nano /etc/samba/smb.conf

and added to the end if the file ...

[files]
comment = Some files
valid users = al
browseable = yes
read only = no
locking = no
path = /home/al
guest ok = no

Still no joy. I can see a "Debian" server on the Windows now but it has no shares, on my Ubuntu box under Windows Workgroup I can see "files, homes,and print$". It asks for a login and password over and over again but does not let me in.

Any ideas.
Re: newbie installed debian, needs NAS - now what?
December 11, 2010 01:01PM
Phreon Wrote:
-------------------------------------------------------

> useradd -d al
>
> useradd: invalid home directory 'al'
>
> there is a /home/al directory

I think something is up with our /home/al permissions.

The following might help:
chown al /home/al
chmod 777 /home/al
/etc/init.d/samba restart

-PG
Re: newbie installed debian, needs NAS - now what?
December 12, 2010 09:48AM
Thanks again petergunn,

that works. I can now transfer files to my samba share.

I assumed (incorrectly) that when I created a new user, he would have write access to his own folder.

P
Re: newbie installed debian, needs NAS - now what?
December 19, 2010 09:00PM
Thanks petergunn! I've always struggled with configuring Samba.
Aneel Maan
Re: newbie installed debian, needs NAS - now what?
February 20, 2011 08:41PM
Thank you sooooo much petergunn. I've been struggling to install Samba on my Dockstar for weeks because I couldn't figure out why I couldn't use smbpasswd. Now thanks to like 2 lines i am able to finally use my external harddrive again :DDD I have a 1.5tb usb external formatted with ntfs. Im using ntfs-3g but read and write speeds are pretty slow. The most I can upload to it is at about 2 MBps. I have it mapped as a drive on my laptop and it locks up frequently when trying to access the drive. My external has some power saving feature on it that makes it go to sleep after about 1 hour of inactivity. Is there a way to stop this (a keepalive) because my dockstar freezes for like 30 seconds when I try to access the drive.
Re: newbie installed debian, needs NAS - now what?
February 20, 2011 09:01PM
Hi Aneel,
I'm no expert but if its the drive thats spinning down itself you may want to try disabling APM on the drive using sdparm or hdparm (-B 255).

-PG
dangerstranger
Re: newbie installed debian, needs NAS - now what?
March 03, 2011 04:27PM
Thanks PeterGunn! I got Samba installed because of your easy to follow directions.

One question I have for everybody is that I see the users home files (i.e. /home/user123) are shared in addition to the share I had setup in the smb.conf (i.e. /mnt/share)

Is there anyway I can unshare the home files while still keeping the other share active?

if not, it's no big deal, just trying to reduce complexity on my network.

thanks again!
Re: newbie installed debian, needs NAS - now what?
March 03, 2011 05:02PM
Found it:

Quote

The [homes] section allows a remote users to access their (and only their) home directory on the local (Linux) machine). That is, users trying to connect to this share from Windows machines, will be connected to their personal home directories. Note that to do this, they must have an account on the Linux box.

I can just disable that access and I should be set.

This is why I love linux, sure it's really complicated, but there's also an immense amount of information available to let you fool around and figure things out by yourself!



Edited 1 time(s). Last edit at 03/03/2011 05:02PM by dangerstranger.
Re: newbie installed debian, needs NAS - now what?
March 28, 2011 03:35PM
Hi petergunn

First of all, Thanks for your guide for setting up the GV. It's working perfectly for almost a week.
Since you posted the way to use Samba file server. I am wondering if you can modified as using Samba Print server?

Thanks
Re: newbie installed debian, needs NAS - now what?
March 28, 2011 03:42PM
Sorry codier - Its been many years since I used samba/CUPS for printer sharing. I have a network printer now that manages its own queue :-)

-PG
Re: newbie installed debian, needs NAS - now what?
March 28, 2011 04:08PM
No problem PG.

Thanks for the fast reply. ^_^
Re: newbie installed debian, needs NAS - now what?
March 28, 2011 10:44PM
Here is how to install CUPS:

# apt-get install cups foomatic-filters cups-driver-gutenprint ghostscript-cups

- Out of the box supported printers:

BubbleJet
DeskJet
HP LaserJet Series PCL 6
HP Color LaserJet Series PCL 6
Generic text-only printer
Generic PostScript Printer

- To manage the printer (e.g. installing correct driver), use a browser and log in using root password (or use webmin if preferred)

https://<dockstar-ip-addr>:631/admin/

- After that, just add a network printer at each PC.



Edited 1 time(s). Last edit at 03/28/2011 10:45PM by bodhi.
Re: newbie installed debian, needs NAS - now what?
March 29, 2011 09:46AM
Thanks bodhi,

I will give a try tonight. by the way. I am using dockstar for GV. can it still holding CUPS?
Re: newbie installed debian, needs NAS - now what?
March 29, 2011 04:19PM
codier,

Sorry, what is GV?
Re: newbie installed debian, needs NAS - now what?
April 07, 2011 10:52PM
bodhi Wrote:
-------------------------------------------------------
> codier,
>
> Sorry, what is GV?

GV = GoogleVoice

sorry for the late reply.
for CUPS, I am using Samsung SCX-4100. any suggestion on which driver I should use?
Re: newbie installed debian, needs NAS - now what?
April 07, 2011 11:46PM
codier, I would not worry about the driver yet. After you've installed CUPS, just go to your PC and add a network printer and select to Samsung model. If the Samsung driver does not exist on the PC, I think you only need to add that at the PC. If that does not work, then find the driver later. It did work for me without installing any extra driver with CUPS.
Re: newbie installed debian, needs NAS - now what?
August 28, 2011 06:48PM
having issues installing samba-common-bin

debian:~# apt-get install samba-common-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package samba-common-bin
debian:~# ping google.com
PING google.com (74.125.225.83) 56(84) bytes of data.
64 bytes from 74.125.225.83: icmp_seq=1 ttl=54 time=18.4 ms
64 bytes from 74.125.225.83: icmp_seq=2 ttl=54 time=17.3 ms
64 bytes from 74.125.225.83: icmp_seq=3 ttl=54 time=17.1 ms
64 bytes from 74.125.225.83: icmp_seq=4 ttl=54 time=35.5 ms

I'm new do debian any help would be appreciated
Re: newbie installed debian, needs NAS - now what?
August 29, 2011 04:12AM
Odin-Zifer Wrote:
-------------------------------------------------------
> having issues installing samba-common-bin
>
> debian:~# apt-get install samba-common-bin
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Couldn't find package samba-common-bin
> debian:~# ping google.com
> PING google.com (74.125.225.83) 56(84) bytes of
> data.
> 64 bytes from 74.125.225.83: icmp_seq=1 ttl=54
> time=18.4 ms
> 64 bytes from 74.125.225.83: icmp_seq=2 ttl=54
> time=17.3 ms
> 64 bytes from 74.125.225.83: icmp_seq=3 ttl=54
> time=17.1 ms
> 64 bytes from 74.125.225.83: icmp_seq=4 ttl=54
> time=35.5 ms
>
> I'm new do debian any help would be appreciated

You should try updating apt. First do some research to understand how it works. You pinged google, now use it for a search. As for the file, samba-common-bin_3.5.6~dfsg-3squeeze4_armel.deb is the current for squeeze. You might also try expanding your sources.list file. Hands on is your best trainer.
Re: newbie installed debian, needs NAS - now what?
September 04, 2011 02:52AM
Thanks, tuns out I was running out of space.
df -h is a very handy command.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: