You are not logged in.

#1 2009-08-26 16:58:39

absolutevoid
Member
From: Keralam, India
Registered: 2009-08-12
Posts: 78
Website

a perfect partition scheme

I got a vague idea that KDE and OOo would generally be installed in /opt directory. So isn't it worth to create a separate /opt partition? Or is the Arch way, any different? In the proposed partition candidates list in beginners guide, I didn't see a mention about /opt. That is why, I am asking this particular question.

Here is a partition scheme, I have planned for use in friends laptop. Please do advice me, if I should make any changes. The basic premises are (1) he too is a n00b like me, (2) The hard disk is of 149 GB, (3) Its having X86_64 architecture (4) He is online, most of the time and installs lots of s/w and downloads lot of films via torrent (5) System dual boots with Windows XP (6) System has 1 GB RAM. 


Hard disk    |    Partition       |     File system     |  size

Primary Partitions:

/dev/sda1   C:/Windows             NTFS                30 GB
/dev/sda2   /boot                       ext2                 128 MB
/dev/sda3   Extented Partition                            rest
/dev/sda4   E:/                          FAT32              27 GB

Logical Partitions:

/dev/sda5       D:/                        NTFS               29 GB
/dev/sda6       swap                     SWAP              1 GB
/dev/sda7       /                           ext3                1 GB
/dev/sda8       /usr                       xfs                  10 GB
/dev/sda9       /var                      reiserfs             7 GB
/dev/sda10      /opt                      xfs                   2 GB
/dev/sda11      /tmp                     jfs                    2 GB
/dev/sda12      /home                  ext4                  40 GB

The logic I have applied behind such a partitioning scheme is this: Windows XP is already on his system and the installation drive uses almost 25 GB of space including the XP's files and all other program files. So the partition has 30 GB of space. As Windows cannot read/write ext4, but linux can read/write windows file systems, I have to allocate a 29 GB NTFS and 27 GB VFAT drives where the current files of that particular person resides. So that leaves behind the remaining space for Arch.

An equal amount of RAM size is allocated for swap. As major directories that usually reside in / are given separate partitions, thought to give / only 1 GB of space which I think is adequate. Though 32 MB is ample for boot, I have just given 128 MB for that at the maximum. As he tends to install lot of s/w, a 10 GB /usr partition is allocated with xfs as file system as it will likely have a very large number of big files. As ABS resides in /var and to save pacman cache and log files, a 7 GB partition in reiserfs is allocated. Though I am not sure, whether to include a separate /opt partition, supposing KDE and OO.o reside there, am giving 2 GB for opt. Thinking the files are of huge size, again xfs is used. I am not well aware of the need and nature of a tmp directory. But as the tutorial says that some programs may create lots of tmp files, a max of 2 GB is allocated under jfs. All the available space is now pooled to /home directory that uses ext4 FS.

Also, is there any problem in creating a seperate /etc partition for all the configuration files to reside? Beginners guide stand against it, but various available 3rd party recommendations point to the use of /etc as a different partition.


Everything void is absolute and everything absolute is void.

Offline

#2 2009-08-26 17:08:29

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: a perfect partition scheme

I have a separate /usr partition. What I did was create a directory /usr/opt and hard-link /opt to it. That way I only need a single partition for both /usr and /opt. (Or maybe I mount -o bind /usr/opt /opt, I forget right now.)

I don't think it's going to be easy to have /etc as a separate partition. Think about it: during boot-up, at first only your root partition will be available. The init script needs to read /etc/fstab to figure out what other partitions to mount. But if /etc is on another partition, and isn't yet mounted...?

You could perhaps work around this by hacking your init script, but why? And if you're a newbie, it's not something you want to get involved in. Basically, you want all of these on your root partition:
/
/lib
/bin
/sbin
/root
/etc
mountpoints for everything else (/proc, /sys, /tmp, /var, /usr, /home, /mnt, /media...am I leaving anything out?)

Offline

#3 2009-08-26 17:15:04

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: a perfect partition scheme

use LVM.  then you can slowly increase the size of the filesystems as you need it.
also, use dm_crypt. it's good for securing your data.  No 'plausible deniability' though.
Personally, I also keep as little partitions as needed. it keeps things simple.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#4 2009-08-26 20:36:42

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: a perfect partition scheme

Mine's a simple laptop. I have vista 64 bit business ntfs on sda1 (40GB), a spare partition on sda2 currently an arch/awesome multimedia system and puppy linux frugal mode (5GB). I hardly ever use vista and don't need vista to see any other partitions.

So, my entire day-to-day arch setup is a 10GB sda3 (70% full) and a 60GB encrypted /home under which I have multimedia, music, photos directories and a swap file as well as my user directory.

/dev/sda3            /              ext4      defaults,noatime 0 1
/dev/mapper/home     /home          ext4      defaults,noatime 0 0
/home/swapfile       swap           swap      defaults 0 0

In well over 10 years I've never wished I'd set up seperate /var etc, but if you feel the need then use LVM.

Last edited by vacant (2009-08-26 20:40:14)

Offline

#5 2009-08-26 21:10:35

deej
Member
Registered: 2008-02-08
Posts: 395

Re: a perfect partition scheme

I used to spend a lot of time experimenting with partition schemes... and do you know what I do
now ? Bang everything in / !

sda1 /                         ext4
sda2 /backups            ext4
sda3 /swap

That's it. No boot [ I'm using sata II drive ]; no /home; no /opt, no /var. And I can't tell the difference !
People will say have a /home partition... ' just in case you need to re-install'. Bah ! If you need to
re-install, anything important you have in /home can be backed-up to /backups and off you go. Not
recommended for a server, but for a home desktop... no problem.

Deej

Last edited by deej (2009-08-26 21:11:16)

Offline

#6 2009-08-26 21:54:24

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: a perfect partition scheme

absolutevoid wrote:

Here is a partition scheme, I have planned for use in friends laptop. Please do advice me, if I should make any changes.

Wow that's one complex setup...I prefer to keep things simple (simple == easy to maintain and understand):

/dev/sda1            Acer Recovery (came with the system)
/dev/sda2            Windows XP      NTFS  (10GB)
/dev/sda3            swap            swap   (2GB)
/dev/sda4            /               ext3   (the rest @ 140GB)

Also, to others who just keep /home on a separate partition, it isn't going to help when the HDD dies...back up to an external HDD and be done with it.

Micromanaging partitions is often overhyped in terms of performance and even more often leads to capacity issues down the road.

Last edited by thayer (2009-08-26 21:56:18)


thayer williams ~ cinderwick.ca

Offline

#7 2009-08-26 22:33:20

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: a perfect partition scheme

I prefer something simpler too, though I put /home in a separate partition for ease of upgrading, and /tmp and /var in separate partitions to limit the potential damage if an application decides to fill one or the other with toot:

Device        MiB  
/dev/sda1      63  ext2  /boot      (Arch)
/dev/sda2   16387  ext4  /          (Xubuntu - backup distro)
/dev/sda3   32766  ext4  /          (Arch)
/dev/sda4  561264  Extended
/dev/sda5   20482  ext4  /tmp       (Arch)
/dev/sda6   20482  ext4  /var       (Arch)
/dev/sda7   40963  ext4  /home      (Shared Arch/Xubuntu - separate user accounts for each)
/dev/sda8  462952  ext4  /mnt/extra (Shared Arch/Xubuntu - multimedia files etc. go here)
/dev/sda9   16387  swap  swap       (Shared Arch/Xubuntu)

Offline

#8 2009-08-26 22:37:17

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: a perfect partition scheme

thayer wrote:

Micromanaging partitions is often overhyped in terms of performance and even more often leads to capacity issues down the road.

What about for security purposes?

Offline

#9 2009-08-26 22:46:24

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: a perfect partition scheme

I'm with Acecero, granted one can have a perfectly workable system with only one or two partitions, and granted that you're going to have capacity issues unless you start out using LVM, it's still useful to be able to isolate which partitions are allowed to have executable files on them and which not, to put a cap on how big /tmp can grow to, and so on. This isn't overhyping.

I'll also concede, though, that beginners may be pushed too quickly into more complicated multi-partition schemes than they really need (or are ready to take proper advantage of).

Offline

#10 2009-08-27 07:35:29

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: a perfect partition scheme

thayer wrote:

Micromanaging partitions is often overhyped in terms of performance and even more often leads to capacity issues down the road.

+1

