4

I am installing a fresh Ubuntu 15.10 on my laptop after erasing my hard disk completely. Now, what I am interested to know is whether it is good to have a separate data partition along with separate home partition. I checked Internet to get the answer but I am still not convinced on what should I do. One Internet site I read is this.

I want to completely secure my data like docs, music, videos, photos etc. I may go for fresh installations of newer versions and also I may later install another Linux operating system which may use the same data.

While surfing Net to get the solution, I got a view that yes, separate data partition is good along with separate home partition. This view says that my data like photos, videos, etc. will be completely safe in the data partition and the application settings will be there in home partitions. If my application settings get corrupted or if I want to upgrade/reinstall my OS, my data partition will be untouched. I liked this.

Another view says that home partition is meant to keep user's data there. So, making separate partition for data signifies reinventing the wheel.

Please suggest me how to go ahead with my Ubuntu 15.10 installation, shall I keep both data and home partitions or only the later one is enough.

  • 1
    If by "data" you mean multimedia files and such as I understand, I'd say /home on a separate partition is enough. Please refer to wiki.archlinux.org/index.php/Partitioning#Partition_scheme . – schaiba Nov 17 '15 at 9:26
  • @schaiba thanks a lot for the link. After going through that page, I am confirmed and satisfied what space is required to be allocated to different partitions. – Ravi Nov 17 '15 at 11:18
10

In broader terms, in a corporate environment, is mandatory to have at least the OS partition (or /), /var, and /home separated.

The advantage is that having a separate / you do not often damage important data by mistake, and system upgrades are done more at ease ; and having a separate /var partition guarantees that if by chance some logs start running wildly the system does not stop having the root (/) full.

At home, depending or your needs, I would say that a different / and /home partitions should be more than enough. However, in bigger disks, I often create an extra /opt or /data partition, being /home where I work, and /opt for binaries that do not come with the system, and /home for working and developing stuff.

At the end of the day, at home, it is a matter of personal taste.

  • Yes that's what I wanted. I would like to have /, /var and /home. I have a total of 120 gigs of hard disk space. I would use, say 80 gigs for this new installation and keep the rest for future installations of other Linux OS. Now, please suggest me how much size to be allocated to these 3 partitions. Will 20 gigs, 55 gigs and 5 gigs be O.K. for /, /home and /var respectively? Another Q is: can you please elaborate more on /opt? Does this directory includes installations that the user does on his own? If so then I can include /opt partition also, thereby the space for / can be reduced to 10 gig – Ravi Nov 17 '15 at 10:49
  • /opt is more for professional users/developers at the end of the day, so leave it at /. The sizes seem fine by me. I usually go by 5-10GB in / but I am very spartan and do not install a lot of stuff. – Rui F Ribeiro Nov 17 '15 at 10:51
  • I install lots of apps, few for my kid also for playing. Very soon, my / partition crosses 10 gigs. I need more / space. So I was interested to know about /opt. Also I would like to add that I am a developer who is practicing a few programming languages like shell, perl, C etc. – Ravi Nov 17 '15 at 10:56
  • It really depend on your needs. If you want to have a dev space in /home, and a production space in /opt, go ahead. Maybe 2-5GB in size. – Rui F Ribeiro Nov 17 '15 at 11:01
3

Separate partitions are to a great extent arbitrary as I'm sure you're finding through your reading. You may have certain goals or use-cases which make one partition scheme more desirable than the other. For example, web-servers may have a separate partition for /var/log so that log data can't fill the /var partition and impede programs that need to create files in /var. You appear to want to secure your /home and data.

Unfortunately I'm not sure what you mean by a data partition in this instance. Using a separate /home partition, however, is almost always desirable on a personal desktop. It allows you to destroy your operating system without interfering with your personal files. This vastly increases your flexibility:

  • You can change OS at your leisure. In a normal installation your /home partition doesn't need to be touched.
  • You can upgrade/restore your OS without interfering with the /home partition.

Regarding securing your data, let's interpret that as data-persistence and data-access:

  1. Encrypt your /home partition. This is probably the biggest security advantage of having a distinct partition.
  2. Backup your /home partition onto a separate disk, possibly even to a remote site.
  • It's worth noting that there are non-partition-based ways to encrypt one's home, such as ecryptfs, a stacked filesystem driver. I use this on both of my Linux machines. It saves me from having to decide on/reinstall using a full-disk scheme and hasn't had any detrimental effects on performance that I've noticed (though on one machine, the HD might be bottlenecking that). – underscore_d Nov 17 '15 at 12:07
1

Having separate partitions have both advantages and disadvantages.

The obvious advantage of having separate partitions is isolation. If your system crashes while intensively processing data, there are chances the filesystem gets corrupted. Now, if you keep your data in a separate partition, the / filesystem will most probably survive even a severe crash, enabling you to boot and fix the mess without a live CD.

The same goes for backups. If you have a separate /home partition, you can back up and restore your personal files quite easily.

The downside of such separation is the free space repartition, which needs to be thought of well in advance. If you run out of space on /, having plenty of free space on /home won't help, and you'll have to repartition your disk to be able to install more stuff on /

  • Not so sure about a separate /etc partition ... – schaiba Nov 17 '15 at 13:22
  • Yep, on a second thought I'll remove this from my answer. – Dmitry Grigoryev Nov 17 '15 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.