LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-10-2014, 04:33 PM   #1
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
[SOLVED] Just out of interest


Can somebody please enlighten me on the benefits of having separate partition for 'everything-under-the-sun', /boot, /home, /var, /tmp, /whatever.
I just don't get it.
Admittedly, I have been a distro-hoe in the past - can you imagine having 3 (or more) different distros on a single disk - and then having several partitions for each distro? Must be a real nightmare!!
I know several people prefer a common /home - eeeek - there is nothing that will bring you more grief than having .config-files clobbering each other - or trying desperately to recover from some quaint settings ... IMHO - dot-files in general should not be assumed to be general/universal - but then, I might well be wrong - in which case, do tell me!

OK - let me tell you what _I_ do (and I do have some experience ...).
My partitions look like this:
Code:
#1: 128MB, ext2, 'grub-partition' (legacy grub to boot all other partitions via chainloader)
#2: common swap partition
#3: 20GB, 1st linux - all including (ie no seperate mountpoint)
#4: extended
#5: 20GB, 2nd linux - all including
#6: 20GB, 3rd linux - all including
.
.
#n: remainder, usually mounted as /work under all linuces ...
For each 'user' under the different linuces, I link Documents, Downloads,Music,Pictures,Public,Templates,Videos to the same directories under /work/users/ or /work/<username>/ (generally, there is only 'myself' as a user anyway)

Unless you are a fanatic and want to shave as many secs as you can from booting and running - heck, what is it that most people do? They write letters, email, connect to the internet, whatever, ... so what does it matter if it takes some msecs more or less? Usually, your 'limit' or constraints will be your internet connection - and that doesn't worry about msecs ...

Here's a li'l example of one of my 'menu.lst' on the first partition:
Code:
default 0
timeout 10
title [sda3]: slackware-14.1
  root (hd0,2)
  chainloader +1
title [sda5]: slackware-14.0
  root (hd0,4)
  chainloader +1
title [sda6]: solydx
  root (hd0,5)
  chainloader +1
title [sda7]: centos-6.4
  root (hd0,6)
  chainloader +1
ie for every distro I try/use, I install the boot-loader on the first sector of the root filesystem - that way I don't have to worry about the all-encompassing grub2 that wants to be on the 'mbr'. If I can't install to the root filesystem - I'm not interested - its not worth my while.

So - this is _my_ way of being a distro-hoe - and it works perfectly for _me_. I would still like to know what others think, what I can do to improve upon it, etc etc

Thank yall for reading this!

(edit)
Guess I should mark this as 'solved' - but plueeeze to feel free to post as much as you want - I'll still be reading it! ;-)

Last edited by perbh; 03-11-2014 at 11:07 AM.
 
Old 03-10-2014, 04:59 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
It gets complicated with more than two distros. When I was distro hopping I didn't use more than two at once, because it got complicated.

You don't have to install a bootloader more than once. You just have to register a new entry with it. So, if you already installed GRUB with one of them, keep it, and just add an entry for your new distro.
 
Old 03-10-2014, 05:06 PM   #3
Mobile1
Member
 
Registered: Jun 2006
Location: Sardis, B.C., Canada
Distribution: Slackware64 15 -current
Posts: 248

Rep: Reputation: 70
I just use three partitions, /home /swap /everything else : ) I prefer to keep /home separate for backup & recover reasons mostly, and I can re-install and upgrade without worry most of the time.
 
1 members found this post helpful.
Old 03-10-2014, 05:35 PM   #4
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
/dev/sda = lilo
/dev/sda1 = swap
/dev/sda3 = root
/dev/sda4 = home

If I ever decide to install another distro I use another harddisk or I resize the partitions. If I am changing distro I just wipe all the configuration files off the home folder to avoid problems.
 
Old 03-10-2014, 05:48 PM   #5
dh2k
Member
 
Registered: Jan 2006
Distribution: Slackware 13.0 (KDE 3.5.10 from 12.2; Xfce 4.6; Fluxbox); Slackware 13.1 (KDE 4.5)
Posts: 211

