Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Partitioning scheme

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Fratyr
n00b
n00b
Posts: 66
Joined: Tue Mar 25, 2008 8:41 am

Partitioning scheme

  • Quote

Post by Fratyr » Mon May 31, 2010 5:14 pm

Hello.

I'm trying a new way of partitioning my system. Tired of 3 primary disks.

I want to try and do something like that (separate):
/ - root
/boot
/swap
/var
/opt
/usr
/tmp
/home

All these directories in a separate partition.

Which should stay primary, what should go to extended and be a logical under extended?

Thanks
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Mon May 31, 2010 5:16 pm

linux does not care about primary vs. logical so you can do what ever

may I suggest you use LVM for your partitioning needs, especially if you're planning a lot of partitions, LVM gives you a lot of flexibility and comfort in that it allows you to resize partitions without moving all the other partitions around
Top
Fratyr
n00b
n00b
Posts: 66
Joined: Tue Mar 25, 2008 8:41 am

  • Quote

Post by Fratyr » Mon May 31, 2010 5:21 pm

Many thanks for your help and fast answer. I'll use LVM as you suggested.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Mon May 31, 2010 6:28 pm

btrfs does most of not all of that natively, if you're feeling adventurous.

as an example

(Just to be clear, vda instead of sda has nothing to do with btrfs here; it's a driver thing, because I'm using the virtio block driver under KVM )

Code: Select all

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/vda1               /boot           ext2            noauto,noatime  1 2
/dev/vda3               /               ext3            noatime         0 1
/dev/vda2               none            swap            sw              0 0
/dev/vda4               /tmp            btrfs           subvol=tmp,nodev,noexec,nosuid,noatime  0 2
/dev/vda4               /usr            btrfs           subvol=usr,nodev,noatime,compress  0 2
/dev/vda4               /var            btrfs           subvol=var,noatime 0 2
/dev/vda4               /opt            btrfs           subvol=opt,nosuid,noatime  0 2
/dev/vda4               /home           btrfs           subvol=home,nodev,nosuid,noatime,compress  0 2

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Mon May 31, 2010 6:45 pm

/var/tmp is also nice to have as a seperate partition.

That's where, by default, all your ebuilds are emerged.

Having it on a partition gives you more flexibility, if you wish to play with it down the road.
Top
GWilliam
Guru
Guru
Posts: 350
Joined: Thu Dec 29, 2005 2:11 pm

  • Quote

Post by GWilliam » Tue Jun 01, 2010 3:13 am

#NULL
Last edited by GWilliam on Sun Jul 25, 2010 5:57 pm, edited 1 time in total.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Tue Jun 01, 2010 4:24 am

GWilliam wrote:Does it really matter?

In the 1990s, I used to create separate partitions for /, /boot, /var, /tmp, and /home. On some systems, I put /usr on a separate partition.

For the past decade or so, though, I've been putting the whole system (except for swap, of course) on one big filesystem. I see no reason to bother with separate partitions unless you're in a situation in which inodes are in danger of being used up (if you're running an e-mail server or perhaps an FTP server with a very large number of smallish files).
mount opts. What makes sense for one might not make sense for another. And mounting /tmp as noexec,nosuid is a must IMHO
GWilliam wrote: If you're particularly paranoid, putting /boot on a separate filesystem is arguably a good idea, but other than that, why bother with splitting these things up on separate partitions? With hard disk drive latency, seek times, et cetera being as low as they are these days, why bother unless you have a tremendous amount of churn going on in /var or /tmp?
Disk I/O would not be improved by putting var||tmp on a separate partition. Separate physical volume, yes, separate partition no. There is no advantage to this.

Could end up with disk space gobbled up in the case of a mail routing loop or some such; separate partition avoids this. Could end up with logs that aren't rotated, that you don't catch, and there you are.
And again there's the matter of mount opts.
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
goofus
Apprentice
Apprentice
Posts: 180
Joined: Fri Nov 19, 2004 2:26 pm

  • Quote

Post by goofus » Tue Jun 01, 2010 12:53 pm

GWilliam wrote:Does it really matter?

In the 1990s, I used to create separate partitions for /, /boot, /var, /tmp, and /home. On some systems, I put /usr on a separate partition.

For the past decade or so, though, I've been putting the whole system (except for swap, of course) on one big filesystem. I see no reason to bother with separate partitions unless you're in a situation in which inodes are in danger of being used up (if you're running an e-mail server or perhaps an FTP server with a very large number of smallish files).

If you're particularly paranoid, putting /boot on a separate filesystem is arguably a good idea, but other than that, why bother with splitting these things up on separate partitions? With hard disk drive latency, seek times, et cetera being as low as they are these days, why bother unless you have a tremendous amount of churn going on in /var or /tmp?

Why not just put the whole system on the same partition?
I suggest boot and tmp on separate partitions because of security.

Also having different partitions for directories is good to apply quotas. Having quotas on home is good but you don't need quotas on all directories (like usr, opt, etc..)
Top
depontius
Advocate
Advocate
Posts: 3533
Joined: Wed May 05, 2004 4:06 pm

  • Quote

Post by depontius » Tue Jun 01, 2010 3:04 pm

At a very minimum, I keep /home on a separate partition, so it can survive a complete reinstall.

Of late, I've been using:
/boot
/
/var
/home
<swap>

Then it gets ticklish, because I'm going after "activity-based" partitioning. I try to keep everything that's really active - at least the system-level stuff, on /var. The biggies that aren't there already are /tmp and /usr/portage. So I have for instance /var/roottmp and /var/usrportage, and bind-mount them to /tmp and /usr/portage, respectively. That way, / is read-mostly and /var is heavily read-write. Ext3 can both fragment and defragment through use. My hope has been that this separation would be beneficial.

My other thought has been to move to ext4, and drop back to /boot, /, /home, and <swap>, because I'm under the impression that ext4 should handle such things much better.
.sigs waste space and bandwidth
Top
Post Reply

9 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic