You are not logged in.

#1 2006-05-02 16:16:41

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

/opt symlinked to /usr/opt

I usually make my / partition around 100 mb, so in Arch i can't really put too many big packages in /opt because the / gets filled up very quick. One solution is to make separate /opt partition but that involves calculation of disk space for /opt. I'm used to *BSD way of things where everything is put in big /usr partition, so that means i just make it the biggest.

What do you think about creating /usr/opt and putting all /opt packages in there or alternatively creating by default install a symlink from /opt to /usr/opt


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#2 2006-05-02 17:35:20

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: /opt symlinked to /usr/opt

Why not just have a big root (/) partition?

My setup is like so:
/ - 5G
/var - 1G
/home - 20G
/media - 120G


·¬»· i am shadowhand, powered by webfaction

Offline

#3 2006-05-02 18:28:19

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: /opt symlinked to /usr/opt

I believe the following solution is better:

mount --bind /usr/opt /opt

If you do a symlink, I would guess that you probably will have the same problem which Snowman describes in this thread.

Snowman wrote:
Eliatamby wrote:

I just create a symlink from /opt to /usr/opt anyway, generally because when I budget my partitioning I never take /opt into account.  If I then install KDE or something, root gets filled up

I did this a while ago. The symlink confuse pacman when you try to do 'pacman -Qo' on files in /opt. It will report that no package owns the file. It also confuses namcap when it checks for dependencies. These are the only problem I noticed with the symlink method.  Currently I have /opt on a seperate partition.

This problem doesn't apear with mount --bind /usr/opt /opt AFAIK

Offline

#4 2006-05-03 00:08:54

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: /opt symlinked to /usr/opt

PJ, but your solution render another problem, with the locate command. I happen to use way more often locate than pacman -Qo. and speaking about pacman, shoudn't we fill a bug report? I wonder why pacman -Qo gets confused when /opt is symlinked to /usr/opt

shadowhand, root partition should be kept as small as possible. I never have it bigger than 128 mb
my partitions usually goes like this:
1 - /
2 - /boot
3 - /swap
4 - /var
5 - /usr
6 - /home


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#5 2006-05-03 00:16:57

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: /opt symlinked to /usr/opt

I also have some OpenBSD experience but what's the point of having a seperate /usr partition? Mounting it 'nodev', wow! No way, dude.


1000

Offline

#6 2006-05-03 01:21:28

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: /opt symlinked to /usr/opt

pixel wrote:

PJ, but your solution render another problem, with the locate command. I happen to use way more often locate than pacman -Qo. and speaking about pacman, shoudn't we fill a bug report? I wonder why pacman -Qo gets confused when /opt is symlinked to /usr/opt

Didn't realize that there would be another problem with my soultion. If you think pacman has a problem with symlinks then I guess you could fill a bug report. I can't say that I have a problem with it since I am going to be repartioning both my harddisks in a not so far future. The current setup was supposed to gain some performance (short story: stripped software raid) but the only thing it has done so far is making my system more complex. I probably will be using a big root (/) partition instead (on one of my harddisks), just to make it less complex.

Offline

#7 2006-05-03 05:10:40

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: /opt symlinked to /usr/opt

pixel wrote:

shadowhand, root partition should be kept as small as possible. I never have it bigger than 128 mb
my partitions usually goes like this:
1 - /
2 - /boot
3 - /swap
4 - /var
5 - /usr
6 - /home

Care to explain why?


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#8 2006-05-03 07:44:54

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: /opt symlinked to /usr/opt

i just have a massive / with everything except /home and my personal data.

It's simple, and I cannot see the downsides. I have my arch root, I have my secondary distro root, i have my swap partition and I have my shared home dir. I mean, that's simple. What's the point of having /dev/hda1 to /dev/hda923 with a different partition for each directory on your system? It makes dealing with partitions just plain confusing with no clear benefit.

People saying things about arbitrary tiny sizes for / or excessive splittage have no honest way to back that up, you're just making life difficult for yourself and dividing up your free space.

James

Offline

#9 2006-05-03 07:51:00

torindan2
Member
Registered: 2004-07-15
Posts: 74

Re: /opt symlinked to /usr/opt

If you anyway create 6 partitions why not to create another one for /opt ?

Offline

#10 2006-05-03 07:56:29

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: /opt symlinked to /usr/opt

torindan2 wrote:

If you anyway create 6 partitions why not to create another one for /opt ?

