• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Was going to use Ubuntu 6.06 for our file server... decided on Debian

Brazen

Diamond Member
Here is a sloppily laid out guide, from start to finish, of how I set up our file server. It's not very organized and has a lot of virtual machine and SAN specific stuff in it, but whatever. Maybe I'll clean it up, but this thread will probably just get buried. If anyone has any questions you can post or PM me:

BTW, the "#" denotes a line that should be typed into the console and then hit [enter], do not type the "#".

-------------------------------------------------------------------------------------------------------
After creating the virtual machine, boot to a GParted LiveCD and create an aligned /boot partition and swap partition. There is more information on this at the end of this post.

Install Debian from the latest netinst iso (I am using Debian 3.1r3). I would give it a 6 GB harddrive and remove the floppy drive.

Set hostname to FILES01.BUCOKS

I would suggest manually partitioning and set up a 106 MB /boot partition, at least 518 MB swap partition, 2.0 GB /var partition and the rest for the / partition. Be sure to set the /boot partition as flagged bootable.

When it asks what protocol to use for apt, choose http. When it ask to choose an apt mirror, you can pick any one but the sluglug one has worked well for me.

Log in as the user you set up and use ?su ?? to get to the root account.

# apt-get install sudo ssh alien screen libnet-ssleay-perl openssl libauthen-pam-perl libio-pty-perl
# visudo
Add the line ?username ALL=(ALL) NOPASSWD: ALL? but of course replace username with the username you set up.

# ifconfig
Take note of the IP address assigned to eth0. You?ll need this to log in via ssh. Now exit the su with ?exit? and logout with ?logout?. Connect into the server via ssh. This makes things easier.

# nano .bash_profile
Add these two lines to the file:
PATH="${PATH}":/sbin
PATH="${PATH}":/usr/admsnap

# sudo apt-get install kernel-image-2.6.8-3-686 kernel-headers-2.6.8-3-686 && sudo shutdown ?r now

This will install a kernel that is compatible with Trend Micro?s ServerProtect (in case I decide to use ServerProtect). Just answer ?n? to the ?Do you want to stop now?? question in regards to the kernel.

# sudo mv /etc/securetty /etc/securetty.original && sudo touch /etc/securetty
This will deny direct root logins.

# sudo apt-get update && sudo apt-get upgrade
This will update the system

# wget http://superb-west.dl.sourceforge.net/sourceforge/webadmin/webmin_1.300_all.deb
# sudo dpkg ?i webmin_1.300_all.deb
This will download webmin and install it. It would probably be a good idea to go to www.webmin.com and find out the latest version. You can just replace 1.300 in the above link with the latest version number. It is also possible to install webmin with apt-get, but it is a horribly old package and the old interface is a bit clunky.

You can now login to webmin at https://serverip:1000 and use the root account and password. First things to do are change the ssh server to NOT allow root login, set up a new firewall allowing incoming ports 10000:tcp, 22:tcp, 136:udp, 137:udp, 138:tcp, 445:tcp and of course the lo incoming adapter and established,related connections. You will also need to change the ip address and gateway and then re-login using the new address (this should be 192.168.0.52 for FILES01 and should also have a dns entry).

Install vmware tools and set time.sync to TRUE
This best done from the vmware console, not ssh, as it does reset the network and will kill your ssh connection, therefore killing the installation.

Right-click on the virtual machine and choose ?Install Vmware Tools?
# sudo mount /media/cdrom
# tar ?xzf /media/cdrom/VMwareTools-whatever.tar.gz
# cd vmware-tools-distrib
# sudo /etc/init.d/networking stop
# sudo rmmod pcnet32
# sudo ./vmware-install.pl
Pretty much just [enter] your way through the install
# sudo rmmod pcnet32
# sudo rmmod vmxnet
# sudo depmod ?a
# modprobe vmxnet
# sudo /etc/init.d/network start
# sudo shutdown ?h now
In the VI client, after the virtual machine is off, right-click the virtual machine and choose ?Edit settings?? Go to the ?Options? tab, click Advanced and click ?Configuration Parameters?? Next to tools.syncTime, change ?FALSE? to ?TRUE?.

Power on the virtual machine.
Log in (through ssh) and do:
# rm -rdf vmware-tools-distrib/
To get rid of the vmware tools install files

# sudo cp /etc/apt/sources.list /etc/apt/sources.list.original
# sudo nano /etc/apt/sources.list
Add this line, without the quotes:
?deb http://www.backports.org/debian sarge-backports main?
Close and save
# sudo apt-get update
# sudo apt-get -t sarge-backports install krb5-user libpam-krb5 samba winbind attr

[enter] your way through the blue screen configuration questions. Go back into webmin > System > ?Bootup and Shutdown?, select Samba and Winbind (make sure you don?t accidentally select Webmin instead) and click ?Disable Now & On Boot?.

# sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.original
# sudo mv /etc/krb5.conf /etc/krb5.conf.original
# sudo touch /etc/krb5.conf

Test with:
# kinit Administrator@DOMAIN
Enter the administrator password when prompted. It should not return any errors.

# sudo nano /etc/samba/smb.conf
Write out the smb.conf which I have copied at the end of this post.

# sudo net ads join
If you did not do the ?kinit? above then you will have to add ?-U Administrator? to this line. This will join this server to the Domain specified in the smb.conf

# sudo nano /etc/pam.d/samba
Add the following lines, without the quotes:
?auth required pam_winbind.so?
?account required pam_winbind.so?
Close and save the file.

# sudo nano /etc/nsswitch.conf
Add ?winbind? without the quotes to the end of the passwd and group lines.

# sudo ldconfig ?v | grep winbind
This will rebuild the linker cache. Just do it.

Let?s go ahead and install admsnap:
Use ssh to copy the admsnap i386 rpm file to the server. Install it with:
# sudo alien -i admsnap-whatever.i386.rpm
We already added the /etc/admsnap directory to our PATH statement above so it should be good to go. You can check it with:
# admsnap help
Which should return some usage information.

Take a snapshot and attach the lun for file storage:
# sudo shutdown ?h now
After the virtual machine shuts down, now would be a good time to take a snapshot. After adding an RDM to the virtual machine in ?Physical Compatibility? mode, you will not be able to take any more snapshots. You?ll want to add the SAN lun for the file share now. You do that by adding a harddrive, choosing RDM and use ?Physical Compatibility? so we can use admsnap. Power on the virtual machine and connect back in through ssh.

Back in webmin, click the Hardware tab and ?Partitions on local disks?. You should see the lun as a new disk, probably sdb (or SCSI device B). If this lun was just created it should have no partitions listed. If this is a rebuild and the lun has already been used, then it may have partitions on it. You may want to delete those and start over, or re-use those partitions, depending on the reasons for the rebuild.

Click ?Add primary partition?. Leave the defaults and click Create. Click on the ?Linux? label next to the new partition. In the drop down box next to ?Create Filesystem? choose ?New Linux Native (ext3)? and then click ?Create Filesystem?. Leave the defaults and click ?Create Filesystem? on the next screen. This will now take a while, do not close this window until it says ?... command complete.? at the bottom.

# sudo nano /etc/fstab
Add the following line, without the quotes:
?/dev/sdb1 /export ext3 defaults,acl,user_xattr 0 0?
Close and save.

# sudo mkdir /export
# sudo mount /export
# sudo mkdir /export/testshare

In webmin, go back to the ?Bootup and Shutdown? options, check Samba and Winbind, and choose to ?Start Now & On Boot?.

Test with this:
# getent passwd
# getent group
They should return Active Directory users and groups, respectively. For some reason, I?ve had to kill these the first time after they hung for several minutes and run them a second time. I?m guessing it has something to do with some timeout.

Restrict the share?s file permissions with this:
# sudo chmod 750 /export/testshare/
# sudo chgrp ?BUCOKS\domain users? /export/testshare

You should now be able to access the file share at \servername\test and edit permissions using the Windows security tab.

------------------------------------------------------------------------------------------------------
Appendix A: The smb.conf
########## Globals ############
[global]
realm = DOMAIN
workgroup = DOMAIN
security = ADS
encrypt passwords = yes

### Winbind configuration
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind enum users = yes
winbind enum groups = yes

### default Samba stuff
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

### Some more stuff I think we need
map acl inherit = yes
ea support = yes
store dos attributes = yes
map hidden = no
map system = no
map archive = no
dos filetimes = yes
dos filetime resolution = yes
#this makes sure only admins can edit permissions
inherit owner = yes

########## Shares ###########
[test]
comment = Testing shared directory
read only = no
path = /export/testshare
valid users = @"DOMAIN\domain users"
admin users = @"DOMAIN\domain admins"
inherit acls = yes

