I have a Raspberry Pi running raspian. I've installed Apache2, PHP & MySQL. Apache & MySQL are both configured to use sub-directories of /var. I'd like to use a directory on my USB HDD instead of my SD card.
I'd also like to move the /home directory to the USB HDD.
I'd like to avoid re-partioning my HDD if possible. I thought maybe I could use a symlink to tell raspian that /var is really at /media/USBHDD1/var and /home is really at /media/USBHDD1/home. I tried it last night but couldn't get it to work.
fstab
. So yourfstab
would look like:/dev/sdX# /home ext4 defaults 0 0
(replace X# with your device id/partition num and defaults with your preferred). That would be automatic each boot.