Because it's a division of space and extra complexity. Why have 2x5gb partitions when you can have one 10gb partition. If one of those 5gb partitions fills or goes near full, then life isnt going to be much fun.
/opt is generally not shared across distros, so that isnt an excuse for seperating it out either.

apart from to squeeze into an already poorly configured partitioning setup, is there any reason to provide /opt seperately?

James

Offline

#11 2006-05-03 07:57:25

postlogic
Member
Registered: 2005-02-24
Posts: 410
Website

Re: /opt symlinked to /usr/opt

I've never heard anyone claim that / should be kept as small as possible before.

I have

1. / - 30gb
2. swap 1gb
3. /boot 38mb

Works pretty sweet for me :-)

Offline

#12 2006-05-03 17:50:06

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: /opt symlinked to /usr/opt

Snarkout wrote:
pixel wrote:

shadowhand, root partition should be kept as small as possible. I never have it bigger than 128 mb
my partitions usually goes like this:
1 - /
2 - /boot
3 - /swap
4 - /var
5 - /usr
6 - /home

Care to explain why?

This is my fstab on my main workstation:
#
# /etc/fstab: static file system information
#
# <file>        <dir>         <type>    <options>                <dump> <pass>
none                   /dev/pts      devpts    defaults                   0  0
none                   /dev/shm      tmpfs     defaults                   0  0
tmpfs                  /tmp          tmpfs     defaults,noatime,nodev,nosuid,noexec 0 0

/dev/cdrom             /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
#/dev/dvd              /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/fd0               /mnt/fl   vfat      user,noauto,sync        0      0

/dev/hda7 swap swap defaults 0 0
/dev/hda5 / ext3 defaults,noatime 0 1
/dev/hda6 /boot ext2 defaults,noatime,nodev,nosuid,noexec,ro 0 1
/dev/hda8 /var ext3 defaults,noatime,nodev,nosuid 0 1
/dev/hda9 /usr ext3 defaults,noatime,nodev 0 1
/dev/hda10 /home ext3 defaults,noatime,nodev,nosuid 0 1
/dev/hda11 /data ext3 defaults,noatime,nodev,nosuid,noexec 0 1
# /dev/hda12 /backup ext3 defaults,noatime 0 1
/dev/hdd1 /data2 ext3 defaults,noatime,nodev,nosuid,noexec 0 1

#end of file

/ should be as small as possible because that's the proper Unix way of doing things. Why would you like to bloat the root partition with unnecessary stuff thats goes into /usr and /var. It also implies security problems. Since mail is residing in /var someone can crash the box by
filling up the / partition. Separate partitions also help mount different filesystems with different mount options.
since Arch Linux is coming back the Unix roots and KISS principle I thought it attracts more Unix oriented crowd who just loves simplicity and
proper and correct way of doing things.
In the FreeBSD Handbook (one of the best and most professional Unix books ever written) we read:
/ This is the root filesystem. Every other filesystem will be mounted somewhere under this one. 100 MB is a reasonable size for this filesystem. You will not be storing too much data on it, as a regular FreeBSD install will put about 40 MB of data here.
/var The /var directory contains files that are constantly varying; log files, and other administrative files. Many of these files are read-from or written-to extensively during FreeBSD's day-to-day running. Putting these files on another filesystem allows FreeBSD to optimize the access of these files without affecting other files in other directories that do not have the same access pattern.

I think you can find many online materials on how to best partition your hard drive.

The reason i like so much Arch Linux is that IMHO it is even simpler than Slackware, OpenBSD or FreeBSD. It is nearly a perfect distro with such phenomenal things as pacman (binary upgrades) and ABS (based on FreeBSD ports but even simpler) but some things like /opt mounted under / is just not very reasonable, that's why i symlink it to /usr/opt


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#13 2006-05-04 00:14:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: /opt symlinked to /usr/opt

pixel wrote:

<snip>

/ should be as small as possible because that's the proper Unix way of doing things.
Why would you like to bloat the root partition with unnecessary stuff thats goes into /usr and /var. It also implies security problems. Since mail is residing in /var someone can crash the box by
filling up the / partition.

why bloat your system by unneccesarily dividing all your free space. bloat means nothing in this context. It's crap word thrown around far too much.

As for it being a security issue, a majority of us are using arch as a single user desktop system. "Unix philosophy" doesnt apply, as much of it is multi-user and often server oriented as they are the last places true unix'es are running now.

I'd like to see this famed unix philosophy sometime... it's quoted so much... but I've never seen a text of it... I use linux anyway, why should I care about it smile The first few results that google brings up on it, mention nothing of partitions.