-------------------------------------------------------------------------------------------------------
How to align partitions
Aligning partitions is something that can improve the perfomance of all servers, but is only really necessary when using SAN equipment. If you want to know more, google for it.

Only the first partition on a disk needs to be aligned. All subsequent partitions will fall into place as aligned.

Boot to a GParted LiveCD.

If this is on VMWare, be sure to choose ?Manual Video Card? and then ?done? during bootup. Choose the vesa driver, 16 bit screen depth, and 800x600.

Open a terminal and type
# fdisk /dev/sda
Type ?n? for new partition
Type ?p? for primary
Type ?1? for partition 1
Just hit enter to start at the first cylinder
If this is linux, type ?+102M? to create the /boot partition; for Windows, just hit [enter]
Type ?x? for expert mode
Type ?b? to specify starting block
Type ?1? to select partition 1
Type ?128? to make partition 1 align on 64KB boundary
Type ?r? to return to main menu
Type ?w? to write changes

If using for linux, create a swap partition after the first partition and go ahead and format it.

Reboot into your OS?s install cd, be sure you do not delete this partition. Either format it with Windows and install Windows on it, or create additional partitions in linux and then remove the first partition and recreate it as the /boot partition (be sure you do not touch the second partition already formatted as swap!).

For some reason, all the linux distros I?ve found give an error when the first partition is aligned.

--------------------------------------------------------------------------------------------------------

the original thread follows:


I set up all 3 (Debian, CenOS, and Ubuntu Server) as samba file servers attached to an Active Directory domain. They all set up pretty much the same, the only difference being getting the packages installed.

For Ubuntu, I used the samba packages provided in the default Ubuntu repos which gave me 3.0.20. For CentOS, I used the samba packages in the default CentOS repos which gave me 3.0.10. For Debian, I added the SerNet repos for samba (linked to from samba.org, so should be trustworthy) which gave me samba 3.0.23c (the latest). I could have used SerNet rpms for CentOS (no yum repo though), but I did not find that out until I was finished testing CentOS.

So, as I said, they all set up pretty much the same and when accessing the file shares, they all act and work the same, BUT for whatever reason Ubuntu seems faster. Especially when deleting files (no hard benchmark test done), Ubuntu is nearly instantaneous while the other two take several seconds. In all other file operations Ubuntu _seems_ to be snappier and more responsive.

The downfalls though, are TrendMicro's ServerProtect antivirus will not run on Ubuntu, but it will on Debian or CentOS. However, I'm not sure I even WANT to use ServerProtect. It would only be to do nightly scans of the file share, and I may even prefer clam since all our workstations have TrendMicro antivirus.

Ubuntu Server is also new enough that it hasn't really "proven" itself like Debian and CentOS have. I also need to make sure that the admsnap utility that works with our EMC Clarion SAN will install fine on Ubuntu (an rpm is provided for CentOS), so I can use it with the Samba Virtual Shadow Copy VFS module.

In short, I've been admining Redhat linux for like 8 years now and don't know if I want to switch. I really just want something that will run for at least 5 years, keep itself updated, and not break itself, but still provide good support for the latest samba features.

So there you have it.
 
I'm a big Deb Stable fan....Not that I have seen MUCH broken by Ubuntu updates (I have it on my laptop) but I HAVE seen it. Never once on any of my deb stable boxes has an update broken anything...of course, they are pretty much all single task dedicated boxes.
 
The first thing to do would be to find out if the EMC stuff will run on Ubuntu, if it doesn't then your decision has been made for you.
 
Originally posted by: nweaver
I'm a big Deb Stable fan....

Yeah, you and a few others around here; which says a lot for Debian.

Originally posted by: Nothinman
The first thing to do would be to find out if the EMC stuff will run on Ubuntu, if it doesn't then your decision has been made for you.

True, true. Now, I thought all their utilites are provided as rpms and tar.gz files. Reading on the Powerlink site says they only support SLES and RHEL though, so I may have been mistaken. Unfortunately, due to the abomination that is Powerlink, I have to call to get updated versions of their software (I could dig out the cds, but I know the software on them are like 2 years old).
 
Ok, so it looks like the admsnap comes with a bunch of rpms for different arches for SLES and RHEL and also a tar.gz file. I extracted the tar and there are 3 files in there: admsnap, admsnap.adm, and admsnap.idb. I can't find any install instructions, but it almost looks like I can just make these files executable and run admsnap directly? I do have usage instructions and the syntax is "admsnap option" but it seems odd to me that it wouldn't have some sort of installation routine.