Rep: Reputation: 52
Quote:
Can somebody please enlighten me on the benefits of having separate partition for 'everything-under-the-sun', /boot, /home, /var, /tmp, /whatever.
I just don't get it.

storage, choice, general-admin and (physical/and-network_local_or_remote) location.
Oh, and control B-)


(edit)
and filesystem/partition type.

(edit)
and filesystem permissions/umasks

(edit)
and 'fsck' against any particular partition.


As ever with *nix, the point to be made is complete and extensive admin and control.


I'd be happy to explain real world examples why one would want the (options of the) above

Last edited by dh2k; 03-10-2014 at 06:56 PM.
 
1 members found this post helpful.
Old 03-10-2014, 07:23 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Code:
darkstar:~: cat /etc/fstab
/dev/mdgroup/swaplv     swap                swap        pri=0     0   0
/dev/mdgroup/rootlv     /                   xfs         defaults  1   1
/dev/md0                /boot               ext2        defaults  0   0
/dev/mdgroup/tmplv      /var/tmp            xfs         defaults  1   2
/dev/mdgroup/qemulv     /spare/1            xfs         defaults  1   2
/dev/mdgroup/archstore  /spare/5            ext3        defaults  1   2
/dev/mdgroup/extraslv   /extras             xfs         defaults  1   2
/dev/mdgroup/home       /home               ext3        defaults  1   2
/dev/mdgroup/varlv      /var                xfs         defaults  1   2
/dev/mdgroup/java       /spare/4            xfs         defaults  1   2
/dev/mdgroup/junk       /spare/6            xfs         defaults  1   2
/dev/mdgroup/xconqlv    /var/mcp            xfs         defaults  1   2
/dev/mdgroup/slaptlv    /var/slapt-get      xfs         defaults  1   2
/dev/mdgroup/newhomelv  /newhome            xfs         defaults  1   2
/dev/mdgroup/newroot    /newroot            xfs         defaults  1   2
/dev/mdgroup/opt        /opt                xfs         defaults  1   2
/dev/mdgroup/newmusiclv /opt/music          xfs         defaults  1   2
/dev/mdgroup/sourcelv   /source             xfs         defaults  1   2
/dev/mdgroup/usr        /usr                xfs         defaults  1   2
/dev/mdgroup/usrlocal   /usr/local          xfs         defaults  1   2
/dev/mdgroup/winimage   /usr/local/winimage ext4        defaults  1   2
/dev/mdgroup/libvirtlv  /var/lib/libvirt    xfs         defaults  1   2
/dev/mdgroup/pgsqllv    /var/lib/pgsql      xfs         defaults  1   2
/dev/mdgroup/mongostore /var/lib/mongodb    xfs         defaults  1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0            
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
tmpfs            /tmp             tmpfs       defaults         0   0
That's the system that I use every day. I used to have several reiserfs partitions, but they were starting to lock up the system at shutdown.

Some of those partitions were left-overs from when I used physical partitions (the /spare/XX crud) that I haven't bothered to align to any type of standard. The /newhome and /newroot crud was from upgrades back in the single-digit Slackware days.

dh2k wrote an excellent set of reasons. I'll add that with logical volumes, you can decide how much room that you want to give anything. (And it's really easy to make those volumes come and go.) That /var/lib/pgsql partition is currently set to 2G. If one of my databases starts to grow beyond the size that I thought it should be, it will not be able to effect the rest of my system. Ditto for the mongoDB that I've got running. Ditto for my virtual machines whose disk images live in /var/lib/libvirt.

My day job is software development and I use this machine for some of that. I find it useful and (frankly) really neat to be able to do this. If you don't have a use for it and find it to be a real PITA, then don't do it.
 
Old 03-10-2014, 08:53 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I commonly use just /, /home, and swap.

Much of the practice of putting other directories, such as /var and /tmp, on separate partitions,dates back to much smaller hard drives and the directories, in fact, could be put on separate physical drives.

This article illustrates some of the reasons for using separate partitions. http://content.hccfl.edu/pollock/aun...rtitioning.htm
 
