Symlink problems

shackme3

Verified User
Joined
Nov 17, 2007
Messages
7
It seems that there is a error in DA for freebsd. By default standart freebsd comes with this (on 80 gb hdd) :

Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 496M 487M -31M 107% /
/dev/ad0s1e 496M 12K 456M 0% /tmp
/dev/ad0s1f 69G 3.3G 60G 5% /usr
/dev/ad0s1d 1.4G 180M 1.1G 13% /var


So the problem is that DA store all information in /home. Why ?

Server without DA output :
lrwxrwxrwx 1 root wheel 8 Nov 27 11:46 home -> usr/home
Server with DA output :
drwx--x--x 18 root wheel 512 Dec 15 16:48 home

That means, that DA does not creates a symlink to /usr partition. I've tested on a fresh bsd install with fresh DA. This should be fixed :)

I think it's because on a fresh FreeBSD install there is only one real user (root) and there is no /home symlink (all information are stored in /root), if you create first a new system account, FreeBSD will automatically create a sylink to /usr/home (right partition) - if no, it will be stored on / mount point witch is allways small.

So DA developers should consider about creating first a user on wheel group (to su later) and only after install DA.

There was a post before (http://www.directadmin.com/forum/showthread.php?t=14458&highlight=freebsd+/home ) , but nothing has changed after all. I think this issue should be fixed .

And sorry for my bad english :)
 
Last edited:

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Personally, I don't think either /tmp or /var are large enough in your configuration. You'd better use Dovecot, as otherwise all mail is going to be stored in /var, which isn't big enough.

Even so I don't think it's big enough with many sites these days using large databases, also stored in /VAR.

On an 80G drive we'd probably to 10G in /var and 5G in /usr.

Jeff
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,005
Hello,

We use /home because that's where all systems create accounts in.
On FreeBSD, accounts are still created in /home, but the systems often setup /home -> /usr/home ... I'm not sure why, but that's just how some FreeBSD boxes do it.

Note that the creation of partitions and space for partitions is purely the responsibility of the admin who's installing the system.
As specified here, we mention how much space you should have in each partition:
http://www.directadmin.com/install.html
If you want /home to be under /usr/home, then it would be up to you do that.
Many admin's want /home to be under their / partition, so it's not really up to DA to create symlinks to fix space issues as it wouldn't know what the admin would want.

John
 

HH-Steve

Verified User
Joined
Oct 8, 2004
Messages
59
Location
Australia
I don't know about everybody else but I always specify /home to be a seperate partition and I say what partition sizes I want when I order a dedicated server.

Most people wouldn't run into this problem as nearly every dedicated server provider will create an admin account so you can login via ssh and su to root so the symlink would already be created.

Steve
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
I'm not sure why, but that's just how some FreeBSD boxes do it.
Having admin'd some BSD-based systems a few years ago (BSD-OS, but the theory is the same) I know why.

BSD folk are purists.

Simply put, ALL user-writable data on all drives is in the /usr partition; everything not already there is put there with a link.

Why? So you can (for safety sake) mount all other partitions RO. And so that you could share them across the network even before systems knew how to do file-locking across networks. And so you could install everything only once, even for a farm of servers.

Admirable idea, but made superfluous by the fact that Linux has prevailed, and linux doesn't enforce it, and many admins never learn it.

For what it's worth, BSD doesn't like you putting configuration files, templates, customapache/custombuild in /usr/local either.

Jeff
 

elvandar

Verified User
Joined
May 14, 2007
Messages
49
The latter is bullocks :), all third party application information shoud live and reside in /usr/local (preferably in /usr/local/etc if it is configuration information); and not within the /etc filesystem which is for the main system (only) (DA writes to that, which is a bad thing in my opinion).

Secondly; DA could just detect whether the machine is a FreeBSD machine and act accordingly; that way a standard installation on FreeBSD would just work perfectly there (which is including the symlink).
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
My understanding has always been that /usr shouldn't be writable; that all writable files under /usr should be links to something in /var. If I'm confused, or if I've neglected to point out that you can have a link under /usr to something in /var, then I apologize.

As I said in my earlier post, it's been years since I ran any BSD implementations and my recollections could be faulty.

Jeff
 
Top