Someone once said that  there should be a forums rule for anyone that says perfect and best should change the topic.  Anyways, I have to agree basic works good for me as I've found it difficult to judge just how partitions are going to expand.  For servers I can see the reason for this though Profjim's point about an allowable executable partition does conjure thoughts (though I have no idea how to do this and wonder if your system wouldn't be just as vulnerable with an executable /home and /usr partition).


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#11 2009-08-27 08:04:18

absolutevoid
Member
From: Keralam, India
Registered: 2009-08-12
Posts: 78
Website

Re: a perfect partition scheme

Thanks for all the input. I would love to study more about LVM and dm_crypt. From what I read about it, I haven't matured enough to pick up a broad idea. Is LVM an extended partition that can be subdivided as logical partitions and can dm_crypt be applied on any chosen file system?

Last edited by absolutevoid (2009-08-27 08:05:52)


Everything void is absolute and everything absolute is void.

Offline

#12 2009-08-27 09:12:46

deej
Member
Registered: 2008-02-08
Posts: 395

Re: a perfect partition scheme

absolutevoid wrote:

Thanks for all the input. I would love to study more about LVM and dm_crypt. From what I read about it, I haven't matured enough to pick up a broad idea. Is LVM an extended partition that can be subdivided as logical partitions and can dm_crypt be applied on any chosen file system?

This should get you started:

http://tldp.org/HOWTO/LVM-HOWTO/

...I'd leave it for a long, cold winters night smile

Deej

Offline

#13 2009-08-27 10:18:55

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: a perfect partition scheme

I vote for keeping things simple. For desktop purpose, I usually set the following seperate partitions :

/boot
/
/home
swap

For server purposes, I also set a dedicated /var partition.

I never noticed any benefits in having more partitions than that


what goes up must come down

Offline

#14 2009-08-27 13:31:06

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: a perfect partition scheme

thayer wrote:

Also, to others who just keep /home on a separate partition, it isn't going to help when the HDD dies...back up to an external HDD and be done with it.

If you want /home swapped out because you fear the HD might be crashing or dieing, then it should go on a separate disk, not a separate partition. /home on a separate partition is nice when you need/want to do reinstalls.

Micromanaging partitions is often overhyped in terms of performance and even more often leads to capacity issues down the road.

Spot on.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#15 2009-08-27 14:05:10

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: a perfect partition scheme

deej wrote:

I used to spend a lot of time experimenting with partition schemes... and do you know what I do
now ? Bang everything in / !

sda1 /                         ext4
sda2 /backups            ext4
sda3 /swap

That's it. No boot [ I'm using sata II drive ]; no /home; no /opt, no /var. And I can't tell the difference !
People will say have a /home partition... ' just in case you need to re-install'. Bah ! If you need to
re-install, anything important you have in /home can be backed-up to /backups and off you go. Not
recommended for a server, but for a home desktop... no problem.

Deej

backup is backup: in other words, same disk backup makes no sense at all and by definiton is not a backup
also not sure what SATA II has to do with having or not /boot

my /boot partition is not even mounted (SATA II)
/dev/sda1 /boot ext2 acl,noatime,noexec,noauto,user_xattr 0 0

Also, to others who just keep /home on a separate partition, it isn't going to help when the HDD dies...back up to an external HDD and be done with it.

again backup is backup, has nothing to do with keeping stuff on separate disk external or internal, does not matter. It should be OS independent, either full or incremental or differential. If system fails, one should be able to restore it in full to the same state as at the last backup point. gzipping /directory tree/files and keeping them on separate disk is not real backup if you really want to be so strict about it.

The whole point of keeping separate /home is that I can without much effort wipe out my current OS and install another one log in and have old configs and docs ready. This has nothing to do with backups

Offline

#16 2009-08-27 14:37:27

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: a perfect partition scheme

broch wrote:

The whole point of keeping separate /home is that I can without much effort wipe out my current OS and install another one log in and have old configs and docs ready.

Yeah, that's quite funny. Actually I tried that once and it was a total urban myth. Example: You can run a distro like Arch with latest KDE, then try to switch to some other "stable" (i.e. not bleeding edge) distro with an older KDE version and take pot luck as to whether your /home config files work or not.

Offline

#17 2009-08-27 15:26:54

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: a perfect partition scheme

vacant wrote:
broch wrote:

The whole point of keeping separate /home is that I can without much effort wipe out my current OS and install another one log in and have old configs and docs ready.

Yeah, that's quite funny. Actually I tried that once and it was a total urban myth. Example: You can run a distro like Arch with latest KDE, then try to switch to some other "stable" (i.e. not bleeding edge) distro with an older KDE version and take pot luck as to whether your /home config files work or not.