Old 03-10-2014, 08:59 PM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You really don't need to do segregated file systems anymore. If anything all you need is 3 at least:

/boot
/(root)
swap

Or even just 2:

/(root)
swap

Segregated /boot does come in handy for security purposes if you want to dismount /boot after startup in rc.local to prevent anyone tampering with it. I've often added (for example):

umount -v /dev/sda1

to my rc.local to keep it disabled by default on boot after it's no longer needed and have rc.local write only accessible from the root-admin.

Now granted having a segregated /home is useful if you do a lot of disk quotas and need to have certain space limits for a disk not in the main array. very useful for networking terminals.

This is mine:

Code:
/dev/sda1        /boot            ext4        defaults                1     1
/dev/sda2        /                ext4        defaults,acl,user_xattr 1     2
/dev/sda3        swap             swap        pri=1                   0     0
proc             /proc            proc        nosuid,noexec,nodev     0     0
sysfs            /sys             sysfs       nosuid,noexec,nodev     0     0
devpts           /dev/pts         devpts      gid=5,mode=620          0     0
tmpfs            /run             tmpfs       defaults                0     0
devtmpfs         /dev             devtmpfs    mode=0755,nosuid        0     0

Last edited by ReaperX7; 03-10-2014 at 09:15 PM.
 
Old 03-10-2014, 10:17 PM   #9
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Original Poster
Rep: Reputation: 81
Thank yall (or should that be 'all yall'?) for your input - appreciated!

I still think having all my 'private files'away from /home/<user> has its advantages - and having just the root filesystem - I have been known to have as much as 6 different distros on one disk - the dot-files/directories can be difficult to 'manage' if I use a common /home.
Also, keeping grub(2) (sorry, I'm not using lilo!) on the root-filesystem means I wont have the problem with replacing one distro for another - I _would_ have a problem if my 'current' grub2-distro got replaced with another, or I just decided to leave the space empty (too much of grub2 resides on the root filesystem beside the MBR)
My main disadvantage - I can't play around with the different filesystems to the same extent. Especially if a distro uses grub2 - I'm more or less restricted to ext3/4 since most distros will not allow the use of 'blocklists' for other than ext3/4 (not enough space before the filesystem proper).

Anyways - I'm still thankful for your input!

Last edited by perbh; 03-10-2014 at 10:30 PM.
 
Old 03-10-2014, 10:28 PM   #10
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Ya'll
 
Old 03-10-2014, 10:34 PM   #11
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Original Poster
Rep: Reputation: 81
Quote:
Originally Posted by ReaperX7 View Post
Ya'll
*chuckles* Not being a native, I was always taught that 'yall' is singular and 'all yall' plural ... ;-)

Appearantly, the (more or less) famous: "Once upon a time" has its own TX-twang: "Y'all ain't gonna believe this sh.."

Last edited by perbh; 03-10-2014 at 10:36 PM.
 
Old 03-10-2014, 11:00 PM   #12
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I'm originally from Florida, so I know how Southerns all talk. It sounds weird, but ironically it's a miss-mesh of Irish, English, Welsh, and Scottish all tossed into a blender on puree.

*southern accent mode* We ustacould say anything atall, but everyones gotabe so danged strict widda English language, can't say nuttin' anymore.
 
Old 03-11-2014, 01:08 AM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Y'all didn't mention you'uns.
 