Also there are three other files in with the rpm and tar files: admsnap.dep, admsnap.lpp, and ADMSNAP.pkg. I don't have a clue what these could be.
 
but it seems odd to me that it wouldn't have some sort of installation routine.

You think "enterprise software" means documentation too? =)

Also there are three other files in with the rpm and tar files: admsnap.dep, admsnap.lpp, and ADMSNAP.pkg. I don't have a clue what these could be.

A quick google suggests that the .lpp file is for AIX packages, I think Slackware has/had packages ending in .pkg and I don't know what the .dep file would be for except maybe for RPMs and they misnamed the .spec file.
 
Originally posted by: Nothinman
but it seems odd to me that it wouldn't have some sort of installation routine.

You think "enterprise software" means documentation too? =)

Also there are three other files in with the rpm and tar files: admsnap.dep, admsnap.lpp, and ADMSNAP.pkg. I don't have a clue what these could be.

A quick google suggests that the .lpp file is for AIX packages, I think Slackware has/had packages ending in .pkg and I don't know what the .dep file would be for except maybe for RPMs and they misnamed the .spec file.

Well looking around more on Powerlink, I did find some install documentation (if you have any EMC products and a Powerlink account, you would know what a jumbled mess Powerlink is). I found out what the .dep, .pkg, and .lpp are for: they are like rpm/debs for other OSes like (as you said) AIX and HP/UX and something else I don't remember (at home now). I still couldn't find any info on what's going on with that tar file though, and I posted on Powerlink's forums asking if it was possible to install admsnap on Debian.
 
Originally posted by: Nothinman
Did you try just setting it executable and running it?
Just tried it this morning. Unfortunately it's a no-go. It gave me this: "-bash: ./admsnap: cannot execute binary file." I'm going to try converting the rpm using alien. Never done it before though, so I'm just guessing as to how well that will work.

UPDATE:

Alien seems to have installed it fine. The admsnap command does return results, though I tried it on a test server that is not connect to the SAN (the file server I'm setting up is busy being tested from the client side by other departments right now). The sucky thing is though, I have to put in the full path to the command: "/usr/admsnap/admsnap". Is there anyway I can set something so I just have to type "admsnap" and that's it?

Also, I was strongly considered using Debian over Ubuntu, but man I don't know what it is with that delete performance. On Debian and Ubuntu, I create 2 empty directories and 2 empty files from the Windows client. Deleting them on Debian took 15 seconds before it popped up the confirmation box, on our current Windows file server it took about 3 seconds, and on the Ubuntu file server it was as instantaneous as I can tell. And updating Debian to the latest Samba (3.0.23c) and using the 2.6.8-3 kernel did not help.
 
The sucky thing is though, I have to put in the full path to the command: "/usr/admsnap/admsnap". Is there anyway I can set something so I just have to type "admsnap" and that's it?

Add /usr/admsnap to your PATH environment variable.
 
Originally posted by: Nothinman
The sucky thing is though, I have to put in the full path to the command: "/usr/admsnap/admsnap". Is there anyway I can set something so I just have to type "admsnap" and that's it?

Add /usr/admsnap to your PATH environment variable.

I'm not really sure how to do that. Do I add something to my .bash_profile? like "PATH=/usr/admsnap" ?
 
I'm not really sure how to do that. Do I add something to my .bash_profile? like "PATH=/usr/admsnap" ?

Almost. I'm not sure about Ubuntu, but on Debian the default .bash_profile has in it:
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi
So if you add 'PATH="${PATH}":/usr/admsnap' to the end of the file it should be set on your next login. Although to test you just have to do '. .bash_profile'. <-- That's dot space .bash_profile.
 
Awesome. Done, and works. Thanks.

UPDATE:

For the fun of it, I've added "testing" to my apt sources (I just copied the lines with "stable" to new lines, but changed "stable" to "testing"... I hope that's right) and did a dist-upgrade. In 20 minutes I'll see if there is any speed difference in the file share.

Does anybody think running Debian Testing would be more reliable than Ubuntu 6.06? Or vice-versa?

UPDATE2:

Aargh! The delete actually took longer... like 30 seconds.

UPDATE3:

Hmm, maybe I spoke too soon. I tried putting a few more files out there and removing them (tried it a couple times) and now it is deleting them as near-instantaneously as Ubuntu did. It appears just that first time was slow (which may have even been the case on Ubuntu, I don't remember).

UPDATE4:

Ok, ok, I think I've found something. The deletes take a long time only when the files are in the root of the file share. The times is has gone fast has been when the files are under a folder in the driver share. This may have even been true of Ubuntu, and it may have even been true of Debian Stable. I may set up a new server and try it again on Debian Stable.
 
Does anybody think running Debian Testing would be more reliable than Ubuntu 6.06? Or vice-versa?

Doubtful and AFAIK there's no security support for testing so you'll end up waiting longer for patches. I remember hearing about talk of setting it up, but I don't think they ever did.
 
Originally posted by: Nothinman
Does anybody think running Debian Testing would be more reliable than Ubuntu 6.06? Or vice-versa?

Doubtful and AFAIK there's no security support for testing so you'll end up waiting longer for patches. I remember hearing about talk of setting it up, but I don't think they ever did.

Is ther any way to get just the Samba packages from Testing, and have them updated from Testing, while everything else is updated from Stable? I think I would rather get them from Debian Testing than from Sernet, and I need/want some features that were new to Samba 3.0.20.
 
Is ther any way to get just the Samba packages from Testing, and have them updated from Testing, while everything else is updated from Stable? I think I would rather get them from Debian Testing than from Sernet, and I need/want some features that were new to Samba 3.0.20.

Yea, it's called apt pinning. Essentially you setup both repositories and tell apt to prefer one over the other, in your case stable. Then you can tell it to install a version from testing and it'll pull in just what it needs from testing.

What is your timeline for putting this into production? Etch is supposed to be released in Dec I believe, so you might be able to set it up for 'etch' instead of testing so what when etch become stable you'll automatically have stable instead of being upgraded to etch+1.
 
Personally I like to backport applications from testing to stable by recompiling from the deb****** packages.

That way you only pull down what you absolutely need for that version of the program.. Otherwise depending on how much you do you can end up with a bad mish-mash of multiple Debian releases if you just pull the binary packages. Sometimes you run into problems with libraries breaking things even though they haven't moved up a major version number and stuff like that.

but if It's just for one or two packages then apt pinning is great.


Otherwise for popular packages http://www.backports.org/ exists that already do the work for you. They've backported stuff from testing to stable. They have a updated Samba package for you to use. I beleive Samba 3.0.22
 
Originally posted by: drag

Otherwise for popular packages http://www.backports.org/ exists that already do the work for you. They've backported stuff from testing to stable. They have a updated Samba package for you to use. I beleive Samba 3.0.22

Ooh, nice. I consider apt pinning too; at least I have something to google for.
 
Any insight into which is better: setting up /etc/apt/preferences or using "apt-get -t sarge-backports install samba"

Will both methods cause the samba package to continue being updated from sarge-backports? The apt-get man page is kinda ambiguous on how the package will be updated when using -t.
 
well I'd setup pinning for /etc/apt/preferences to have it give the default sarge stuff priority and put the backports on a lower priority and do the "-t sarge-backports" thing.

That way I only have to grab the minimal amount of stuff from the sarge-backports people.

Then when you do upgrades just be sure to remember to run apt-get install -t sarge-backports samba and it'll install the latest version. At least thats how I think it will work.
 
Originally posted by: drag
well I'd setup pinning for /etc/apt/preferences to have it give the default sarge stuff priority and put the backports on a lower priority and do the "-t sarge-backports" thing.

That way I only have to grab the minimal amount of stuff from the sarge-backports people.

Then when you do upgrades just be sure to remember to run apt-get install -t sarge-backports samba and it'll install the latest version. At least thats how I think it will work.

On the backports site, it does say that by default, all packages in the backports repo are a lower preference than the main repo. So I would have to set up pinning to give a higher priority to the samba OR use the -t switch. The site said if the package is going to have to grab dependencies, then using the -t switch is easier. Since I knew samba was going to have to grab dependencies, I just went ahead and did the -t thing.

I guess I'll just have to check it and see if a regular upgrade will grab upgrades from the backports repo or if I will have to do the install -t thing you say.
 
hmm, yeah, there's howtoforge.com also, but I think I would need to clean it up and separate out some of the extra, like the SAN-specific and VMWare-specific stuff. If I get some time to, then yeah, I'll put it out there.
 
I wish I could run Linux on my desktop every distro I've tried has failed

Hopefully my new Rig will work :-D
 
Back
Top