Separate partitions also help mount different filesystems with different mount options.

Um, if I seperated out all my partitions, they'd still all be ext3. Making a pot-purri of different partitions and filesystem types for each root directory would just be irritating.

since Arch Linux is coming back the Unix roots and KISS principle I thought it attracts more Unix oriented crowd who just loves simplicity and
proper and correct way of doing things.

KISS is one partition. I am yet to see any way that using extra partitions is any more 'KISS' - it seems the inverse.

In the FreeBSD Handbook (one of the best and most professional Unix books ever written) we read:

I use linux mate. Two different systems that work differently. BSD has it's whole disklabel setup, and thus generally still uses one partition, with multiple disklabels.

I'm not against using multiple partitions, using a seperate /home is always a good idea, and a seperate /var can be very useful in many situations, but going on and seperating /opt and /usr and everything else just seems slightly pointless to me.

Barring stuff about 'unix philosophy' and saying that it's 'KISS' when it isnt, or that it's 'bloat', or any other thrown around buzzwords, is there a real reason?

James

ot: bloat is a stupid word. it's used to describe everything that people dont like, it has no real meaning. kde is bloated, the kernel is bloated, linux is bloated, fluxbox is bloated, bob is bloated, partitioning layouts are bloated, php is bloated, c is bloated, sulfuric acid is bloated. Support your argument with a word that actually has some meaning.

Offline

#14 2006-05-04 01:52:13

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: /opt symlinked to /usr/opt

Hmmm...I'm feeling a little bloated.  I tend to agree with the iph-meister and unless you're running a production server, separating more than <code>/home</code> and <code>/var</code> seems like it offers only minimal returns with more hassle and wasted space.  Granted if you had LVM up and running, it wouldn't be as big of a deal to delegate your entire drive to a bunch of partitions, but I don't think most people realistically can guess how big they need to be before they try things out for a while.  If I had to do things over again, I would definitely trim down my <code>/var</code> space and lower my swap space too.  Aside from that, I've been pretty happy with what I chose for an 80GB drive:

$ df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/hda7 reiserfs     23G  8.8G   15G  39% /
none         tmpfs   1014M     0 1014M   0% /dev/shm
/dev/hda1     ext2     92M   11M   77M  12% /boot
/dev/hda6 reiserfs    3.9G  283M  3.6G   8% /var
/dev/hda8 reiserfs     46G  1.7G   45G   4% /home

I do agree that FreeBSD has some of the best documentation out there, but as iph said, not all of it will directly apply to Linux.

Offline

#15 2006-05-04 09:48:06

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: /opt symlinked to /usr/opt

iphitus, i think you should read this interview with Theo de Raadt. This man can teach all of us what bloat means and show us the definition of the KISS philosophy in Unix world (and Linux is part of Unix family too).

http://kerneltrap.org/node/6550

Theo de Raadt: Whenever I work in a piece of code, I always get frustrated when I see very complicated API's designed by people... who are inexperienced, or so I used to think. Actually it turns out that designing correct (translation: SIMPLE) APIs is one of the most difficult problems in software development. The Unix kernel:userland API is such a great example of clever interface, and early on I became addicted to learning how to design things so simple, yet so powerful, especially compared to the Amiga, which I was experienced with beforehands. Don't get me wrong -- there are little flaws and mistakes, or at least, corner cases that one can never get just right. Over the last 20 years this has led me to where I am. In our group, I always stick my nose into any new API which someone builds, to try to see if I can help make sure it is just right.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#16 2006-05-04 10:09:25

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: /opt symlinked to /usr/opt

pixel wrote:

iphitus, i think you should read this interview with Theo de Raadt. This man can teach all of us what bloat means and show us the definition of the KISS philosophy in Unix world (and Linux is part of Unix family too).

http://kerneltrap.org/node/6550

Theo de Raadt: Whenever I work in a piece of code, I always get frustrated when I see very complicated API's designed by people... who are inexperienced, or so I used to think. Actually it turns out that designing correct (translation: SIMPLE) APIs is one of the most difficult problems in software development. The Unix kernel:userland API is such a great example of clever interface, and early on I became addicted to learning how to design things so simple, yet so powerful, especially compared to the Amiga, which I was experienced with beforehands. Don't get me wrong -- there are little flaws and mistakes, or at least, corner cases that one can never get just right. Over the last 20 years this has led me to where I am. In our group, I always stick my nose into any new API which someone builds, to try to see if I can help make sure it is just right.