shrug
used this when trying different distros (e.g suse, slackware mandrake) between 98' - 02', never had any issues, also in some cases (e.g. suse), it was much better to install new version than do update. Keeping /home with configs always worked. Exceptions were apps installed from sources from obvious reasons.

However this assumes some sanity: installing distro with kde 3.5 on previous installation of distro with kde 4.x will not work. Also installing windows and complaining that kde/gnome user settings are gone is as good as the above.

Last edited by broch (2009-08-27 15:27:36)

Offline

#18 2009-08-28 00:53:58

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: a perfect partition scheme

B wrote:

If you want /home swapped out because you fear the HD might be crashing or dieing, then it should go on a separate disk, not a separate partition. /home on a separate partition is nice when you need/want to do reinstalls.

That does make sense, say if you had a second drive "sdb," you can just put sdb1 with /home and have it as a nice back up just in case sda dies and reinstall Arch again with a new one.

But this is my current partitioning scheme on my thinkpad. It's not too complex.

/dev/sda1            /               ext3      (25GB)
/dev/sda2            /var            reiserfs  (12GB)
/dev/sda3            swap            swap      (3GB)
/dev/sda4            /home           ext3      (the rest @ 120GB)

Offline

#19 2009-08-28 13:20:21

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: a perfect partition scheme

IMO, if the HD capacity is more and PC/Laptop is having enough power go for multi-partitioning (In the long run you have lot of free space in one and space constraint in another if the allocation is not pre-planned well ahead).(or LVM way as Dieter@be said) With multi partitions (9 in one PC wink ) I did not face any performance degradation. The swap partition need not be 2 times of your RAM with the latest PC (at least 1GB RAM) and more swap is needed if a sever is running on the machine.

Offline

#20 2009-08-28 21:57:44

absolutevoid
Member
From: Keralam, India
Registered: 2009-08-12
Posts: 78
Website

Re: a perfect partition scheme

Thank you all for the great support. I have successfully created LVM over dm_crypt and mounted nitpicked partitions. Both Arch Linux Forum and Arch Linux Wiki are awesome.


Everything void is absolute and everything absolute is void.

Offline

#21 2009-08-29 06:11:01

chender
Member
From: Toronto, Canada
Registered: 2008-11-24
Posts: 41
Website

Re: a perfect partition scheme

This is one useful thread for me as another newb who followed default install.  A question ... are there advantages for avoiding fragmentation by keeping root separate?

fyi, this is my default install on Thinkpad X60s 100G drive.
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              20G  2.9G   16G  16% /
none                  1.5G  152K  1.5G   1% /dev
none                  1.5G     0  1.5G   0% /dev/shm
/dev/sda4              70G   21G   46G  32% /home
/dev/sda1             130M   13M  110M  11% /boot


--
thinkpad X60s [t400s coming soon] | archlinux i686 | xmonad | dmenu |

Offline

#22 2009-08-29 10:40:33

maturin
Member
Registered: 2009-08-27
Posts: 9

Re: a perfect partition scheme

Another noob, another question: in cfdisk, does "beginning of free space" mean the outer tracks (where read/write is faster)?  I'd like /boot and swap on the outside for speed.  thanks anybody.

Offline

#23 2009-08-29 10:45:10

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: a perfect partition scheme

maturin wrote:

Another noob, another question: in cfdisk, does "beginning of free space" mean the outer tracks (where read/write is faster)?  I'd like /boot and swap on the outside for speed.  thanks anybody.

Most hard disk vendors start numbering from the outer tracks (the faster region) yes.  But this is not a must.  If you want to be sure, try the zcav tool from bonnie++


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#24 2009-08-29 11:04:43

maturin
Member
Registered: 2009-08-27
Posts: 9

Re: a perfect partition scheme

Thanks, Dieter@be.  Would that numbering convention be true for a hard drive made in 2000? Otherwise I guess i'd need a live cd with bonnie++ installed?

Offline

#25 2009-08-29 11:14:46

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: a perfect partition scheme

maturin wrote:

Thanks, Dieter@be.  Would that numbering convention be true for a hard drive made in 2000? Otherwise I guess i'd need a live cd with bonnie++ installed?

It's vendor dependent.  Personally I have no idea which brands or types adhere to which convention.  AFAIK most do the "low region = outer tracks" thing, so if you want to guess, guess on that.
You can boot (for example) the Arch live cd and install bonnie++ in the live environment (it's in extra).


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB