0

My current laptop is a dual boot and I've installed /root in SSD and /home in HDD. Now, I saw lots of app files in the Ubuntu stored in /home dir (i.e. in my HDD) and when I work my HDD spins a lot, and apps open with a delay so I thought should I also move my /home dir to SSD?

Will it increase my system performance?? If yes, then can I move /home without reinstalling Ubuntu again or there is any other way?

I searched but I did not find any answer related to my problem so if anyone gives an answer on the basis of experience I really appreciate it. Thank you

  • Yes, /home in the faster drive increases performance. – ChanganAuto Jan 05 '22 at 17:09
  • So can I do this only by reinstalling ubuntu or any better way to do this which don't involve reinstalling? Actually, I have installed apps and lots of data in /home dir. – Sarvesh Mishra Jan 05 '22 at 17:15
  • I keep /home inside / (root) but then have all my data on HDD in /mnt/data & folders linked back into /home. Data is not used as often as the user hidden or . folders in /home. Not sure what apps you installed in /home as that is not normal. https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting & https://askubuntu.com/questions/1058756/installing-all-applications-on-a-ssd-disk-and-putting-all-files-on-hdd-disk You can move /home with reverse of this: https://help.ubuntu.com/community/Partitioning/Home/Moving – oldfred Jan 05 '22 at 19:49
  • /root & / are different directories (/root contains the config files for the root user; where as / is the root directory), also you didn't say if it's a desktop or server install; as desktop installs store loads of user config/working files in $HOME (/home/$USER) thus will be reading/accessing that often when a desktop/GUI is being used & apps start; however if you have enough RAM much of it may eventually cache into RAM. – guiverc Jan 05 '22 at 21:20
  • please type lsblk in the console and edit your question with the results. The next person passing this post will better be able to help you, but A: No you do not need to install, it's really easy to move a home directory. B: We're going to need more information about your setup to actually help you, that's going to start with that lsblk, and I'm sure there will be more questions after seeing that. – Dave Jan 06 '22 at 08:31
  • "Will it increase my system performance?" yes but you will not notice it. BUT there is another issue why it is better to keep /home on the system disk: if the hdd breaks your system can not find /home and it does expect to find one. Keep /home on the ssd and it will always find it. – Rinzwind Jan 06 '22 at 08:45

1 Answers1

0

In summary, yes. You will have still better overall performance moving also (part of) your user data to the SSD.

Background

File organisation

Your /home directory contains the user's home directories (folders), which include:

  1. the user's data typically organized in folders like "Documents", "Downloads" etc., and
  2. user configuration data, stored in hidden files and folders, i.e., files and directories with a name starting with a dot ..

Yes, applications may intensively use the user configuration data. For example, a browser will maintain its cache there, an email client will store cached and locally stored mail there.

Performance wise, it is thus preferred to have everything used for your daily work on the SSD. Depending on your available space, move things to a normal HDD in the following priority

  1. Archived data - data you do not need on a daily basis
  2. Archived photos and media: you will essentially have no performance penalty watching pictures or movies, or listening audio stored on a HDD
  3. Your user files and documents (text files, spreadsheets, etc.)
  4. All user data: If you have very little space on the SSD, your current setup is fine.

Moving home or reinstalling

Yes, you can move /home on an existing installation, but it is a bit technical. Read this guide and this question. Make sure you have the minimum skills and, most importantly, a good backup of your user data in case you make a mistake.

A fresh reinstall will, by default, set up a single partition containing both system and user data. On laptops and personal computers, this is probably recommended as a simple approach that avoids needs to repartition later. If you prefer an install with different partitions, you can do so with the option "Something Else" in the installer.

Once everything is installed, Linux makes it very easy to move parts of the data from the SSD to a HDD as needed, without changing your file structure. Symbolic links, or symlinks, are used for that. You replace a folder, e.g. "Videos", by a symlink with the same name that points to a "Videos" folder on the HDD. These links feel and work like a real folder.

vanadium
  • 88,010
  • Yes as you said and I also found, moving is a little bit technical so I decided to make a backup and reinstall that will be easy and safe. Thanks for the answer. – Sarvesh Mishra Jan 06 '22 at 09:42