Jump to content
zogthegreat

How to add second internal hard drive and mount it under home

6 posts in this topic

Recommended Posts

Hi everyone!

 

So I'm setting up my Dell Precision M4800 for a friend to borrow until he can afford a MacBook Pro. I did explain to him that there really isn't much of difference between a Hackintosh and a MacBook Pro other than about $2000 USD, but he's a Mac fanboy, so....

 

I have OS X Mojave installed on a 256gb Samsung mSATA SSD and I want to add a 1TB SATA HDD and mount it under the home directory. Under Linux, this is a fairly simple thing to do under fstab, but Google as I might, I can't find instructions on how to do this.

 

Does anyone have any suggestions?

 

Thanks!

 

zog

 

(Moderators, please feel free to move this thread if I posted it in the wrong category. Thanks!)

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)

The 1TB SATA HDD will auto-mount as a separate drive in macOS. If you want to make it appear under the home directory (but I can't see the reason for this), just create a link there.

Edited by Hervé

Share this post


Link to post
Share on other sites

Salut Hervé,

 

Usually, under (Linux), I install my OS on a small SSD and then mount my regular large SATA HDD under /home/zog. This enables me to work out of my /home directory with out have to remember to link files or to save to the HDD as opposed to the OS drive.

 

Do you have any links on how to link the data drive to the /home directory?

 

Thanks!

 

zog

 

Share this post


Link to post
Share on other sites
Posted (edited)

:lol: :D :w00t: Well it should basically be the same as in Unix/Linux: create a symbolic link with link or ln command.

 

For instance:

cd $home
ln -s /Volumes/<drive name> <link name>

will create a symbolic link (or shortcut) under your home folder towards mounted separate disk/volume. That's all there is to it really...

 

Here's a practical example on my Vostro200 desktop fitted with a Kingtson SSD for macOS and a Seagate mechanical HDD for Windows:

Vostro200_Disks.jpg.e3273966bf9cd16f8e9010e86679ef25.jpg

 

Vostro200_symbolic_link.jpg.894a1b38eebcb21be9f46d77a2c7e2d0.jpg

 

Vostro200_linked_HDD.jpg.230e669552b554bbc951c640b1f4632c.jpg

 

But that's the complicated way for people who think and operate the Unix/Linux way... :hysterical:

 

The (easy and normal) Apple-thinking way is to simply drag the icon of your 1TB HDD to your home folder where macOS will create the shortcut for you; you may then rename that shortcut to whatever you wish... :thumbsup_anim: :whistle:

 

... :o :shock: :blush:... yeah... I know...

 

Edited by Hervé

Share this post


Link to post
Share on other sites

Thanks Hervé, however, this simply creates a dynamic link to the drive. I'm trying to do something different.

 

When you mount a second drive as home under Linux, all of your files in your home directory are moved to the second disk so that when you click on your home directory, everything is seamlessly in place, (Desktop, Downloads, Music etc). For example, I have a Linux system with a 60gb SSD for the OS. Checking the free space on the SSD post install gives me this:

 

zog@7720:~$ df -h -t ext4
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        43G  5.9G   35G  15% /
 

By adding a second drive and mounting it under etc/fstab, I get this now:

 

zog@7720:~$ df -h -t ext4
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        43G  5.9G   35G  15% /
/dev/sdb1       916G  272M  870G   1% /home
 

Checking the fstab, I have this:

 

zog@7720:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / 
UUID=96a27fc7-cb00-4514-822b-c05d66ded19b /               ext4    errors=remount-ro 0       1
# /boot/efi 
UUID=CC89-6154  /boot/efi       vfat    umask=0077      0       1
# swap 
UUID=422cf3d4-c1e3-4e28-a2aa-0e28dc958684 none            swap    sw              0       0
# /home 
UUID=bd6cfae9-91a5-4d46-be26-9ccc8843ac14 /home           ext4    defaults        0       2

 

If you look at the pictures that I have attached, you can see that my / directory has 37gb of available space and my /home directory has a total of 933gb of free space. I can now write data to my "new" /home directory seamlessly as if there wasn't a second drive at all.

 

I think that I might have to research on how they do this with BSD and see if there is any work around for what I'm trying to do.

 

zog

 

 

 

screenshot_root.png

screenshot_home.png

Share this post


Link to post
Share on other sites

So I found the answer to my question. It's called a Fusion Drive. It's fairly simple to setup, however, you need to do a clean install to get it to work properly.

 

The best part? You have to use the command line! :thumbsup_anim: No GUI's allowed! :thumbsup_anim:

 

For Mojave and Catalina, you need to remove ApfsDriverLoader-64.efi from /EFI/Clover/drivers64UEFI on your install USB and replace it with apfs.efi. After that, boot with the USB. When you get to the Install OS X screen, go to Utilities in the top bar and select Terminal. Inside of terminal, type the following:

 

diskutil list 

 

Select the drives that you want to use, in my case, it's /dev/disk0 and /dev/disk1. After that, run the following:

 

diskutil coreStorage create mylogicaldrive /dev/disk0 /dev/disk1

 

The "mylogicaldrive" can be any name that you want it to be.

 

Check the output of the command and you will see "Core Storage LVG UUID: 417AD948-EF45-80BD-AB0E98F544C3", (this is the output for my system, be sure to get the proper UUID for your setup).

 

After that, create a logical volume that OS X will recognize as a single drive:

 

diskutil coreStorage createVolume 417AD948-EF45-80BD-AB0E98F544C3 jhfs+ "Mojave" 100%

 

A break down of this is:

 

417AD948-EF45-80BD-AB0E98F544C3  = whatever the output of Core Storage UUID

jhfs+ = Journaled HFS+  I'm not sure if you can use other file systems, I will do a little more research on it.

 

Mojave = what ever you want to name your drive

 

100% = use all available drive space.

 

Close the terminal and click on "Install Mac OS Mojave" to start a normal installation. After the install completes, you will have your Fusion Drive. For example, on my test machine, I have a 60gb SSD and a 500gb HDD. Now, when I check my drive space, they are merged into a single 563gb drive.

 

One must learn to love the terminal and command line!

 

 


 

 

 

Screen Shot 2020-03-29 at 3.46.26 PM.png

Screen Shot 2020-03-29 at 3.47.17 PM.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×