How much space to allocate partitions?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Tom_Accuosti

How much space to allocate partitions?

Post by Tom_Accuosti »

I'm setting up a friend's old Thinkpad with Mint 9 (or maybe 10). I would like to set it up with separate partitions for /root and /home, which would make it easier to save his data and settings should we need to reinstall later on. And since I'm going to be the guy doing the work, should it happen, I want to make it easier on me.

Problem is that the machine only has a 40g hard drive. I know he's not going to be installing all sorts of programs, mainly a browser, some music apps, a DVD player, and OpenOffice. I'm trying to figure out how much space to allocate to /root so I dont' have to resize it in a few months.
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.
Habitual

Re: How much space to allocate partitions?

Post by Habitual »

/ --> 15G
is plenty!
viking777

Re: How much space to allocate partitions?

Post by viking777 »

15G would certainly be plenty, I use 10G including /home. But please note, not including /data. A separate /home will work if you have to REinstall, but it will not work (properly) if you ever want to upgrade. A separate /data (ie with all your data on it and nothing else) will work in both cases. So I would go for a 10G / partition (including /home) and then a 30G /data partition which you mount through fstab after you have installed.
Tom_Accuosti

Re: How much space to allocate partitions?

Post by Tom_Accuosti »

Wait, so what's the difference between /data and /home?
viking777

Re: How much space to allocate partitions?

Post by viking777 »

/data is anything that you have created or downloaded or otherwise made (music, programs, files, letters, anything). A normal /home contains all that + configuration files and folders (they are hidden by default) and they are what screws everything up if you try to upgrade to a new version (because as a general rule running new programs with old config files is a bad idea - it sometimes works, but not always, I have witnessed many people falling foul of this).

So put simply a /data folder doesn't contain any hidden content.
Tom_Accuosti

Re: How much space to allocate partitions?

Post by Tom_Accuosti »

So, does that mean I need to make a third partition? Or are you saying that "/" will contain "/root" and "/home", and that the regular user files (mp3s, etc.) will automatically be stored on /data? And if this is the case, how does the OS know to do this?
viking777

Re: How much space to allocate partitions?

Post by viking777 »

No, only two partitions. / and /data. You ask about mp3's etc. Well what exactly do you mean? Existing mp3's? If so, you move those along with all your other data to the /data partition manually ( it only needs to be done once). If you are talking about a new mp3 such as ones you download, then that data will only go where you tell your browser to put it, so you set the default download directory to /home/username/data and that is where it will go.

Of course you do not have to take notice of anything I say, but if you feel of a mind to do so then I will tell you how I would go about it.

I would always pre partition. So in your case first copy any data that you want to keep somewhere else. Then open gparted and partition the disk into two partitions one 10g one 30g (I will assume that your OS will call these partitions /dev/sda1 and /dev/sda2 but if it decides on something different then alter the following commands accordingly). Install Mint into the 10g partition and make sure it boots. Open /etc/fstab as root and add the following line:

Code: Select all

/dev/sda2 /home/username/data ext4 defaults 0 1

(if you aren't using the ext4 filesystem then you will need to change that accordingly and obviously you substitute your proper username).

Open your /home/username folder and create a new folder called 'data' (without the commas).

Now reboot again and make sure that the data folder is accessible in /home/username.

Finally copy all your data back into the data folder.

Incidentally the default folders that are created in your /home/username folder (like downloads, pictures etc) are best deleted and recreated on the /home/username/data folder (or you could just move them there I suppose).
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: How much space to allocate partitions?

Post by altair4 »

There is another advantage to using viking777's data partition idea.

The advantage of a separate /home partition is that it will save every setting that you ever made for your users.

The disadvantage is that it will save every setting you ever made for your users. Think about why you need to reinstall. Something got discombobulated somewhere and that "somewhere" may be in your /home directory.

I'm not a big fan of separate /home partitions but that's probably because I run with multiple Linux distros on this box and creating several separate home partitions would ultimately cause me to start drinking again :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Fred

Re: How much space to allocate partitions?

Post by Fred »

Tom

These two gentlemen have just given you very good advice. Heed it. :-)

Fred
viking777

Re: How much space to allocate partitions?

Post by viking777 »

HEY!! a Fred post!

Almost as rare as sighting a Siberian Tiger these days :lol:

Keep them coming sport.
mrjoeyman

Re: How much space to allocate partitions?

Post by mrjoeyman »

Incidentally the default folders that are created in your /home/username folder (like downloads, pictures etc) are best deleted and recreated on the /home/username/data folder (or you could just move them there I suppose).
Sooooooo? If I were to set this up like this with the /home/username/data, then when if I were to reinstall all of my data would be still sitting safely in my "data" folder, after the reinstall and first boot up? So when you either delete or move the folders from home to data, what does linux do with anything that it needs to put in the home folder now? Sorry if this sounds confusing.
viking777

Re: How much space to allocate partitions?

Post by viking777 »

then when if I were to reinstall all of my data would be still sitting safely in my "data" folder, after the reinstall and first boot up?
Correct (although you would have to do the fstab entry again before you could see it).
what does linux do with anything that it needs to put in the home folder now?
It continues to put it where it always has in /home/username. That way, as altair4 said, if you 'discombobulation' was caused by the settings in your /home/username folder then your reinstallation will fix it. If you use reinstall with the same /home/username folder the problem will still be there.

I must say though that very many people seem to manage with a separate /home as opposed to /data, though I tried it once and it was a nightmare for me, obviously for altair and fred too. That is why I recommend this way, but "your mileage may vary" as they say :)
mrjoeyman

Re: How much space to allocate partitions?

Post by mrjoeyman »

viking777 wrote:

I must say though that very many people seem to manage with a separate /home as opposed to /data, though I tried it once and it was a nightmare for me, obviously for altair and fred too. That is why I recommend this way, but "your mileage may vary" as they say :)
Well I must be learning something and just didn't know it because I was wondering why upon reinstall how something like this (discombobulation) wouldn't possibly happen. Glad I read this. Next time I install I will add this to my partition scheme, (which I thought I had all figured out :shock: )


Thank You !
Hasheesh786

Re: How much space to allocate partitions?

Post by Hasheesh786 »

quick question, sorry if its stupid. but if the data directory resides within the home directory, then wont you affect everything within the home directory when you delete it or reinstall it? i would think you would seperate the directories to /home and /data, with /data and /home both in "/". Again I am a complete novice and this may not make too much sense.

Thankyou
viking777

Re: How much space to allocate partitions?

Post by viking777 »

I don't use this system so I am not the best person to answer questions on it, anything I say can really only be guesswork.

If you have a separate /data partition, then you are right, that should never be touched during a re-installation and that is certainly the safest way to do things.

If you have a /home/username/data partition, then what happens to the /data part of it depends on what choices you make when you reinstall. If you elect to have the existing /home partition mounted as the new /home and you elect to not have it formatted, then I think the /data part of that partition will be untouched because the installation has no reason to write to that part of the partition.

But as I say I have never tried it myself so I could be wrong.
Aging Technogeek

Re: How much space to allocate partitions?

Post by Aging Technogeek »

Hi, Fred,

Long time, no see. Glad to know you're still vertical.


Back to business.

If it is done properly, the data partition is not part of the OS at all. It is a separate entity that gets mounted in /media at boot. A data partition may be set up at any time, it does not have to be done during installation.

All personal data is kept in the data partition in folders with the same names as those in /home. These folders are tied to your /home folder via symlinks so anything put into, say, /home/username/Pictures, is instantly moved to /media/Data/Pictures. Requests for items from these folders are passed to Data the same way and the requested item is returned to the OS.

To avoid breaking the symlinks, the data partition must be auto-mounted at boot by editing the fstab file.

For a detailed discussion and tutoial on mounting files, folders, and partitions at boot - and creating symlinks to those folders - see this topic

http://forums.linuxmint.com/viewtopic.p ... 93&start=0
remoulder
Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

Re: How much space to allocate partitions?

Post by remoulder »

Hasheesh786 wrote:if the data directory resides within the home directory, then wont you affect everything within the home directory when you delete it or reinstall
Maybe what you and the OP are not understanding is that in a linux system, (almost) all directories can be physically or logically located somewhere else, e.g. on a different partition, a different drive, even a different machine somewhere else. All you need to ensure is that the location can be accessed on boot. The directory is mounted or linked into the directory structure such that it appears and functions as a normal (local) directory. So the data directory would be located somewhere else and deleting or re-installing the base OS would not affect it.
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
Hasheesh786

Re: How much space to allocate partitions?

Post by Hasheesh786 »

Thank you for the replys. I think what confused me, as i am unfamiliar with linux or with the partitioning process in general, is that you can place partitions within partitions. i was viewing the /data partition we were talking about as another directory. how ever it is actually a whole par of the system within itself. would i be correct in saying that, unlike directories, a partition that resides within another partition would not be affected if the partition it resides in changed (re installed or deleted). sorry again if this confuses anyone.

Thankyou
Aging Technogeek

Re: How much space to allocate partitions?

Post by Aging Technogeek »

The data partition does not reside within another partition, it is mounted in the /media folder (or directory, to use Windows terms) so that its contents are available to the Operating System, but physically it is on a separate section of the hard drive (unless the data partition is a logical partition - then it is contained in an extended partition whose only purpose is to contain logical partitions).

Any mass storage device, be it a partition on the same drive, a USB flash drive, or an external hard drive must be mounted within the Operating System for the contents to be available for use, but it is not an integral part of the OS and will not normally be affected by a system crash.
Hasheesh786

Re: How much space to allocate partitions?

Post by Hasheesh786 »

oh thank you so much. i was just reading up and came to the same conclusion.
Locked

Return to “Installation & Boot”