1

I want to divide my user files like Music, Documents and the others from my application settings and config files (all the hidden folders in home) and put the settings and configs on my system SSD, while my user files remain on my bigger HDD.

What mount point should I use to achieve that? Or is there any other way to get this done?

edwinksl
  • 23,789
JPS
  • 119

1 Answers1

1

You will need 2 partitions (plus swap partition on your HDD - why?).

  • HDD:

    Make an ext4 formatted partition and use it as directory root (mount point /). This will contain all stuff that is not outsourced to another partition, including /home.

  • SSD:

    Make a partition formatted in ext4 (recommended if your data shall only be readably by Linux systems on the same computer), NTFS (if you want to share the partition with Windows systems) or FAT32 (best compatibility with all systems, but severe restrictions like max. 4GB per file) and use it as external data partition with a custom mount point (e.g. /data would be a suitable mount point). On this partition, you can create all folders you need, like Documents, Pictures, Videos and so on.

After having set up the partitions, move all your already existing data files from the current data folders in /home/USERNAME to the respective folder in /data. Then delete the folders in your home directory which you want to replace.

Now you make a symbolic link in your home directory to each folder in /data, e.g. using a command like this (replacing the folder names with your correct values):

ln -s /data/Documents ~/Documents

After this, all your data folders that were originally located in your home directory are now just symlinks to the real folders on your secondary partition on the HDD which you have mounted at /data.

Byte Commander
  • 107,489
  • I would keep / (root) & /home on SSD as those are the files you want read quickly and are used the most. Then link data from a /mnt/data partition on the HDD. http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu And: http://askubuntu.com/questions/461394/how-to-partition-ssdhdd I also use gpt whether BIOS or UEFI, it just each requires an additional partition. – oldfred Sep 12 '16 at 00:04
  • What are you trying to achieve by separating your application settings and config files from your music/pictures/documents folders? I don't understand. Normally it's pretty simple with a SSD root, and a HDD for /home and /swap. Please tell us. Cheers, Al – heynnema Sep 12 '16 at 03:20
  • 1
    Settings & configs are on faster drive. They are used more than the actual data. And then /home is tiny, so easy to fully backup /home. But I still backup /mnt/data. Also I have multiple installs of various flavors or versions of Ubuntu. And I can link data into everyone, but have different configurations in /home without conflicts. – oldfred Sep 12 '16 at 04:05
  • @heynnema: it's like oldfred said. the settings and config folders (including Thunderbird Mail folders...) are more used, especially when starting an App. While my data is only accessed when directly opening a file. – JPS Sep 13 '16 at 10:39
  • @Byte Commander: That is exactly the contrary of what i want to achieve. I want my / and my config and settings folders out of my /home/user to sit on the SSD and all my personal files should be on the HDD in /home/user – JPS Sep 13 '16 at 10:41
  • does Linux not have a special mount point to "automatically" seperate configs and settings from user data? something like /data or /userdata and then /home/user for Documents, Music, etc... – JPS Sep 13 '16 at 10:44
  • @JPS No, this is exactly what you asked for, just implemented the other way round. You put / (which includes /home with all contained config folders) on the SSD and put your user data (Pictures, Videos, Downloads etc.) on the HDD. Then you make links from the Pictures/Videos/Downloads/etc folders in your home directory to the ones in your data partition, so that it looks like a normal setup with all data in /home. – Byte Commander Sep 13 '16 at 12:16
  • The big problem with separating configs/settings from your data files is when you backup /home (you do backup, yes?), it won't include the configs/settings... where your mail is, etc. For the nano second that you think you're gonna save, I still say put all of /home and /swap on the HDD, and be done with it. Cheers, Al – heynnema Sep 13 '16 at 15:54
  • @heynnema: i think it should not be a problem to tell duplicity to backup the seperated config folders. – JPS Sep 15 '16 at 20:15
  • @ByteCommander: i have to think that over when i do have the time for it... – JPS Sep 15 '16 at 20:16