[Solved] How to move a large directory from "/home" to "/"

Discussions about using Linux guests in VirtualBox.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

OK so now we have a clue as to the issue. I bet your guest is formatted in LVM which limits several folders to a certain small size. You should be able to see this with df -h in a terminal. If that is the case you need to use the LVM to adjust the size of the partition if you really want to move the folder from home to "/" root. I still don't think that is a good idea but it is your machine after all. This still is a guest issue I am afraid and not a VirtualBox one but at least now you know what it is and what you need to do.

Here is a link to Oracle help on how to adjust this https://oracle-base.com/articles/linux/ ... management
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

Thanks Perry, I'll work on that over the next couple days.
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

Solved.

Perry, you were right. It was an Oracle Linux 6.8 (guest) issue all along. It was the Oracle Linux 6.8 installer which created the 70G in the "/home" dir location (automatically, without telling me) rather than attached to the "/" dir where I needed it (for naming purposes).

Unfortunately, the solution did require creation of a new guest, because there's no way to shrink the "/home" dir after moving the data to "/". So, I created the new guest, sized the 1st disk for OS only (20G) then added a 2nd disk for my 70G data. Then after the guest LInux was created, I created a new dir in "/" and mounted the 70G disk to it using gparted (rather than Linux "Disk Utility" which is weak in this area). Having the 70G in an external disk also makes it easier for backup/restore I think, plus it can be unmounted which adds protection against system crashes.

Similarly, to get more swap space (50G), I created a 3rd hard disk in VirtualBox, then used gparted to make it a swap disk, then did the "swapon" inside Linux.
Post Reply