I have a lot of respect for Theo de Raadt, and if I had the finances and means available at my hands, I would have long ago donated to the OpenSSH project, not only to fund SSH, but the wonderful work on OpenBSD, which never ceases to amaze me.

But I can't see the relevance of your post to this thread. I dont see how one/two partitions is not KISS. It seems more KISS to me.

As for discussing bloated, it deserves it's own thread, and I suggest we leave that word out altogether for fear of going offtopic, excuse me for mentioning it.

Have you got any practical reason for splitting everything to it's own partition? or only purely philosophical reasons?

James

Offline

#17 2006-05-04 13:47:49

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: /opt symlinked to /usr/opt

I belive I read that splitting up partitions were useful (when I was on freebsd) because
1) The whole FS wouldn't be fragmented because a few files (eg. in /var) were written to over and over again
2) Less files on a filesystem would speed it up
3) Different mount-options -> the kernel won't be hanging around half-upgraded while the other partitions still could use soft updates

I used to split up these partitions since I started using freebsd, but after returning to gentoo and changing my filesystem layout about twice a month for a while, I decided to keep things split up in / and /home and not have to worry about it anymore. IMO that's more KISS, however there are positive sides of splitting it up too.

Offline

#18 2006-05-04 16:42:34

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: /opt symlinked to /usr/opt

iphitus wrote:

Have you got any practical reason for splitting everything to it's own partition? or only purely philosophical reasons?

I already named some of them. They are mainly concerned with security and ease of backup in mind. Maybe that's just me but for me / partition which is bigger than 128mb is definetly too bloated. It is always nice to mark a distinctive line between essential base system (/) from userspace third-party applications (/usr) and other varying files (/var) especially in multi-user environment


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#19 2006-05-04 20:36:51

mezoko
Member
Registered: 2005-03-26
Posts: 310
Website

Re: /opt symlinked to /usr/opt

OMFG I'm gonna be attacked if I have a huge root partition!
/me runs for guns!

Man if you using arch for security get openbsd or something! Arch has up-to-date packages which is more of a security risk than have a 20GB root dir, in my case 30GB. (I wanted 15GB  for arch and 15GB for arch64, but forgot to split them when I reinstalled arch the other day). I haven't had any hacking tempts yet and like I said I've always had big root dirs. If this is a server go get another os / distro.


"The only thing we have to fear is fear itself." - Franklin D. Roosevelt

Offline

#20 2006-05-04 23:02:05

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: /opt symlinked to /usr/opt

pixel wrote:
iphitus wrote:

Have you got any practical reason for splitting everything to it's own partition? or only purely philosophical reasons?

I already named some of them. They are mainly concerned with security and ease of backup in mind.

Security: So that's one reason for splitting /var off, in multi user type systems. Not the average home system as most commonly used here. Not a reason to split off /opt or /usr either.

Backup: it makes no difference to rsync/backup /opt whether it's a seperate filesystem or not. Unless you reboot your system to unmount /usr and /opt and then backup the partition.

Maybe that's just me but for me / partition which is bigger than 128mb is definetly too bloated.

No idea what that means. bloated means nothing.

It is always nice to mark a distinctive line between essential base system (/) from userspace third-party applications (/usr) and other varying files (/var) especially in multi-user environment

Personal preference smile That's cool then.

James

Offline

#21 2006-05-05 02:47:22

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,730
Website

Re: /opt symlinked to /usr/opt

In my experience in the Unix/Linux world the philosophies around HDD partitioning are as varied as the people opining on them :-)
I started with Red Hat and I had everything under "one roof" on /
After I moved to Slackware and just for kicks I divided into /, /home and that was OK too. Awhile later I began to create my partitions similar to this format:

/dev/hda1              3.1G   1.5G   1.6G  50% /
/dev/hda3              5.1G   1.2G   3.9G  24% /opt
/dev/hda5              5.1G   1.2G   3.9G  24% /usr
/dev/hda6               18G   1.8G    16G  11% /home
/dev/hda7              9.5G   5.5G   4.1G  58% /hip
/dev/hdb1               21G   1.9G    19G  10% /data1

and that is what I have ever since till this day, even in Arch.

I must say that the only practical advantage that I find to this format is that if I ever have to "blow away" everything ( and I had in two occasions ) my /home directory and /data1 (all my data files including e-mail ) and /hip (a VMWare section) remain intact after I re-install.
As per /opt and /usr I noticed, in Slack at least, that over time they tend to grow so I made them "big" so I do not have to worry about them.

Is this the "best" way of doing things? I do not think so ... but it does work for me.

