Linux best practices disk partitioning

Linux Mint Forums

Forum rules
Please do not post support questions here. Before you post please read the forum rules. Topics in this forum are automatically closed 6 months after creation.

mike acker Level 7
Posts: 1517 Joined: Wed Jul 31, 2013 6:29 pm Location: Kalamazoo, MI

Disk Partitions — Best Practice ?

Post by mike acker » Thu Feb 11, 2016 6:48 pm

any suggestions for a Best Practice for Disk Partitions?

should there be 1 Primary partition with 3 extended partitions?
1 — /
2 — /home
and
3 — /swap

evidently about 30 GB is enough for 1 and 3;
2 could be whatever — let’s say we split up a 1TB drive — make /home = 400 GB,—

this would leave space for a second primary partition — which could be 500 GB for a Windows install

there seem to be as many views on this as there are essays so I was hoping we have a recomendation for a Best Practice to get started on

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Fred Barclay Level 12
Posts: 4185 Joined: Sat Sep 13, 2014 11:12 am Location: USA primarily

Re: Disk Partitions — Best Practice ?

Post by Fred Barclay » Thu Feb 11, 2016 7:38 pm

That looks pretty good to me.

My setup:
24 GB /
84 GB /home
5 GB swap

/ and swap add up to 29 GB; just 1 GB short of your value.

I use GPT so extended/logical partitions are not a worry for me, but considering your scenario, keeping Mint inside an extended partition makes sense. That is—your disk used the MBR scheme, right?

Image

«Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy.»
— Albert Einstein

austin.texas Level 20
Posts: 12003 Joined: Tue Nov 17, 2009 3:57 pm Location: at /home

Re: Disk Partitions — Best Practice ?

Post by austin.texas » Thu Feb 11, 2016 8:19 pm

mike acker wrote: any suggestions for a Best Practice for Disk Partitions?

should there be 1 Primary partition with 3 extended partitions?

First, you can only have 1 extended partition (containing multiple logical partitions). There is no such thing as «3 extended partitions».
Next, «Best Practice» would be NO extended or logical partitions. I don’t have any extended partitions, and never have had.
An extended partition is a work-around construct which is more fragile than a primary partition. If any of your logical partitions are corrupted, you lose all of them. That is not true of primary partitions.

Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

Читайте также:  Astra linux samba настроить

Pierre Level 21
Posts: 12958 Joined: Fri Sep 05, 2008 5:33 am Location: Perth, AU.

Re: Disk Partitions — Best Practice ?

Post by Pierre » Fri Feb 12, 2016 3:18 am

under win-xp — you could do the whole lot with just primary partitions,
but with win-7 — that sometimes wants a boot partition as well,
and that now needs Five partitions — unless you don’t use a separate /home — that is.

the actual size(s) does really depend on the size of your HDD.
but — above mentioned size is quite reasonable.

my HDDs traditionally are quite small, and so are usually sized at about half of those mentioned.

Image

Please edit your original post title to include [SOLVED] — when your problem is solved!
and DO LOOK at those Unanswered Topics — — you may be able to answer some!.

BigEasy Level 6
Posts: 1281 Joined: Mon Nov 24, 2014 9:17 am Location: Chrząszczyżewoszyce, powiat Łękołody

Re: Disk Partitions — Best Practice ?

Post by BigEasy » Fri Feb 12, 2016 3:32 am

Best practice? It is very personal. I always have just one partition. See no reason for me to have seperately /, home, swap.

Pjotr Level 23
Posts: 19040 Joined: Mon Mar 07, 2011 10:18 am Location: The Netherlands (Holland) 🇳🇱 Contact:

Re: Disk Partitions — Best Practice ?

Post by Pjotr » Fri Feb 12, 2016 5:40 am

Opinions differ and will continue to differ. I hereby predict that no consensus will be reached on a «best practice».

My take: just two partitions. One for root and one for swap. Root preferably on a primary partition; only on a logical one when unavoidable.

1. I consider a separate /home to be an unnecessary complication, because you need *external* backups of your documents anyway. Granted, it makes re-installing a bit easier, but how often do you have to re-install?
Furthermore, a separate /home causes less than optimal disk space allocation, which is especially annoying on small drives.

2. In my opinion a separate swap partition is needed because a. I think it’s useful when my system can swap under extreme duress and b. I don’t want the junk in the swap polluting my root partition (so I don’t want the swap to be a file on my root partition, like in Windows).

Tip: 10 things to do after installing Linux Mint 21.2 Victoria
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

BigEasy Level 6
Posts: 1281 Joined: Mon Nov 24, 2014 9:17 am Location: Chrząszczyżewoszyce, powiat Łękołody

Re: Disk Partitions — Best Practice ?

Post by BigEasy » Fri Feb 12, 2016 6:09 am

Moem Level 22
Posts: 15620 Joined: Tue Nov 17, 2015 9:14 am Location: The Netherlands Contact:

Re: Disk Partitions — Best Practice ?

Post by Moem » Fri Feb 12, 2016 6:31 am

Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

Читайте также:  Linux sort ip address

mike acker Level 7
Posts: 1517 Joined: Wed Jul 31, 2013 6:29 pm Location: Kalamazoo, MI

Re: Disk Partitions — Best Practice ?

Post by mike acker » Fri Feb 12, 2016 7:42 am

thanks for all the notes and input guys!

failing a «Best Practice» perhaps a Beginners’ Recommendation could be possible ?

the reason I ask is: when my Win7 box died I replaced the Hard Drive with a 1TB WD and installed a fresh copy of LMDE(2),— hoping to run Epson Perfection V500 scanner and Canon DPP using WINE . Neither of these worked out . I replaced the LMDE(2) with a regular dist. of MINT 17.3 — and, using WINE plus the PlayonLinux WINE-front end — I got closer — but no Cigar . My guess the usual trouble — a non supported Window call.

My last effort then was to install a Win8.1 OEM — and of course this reformatted the disk as NTFS . the Win8.1 OEM failed as I couldn’t get the proper support for the monitor installed . I had started with an HP 1440×900 which my wife discarded — and which works perfect in Linux — but the Win8.1 OEM did not offer the 1440×900 resolution as an option . So,— I went and bought a nice Samsung 1920×1080 monitor — which is basically the standard monitor these days — and the Win8.1 OEM didn’t offer that resolution for that monitor either. A messed up match on resolution would be totally unacceptable for the Canon DPP application,—

probably I should not have bought the OEM dist. dunno but this whole Win mess feels a lot like throwing good money after bad.

so, I went back to re-install LMDE(2)

however: the LMDE(2) installer doesn’t partition the disk automatically like the std. dist. does and left me looking at the partition screen feeling pretty dumb ( and needing to learn how to partition a disk )

I’ve since re-loaded the main Dist. of MINT 17.3 — which is running great — but leaves me with a bad feeling about Windows apps,—

I now have one Windows system running — my wife’s Win7 — and — the MSFT/maintenace process could knock that one out — just as it did mine . which would leave one critical program,— that being Turbotax.

I’ll try Turbotax under WINE today. If that works I think I can live with work-arounds on the other two .

Источник

Best Disk Partitioning Scheme for a Linux-based Developer Machine

Is there some kind of «best disk partitioning scheme» for a Linux-based web and application developer machine, in terms of performance, organization or others?

5 Answers 5

Partitioning doesn’t affect performance so much, but yes, file systems and their configuration affect performance. Look at this benchmark. For a little information about mounting options, see fstab at the ArchWili; especially look at atime options.

Partitioning has nothing with organization files in Linux, because in Linux everything is mounted into one tree.

I recommend one partition for the root filesystem, / , and separate partitions for folders where you place your work and personal data: /home and /var/www if you put your websites here, because if you change distro you will no need to do backup.

Читайте также:  Настройка сервера vpn linux

You may make partitions/disks based on files organization and their importance.

For example, you have got projects and documents which are very precious, then you can have them on RAID-ed disks. Also you may have remote disk mounted with ssh/ftp.

/ -> SSD disk, partition 1 /home -> SSD disk, partition 2 /tmp -> tmpfs /media/data -> RAID-ed disk, partition 2 (ie. shared photos with family) user mounts: /home/miroslav/secure -> RAID-ed disk, partition 1 (encrypted) /home/miroslav/remote -> sshfs/curlftpfs 

To mount remote and secure directories you will probably need some script that asks you for password(s).

Directory sym-links pwd=/home/miroslav :

projects -> secure/projects documents -> secure/documents mails-dir -> secure/mails 

On our internal developement virtual machines we use three partitions:

  1. /root partition — housing mostly static operating system stuff
  2. /var partition — for all dynamic data
  3. /home partition — this is where development takes place with the user accounts of the developers

The reason to separate the partitions is to avoid a system halt due to full filesystem. If /home is full — does not matter. No running processes are affected. Delete something, enlarge online and continue.

/ should not change much (the only exception is /tmp — but files there are usually never big).

/var is the place where /var/tmp and all other «live» data resides (including /var/log ). A full /var/log is still the number one reason for system/application failures, so /var has to be big enough and there has to be a warning in time when space is becoming sparse there.

On physical machines, where disk space does not matter that much, we divide up additional «partitions» (mostly LVs), including: /var , /var/tmp , /var/log , /tmp , /boot , . but these are production machines, where uptime matters.

I used to make separate partitions for / , /home , /usr/local and /var , but I always seemed to end up with some sort of interactions across partitions. If I did install a different distro, I would want to have the unused dotfiles removed for simplicity, so I still made a backup and wiped /home .

As for making a /var partition, I made so many sites at school (~100 or so), with such a large variance in sizes between media heavy sites and text only exercises, that it was impossible for me to accurately estimate the amount of space to allocate.

Now, I just have one partition for everything, and I don’t come anywhere near filling it up. Personal media (movies, games, shows) go on an external HD, so that I can take it to a friend’s house. For virtual machines, which have to be virtual appliances in virtualbox if you want to move them, I like to have a dedicated flash drive for each one.

I’ve never seen a HD crash, but if it did, I don’t think it would matter how the physical drive was partitioned; it would just be dead. The riskiest thing I’ve ever done with my HD is resizing partitions, which is no longer necessary.

Источник

Оцените статью
Adblock
detector