How much space to allocate partitions?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

How much space to allocate partitions?

Postby Tom_Accuosti on Fri Mar 04, 2011 11:54 am

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.
Tom_Accuosti
Level 1
Level 1
 
Posts: 33
Joined: Mon Nov 15, 2010 12:09 pm

Linux Mint is funded by ads and donations.
 

Re: How much space to allocate partitions?

Postby Habitual on Fri Mar 04, 2011 12:01 pm

/ --> 15G
is plenty!
What's a landing but a take off in reverse?
User avatar
Habitual
Level 8
Level 8
 
Posts: 2217
Joined: Sun Nov 21, 2010 8:31 pm
Location: LM17Q-Xfce

Re: How much space to allocate partitions?

Postby viking777 on Fri Mar 04, 2011 12:23 pm

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.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How much space to allocate partitions?

Postby Tom_Accuosti on Fri Mar 04, 2011 1:11 pm

Wait, so what's the difference between /data and /home?
Tom_Accuosti
Level 1
Level 1
 
Posts: 33
Joined: Mon Nov 15, 2010 12:09 pm

Re: How much space to allocate partitions?

Postby viking777 on Fri Mar 04, 2011 1:35 pm

/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.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How much space to allocate partitions?

Postby Tom_Accuosti on Fri Mar 04, 2011 1:50 pm

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?
Tom_Accuosti
Level 1
Level 1
 
Posts: 33
Joined: Mon Nov 15, 2010 12:09 pm

Re: How much space to allocate partitions?

Postby viking777 on Fri Mar 04, 2011 2:20 pm

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).
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How much space to allocate partitions?

Postby altair4 on Fri Mar 04, 2011 3:07 pm

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.
altair4
Level 16
Level 16
 
Posts: 6152
Joined: Tue Feb 03, 2009 10:27 am

Re: How much space to allocate partitions?

Postby Fred on Fri Mar 04, 2011 4:06 pm

Tom

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

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: How much space to allocate partitions?

Postby viking777 on Sat Mar 05, 2011 5:46 am

HEY!! a Fred post!

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

Keep them coming sport.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How much space to allocate partitions?

Postby mrjoeyman on Sat Oct 15, 2011 3:05 am

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.
mrjoeyman
Level 2
Level 2
 
Posts: 90
Joined: Sat Oct 01, 2011 10:17 pm

Re: How much space to allocate partitions?

Postby viking777 on Sat Oct 15, 2011 5:27 am

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 :)
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How much space to allocate partitions?

Postby mrjoeyman on Sat Oct 15, 2011 5:59 am

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 !
mrjoeyman
Level 2
Level 2
 
Posts: 90
Joined: Sat Oct 01, 2011 10:17 pm

Re: How much space to allocate partitions?

Postby Hasheesh786 on Sun Jan 22, 2012 5:10 am

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
Hasheesh786
Level 1
Level 1
 
Posts: 9
Joined: Sat Jan 21, 2012 9:17 pm

Re: How much space to allocate partitions?

Postby viking777 on Sun Jan 22, 2012 8:14 am

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.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How much space to allocate partitions?

Postby Aging Technogeek on Sun Jan 22, 2012 10:15 am

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

viewtopic.php?f=42&t=22093&start=0
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: How much space to allocate partitions?

Postby remoulder on Sun Jan 22, 2012 10:39 am

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.
User avatar
remoulder
Level 17
Level 17
 
Posts: 7667
Joined: Fri May 09, 2008 1:14 pm

Re: How much space to allocate partitions?

Postby Hasheesh786 on Sun Jan 22, 2012 1:02 pm

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
Hasheesh786
Level 1
Level 1
 
Posts: 9
Joined: Sat Jan 21, 2012 9:17 pm

Re: How much space to allocate partitions?

Postby Aging Technogeek on Sun Jan 22, 2012 2:25 pm

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.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: How much space to allocate partitions?

Postby Hasheesh786 on Sun Jan 22, 2012 3:18 pm

oh thank you so much. i was just reading up and came to the same conclusion.
Hasheesh786
Level 1
Level 1
 
Posts: 9
Joined: Sat Jan 21, 2012 9:17 pm

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 11 guests