To me partitioning is like dating ... you gotta go with whatever makes you feel comfortable.

Offline

#22 2006-05-05 14:40:45

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: /opt symlinked to /usr/opt

I have a massive root, a /home, a swap, a /boot, and a windowz.

I agree that with a multi-user system having multiple mount-points is useful.  But only if that is due to multiple drives.  And at that point, why the heck aren't you running RAID-6?  (Yes, I said 6 and not 5).

Unlike /home, /usr as a seperate partition makes no sense to me.  Everything under /usr for me is under package management.  Thus, it's backed up as long as I have an internet connection and a bootable arch cd with pacman on it.  /usr/local could be on it's own partition if you really want, but if you have important data there, it should be backed up as well.

/var makes sense _possibly_ if you are running a mail server and want the mail under a different set of drives, so you can have those on crazy mail backup, but the fear of crashing your system because of a full drive?  I don't know if systems actually crash because they can't recieve mail.  I think they just error out.  I've maxed out my drive several times.  Nothing crashed.  Everything just said "No disk space".

I guess my point is that I don't understand why people seem to think that multiple partitions are protecting their data.  Get a decent backup scheme going, run crazy RAID, or put / in svn :twisted:   If your one drive fails, it doesn't matter if you have 1 or 100 partitions, the entire drive failed.  If you have to blow away part of your system... why don't you just backup your data then instead of having pointless partitions?

The only big positive here that I can see is data quota.  Keeping certain folders in check.  But at that point, you should be using *drumroll please* QUOTAS!  Partitions aren't the "Unix" way of doing this either, they are a pointless shortcut that only complicates your system.

Offline

#23 2007-04-11 01:57:45

mightymaan
Member
Registered: 2007-04-11
Posts: 8

Re: /opt symlinked to /usr/opt

This is my fstab on my main workstation:
#
# /etc/fstab: static file system information
#
# <file>        <dir>         <type>    <options>                <dump> <pass>
none                   /dev/pts      devpts    defaults                   0  0
none                   /dev/shm      tmpfs     defaults                   0  0
tmpfs                  /tmp          tmpfs     defaults,noatime,nodev,nosuid,noexec 0 0

/dev/cdrom             /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
#/dev/dvd              /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/fd0               /mnt/fl   vfat      user,noauto,sync        0      0

/dev/hda7 swap swap defaults 0 0
/dev/hda5 / ext3 defaults,noatime 0 1
/dev/hda6 /boot ext2 defaults,noatime,nodev,nosuid,noexec,ro 0 1
/dev/hda8 /var ext3 defaults,noatime,nodev,nosuid 0 1
/dev/hda9 /usr ext3 defaults,noatime,nodev 0 1
/dev/hda10 /home ext3 defaults,noatime,nodev,nosuid 0 1
/dev/hda11 /data ext3 defaults,noatime,nodev,nosuid,noexec 0 1
# /dev/hda12 /backup ext3 defaults,noatime 0 1
/dev/hdd1 /data2 ext3 defaults,noatime,nodev,nosuid,noexec 0 1

#end of file

Well I was thinking I would want /usr and possibly /home out on the raid. But when I do this with /usr (test case not really on a raid yet) Arch does not function properly. It's like it needs stuff from /usr during the rc.xxx scripts both starting up AND shutting down. I cant figure it out and I can't figure out how to just put the whole shebang on software raid. I gather thats not possible cuz the kernel and initrd.img files have to load from somewhere.
Dunno if I even should be asking this in this thread

Offline

#24 2007-04-11 02:34:46

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,730
Website

Re: /opt symlinked to /usr/opt

This thread is funny... partitioning is almost like religion in the Unix world. Don't go there lol
I have done over the years all the "politically" and "philosophically" correct partitioning and at the end I found that it is just a matter of opinion.
I have not been able to find more speed, reliability, stability or any thing with any one of the variations tested over the years.
Now a days I have :

/dev/sda2              73G   12G   58G  18% /
none                  502M     0  502M   0% /dev/shm
/dev/sdb1             9.2G  1.5G  7.3G  18% /home
/dev/sdb2              19G  4.1G   14G  24% /data1
/dev/sdb3             3.5G  1.3G  2.1G  39% /vrm

where home is a separate partition (as you can see) so if I have ever to re-install it is a breeze, data1 is my backups and /vm is my virtual machine.

This is the Alvez-*nix approach and works just fine for me smile or in other words:
my religion my rules cool

Offline

Board footer

Powered by FluxBB