1

I have a very small drive holding my OS. it's built in to my device, so I can't swap it out for a better one.

I would like to do something like use symbolic links, but rather than replacing them, basically merge the two disks, if possible. I've tried using symbolic links and that didn't work at all. is there something similar, but that will treat two directories as the same one?

  • Symbolic links are the way to go here. Why do you say it didn't work at all? – Jos Apr 9 '19 at 21:50
  • because It didn't work for replacing /bin... – AJ Pink Apr 9 '19 at 21:58
  • 1
    Just agreed with the above duplicate with one difference: keep your /boot/ on the tiny internal disk. – Fabby Apr 10 '19 at 11:21
0

From: How to merge multiple hard drives?

Use LVM (Logical Volume Management) on Linux.

You can think of LVM as "dynamic partitions", meaning that you can create/resize/delete LVM "partitions" (they're called "Logical Volumes" in LVM-speak) from the command line while your Linux system is running: no need to reboot the system to make the kernel aware of the newly-created or resized partitions.

First of all you can use fdisk with -l option to get info about your current "Disks", then use it to partition your "Disks" and setting the system type of those partitions to "Linux LVM", after you finish the partitioning of the "Disks", use pvcreate to prepare your new partitions for "LVM".

For more info: https://www.howtoforge.com/linux_lvm

| improve this answer | |
  • LVM is typically set up upon installation. You may want to link an ubuntu wiki article for converting existing system to lvm – Sergiy Kolodyazhnyy Apr 10 '19 at 0:27
  • @SergiyKolodyazhnyy I voted along to close as dup instead... – WinEunuuchs2Unix Apr 10 '19 at 0:41
0

Unless you truly need to treat two directories as the same one (unlikely) there's no need to use symbolic links or even LVM for that matter to accomplish your goals as the `nix filesystem is designed in such a way that any storage device partition can be mounted to any place on the tree. For instance you can mount /dev/sdb1 directly to /home, /boot, /home/Videos or anywhere where you are running out of space.

You will need to move the existing content to the new storage location prior to mounting but other than that it's a snap. I recommend using live media to boot from to perform the move.

Here's a general overview of Linux filesystem (Unix is the same or at least very similar).

Here's some more useful info from the official documentation. It details the steps necessary to move \home to another device or partition. The same approach can be taken for any folder on the tree. Usually what's required is to identify the directory that's hogging the majority of your space , copy it's contents to another more roomy device, and mount that device on the previous location.

If anything about this answer is unclear, please drop me a comment and I'll clarify to the best of my ability.

| improve this answer | |

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