Old 03-11-2014, 04:54 AM   #14
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
Partitioning schemes are rather dependent upon how the system is being used. I can certainly understand using a single partition for each distro if one is running multiple distros. But there are scenarios where the ability to have separate partitions is extremely useful. I generally like to take advantage of this ability by using the following approach.
  • /boot - I sometimes use a small boot partition, but not often. It can simplify things for multi-boot by keeping all the kernels in one place, but I don't often multi-boot except during full upgrades.
  • / - I like to have two partitions available for root, both about 10-15GB in size. This allows me to do full upgrades while retaining the previous version until things are sussed out. I "ping-pong" back and forth between them. For example, if I have 13.37 installed on sda1 then I will install 14.0 sda2; and later I will install 14.1 over sda1.
  • /usr - Having /usr on a separate partition allows my pair of root partitions to be smaller; the root partition only needs to be large enough to hold the initial install, after that is up and running I can move its /usr directory to this dedicated partition (allowing room to install all the third-party packages). If I have more than one disk in the system, I will typically place /usr on a RAID1 to provide a slight increase in access speed. (I also have a laptop where I've placed /usr on an SD card, increase read speeds and freeing up some space on the harddrive.)
  • /home - I have not experienced any major problems with sharing a common /home between different Slackware versions, but if I were to boot a different distro, things would be different.
  • /pub - I have a common pub directory which contains files to be shared across my home network. All users on my network have full permissions to this directory. In the past these would be NFS shares -- mounted on /mnt/hostname -- but I imagine there is a better solution to this (perhaps using unionfs).
  • swap - Not much to say about swap other than I will sometimes make it large enough to serve as my alternate root directory, converting it between the two uses during upgrades.
 
Old 03-11-2014, 05:59 AM   #15
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
My current system has this layout:
Code:
/dev/rootvg/lvroot  /             ext4        defaults         1   1
/dev/rootvg/lvhome  /home         ext4        defaults         1   1
/dev/rootvg/lvvar   /var          ext4        defaults         1   1
/dev/sda1           /maint        ext4        defaults         1   2
/dev/rootvg/lvsrc   /usr/src      ext4        defaults         1   2
/dev/mapper/crypt   /srv/crypt    ext4        defaults         1   2
/dev/rootvg/lvlocal /srv/local    ext4        defaults         1   2
tmpfs               /tmp          tmpfs       defaults         0   0
  • /srv/local contains my non-private data: things like my .flac files and local copies of stuff freely available on the internet.
  • /srv/crypt is luks encrypted and contains my private data (stuff I wouldn't want a burglar to have access to if he broke in and stole my system). I keep nothing 'private' under /home.
  • /usr/src contains a number of git clones I refresh often, which is why I gave it its own filesystem.
  • /maint (I should probably move that to /srv/maint to be consistent/tidy - it's something fairly new that I was trying out to see how well it works) contains my local mirror of slackware, the nvidia-drivers, my local packages built from slackbuilds and a few scripts and other stuff which help to maintain my system.


Spliting off /var, /tmp, /home and /usr/src from the rootfs is to reduce read-write activity to the rootfs. What this means is that the rootfs superblock and filesystem meta-data will be in a consistent state for much more of the time than if it was subject to the constant write activity that the other filesystems can be subject to, which should theoretically reduce the chance of filesystem corruption in the event of a kernel Oops or power-failure.


Other advantages:
  1. Ring-fencing space has already been mentioned.
  2. Catastrophic file system corruption won't take out everything because of the isolation and I don't have to restore everything. Recovery time will be quicker.
  3. Wiping and reinstalling the OS needs no special action to be taken to preserve my data: stored in /home, /srv/local and /srv/crypt.
  4. I can share /srv/local and have access to all my media files and reference data with a linux installed to a spare partition I keep for testing (either other distros or Slackware current).
  5. Should you want to, you can use mount options like nodev, noexec, nosuid to harden security a little - I don't bother on this system, but would on a dedicated server.
  6. You can tune the individual filesystems to make optimum use of the available space (i.e. set an appropriate nbpi value for the average filesize). This can make a huge difference with very large filesystems

There's really no right answer to layout (though IMO there are a few 'wrong' answers ). It's mostly about what you care about, and what works best for you. The above is what works for me, nothing more.

Last edited by GazL; 03-11-2014 at 06:53 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
This may be of interest to UK drivers baldy3105 General 2 01-27-2006 03:44 AM
Out of interest... gwejones Linux - General 1 09-13-2005 03:45 AM
A little story, probably of no interest... Looking_Lost General 21 06-25-2005 03:57 AM
Need to keep interest in linux mikeymorgan Linux - Newbie 18 03-27-2005 07:38 PM
Some Questions that are of Interest? richhoward Linux - General 1 06-10-2003 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration