Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to move /home to a usb HDD
#1
Hey guys. I am loving OAP and excited to finally find something that will speed up my build of a computer for my 2005 Dodge Ram truck. OAP is going to save me months of trying to do it myself!

After installing OAP on my rpi4B, with the raspberry pi 7" monitor, I tried to download and untar a very large file of maps from openstreetmaps.org - about 15GB to use with Navit. Couldn't get it to unpack, due to the 4GB restriction on a FAT32 SD card. As I got ready to move the file to my 250GB 2.5" HDD, which is attached via USB3 to the rpi4, I decided it might be a good idea to move the entire /home directory to the HDD, so as to minimize the data transfers on the SD card and hopefully keep me from losing too much if the SD card were to fail. I have read about this working on raspberry pi and some people move their entire root directory to the HDD or SSD to get faster transfer rates and better reliability.

However, after two unsuccessful tries, it just isn't working. All seems right, fstab configured, etc, but when I reboot, it won't come back up. All I can figure is there must be something in OAP that keeps it from working.

Here's what I did (HDD is /dev/sda1):
- Formatted the HDD ext4 one partition for the entire drive.
- Created a temp directory: /media/tmp, and mounted /dev/sda1 to it
- Copied everything under /home to the tmp directory
- Unmounted /dev/sda1 and deleted the tmp directory
- mv -rp /home  /home_old
- mkdir /home
- edited fstab to add: /dev/sda1  /home  ext4  default,noatime  0  0
- mount /dev/sda1 /home and checked to make sure all the appropriate directories were there
 - lsblk showed it mounted as /home

It all looked good, but when I rebooted, it wouldn't come back up. Nothing on the screen, won't ssh. I've had to reflash the OAP image on my sd card twice now to get it back up. 

Incidentally, I noticed that when I initially booted up the system, the USB HDD automatically mounted under /media/pi. So I have a directory /media/pi/ and also /home/pi/Media. Is there a reason for that? Seems confusing.

Any idea why this isn't working or how I can make it work?
Reply
#2
(08-05-2019, 06:17 AM)tthenrie Wrote: Hey guys. I am loving OAP and excited to finally find something that will speed up my build of a computer for my 2005 Dodge Ram truck. OAP is going to save me months of trying to do it myself!

After installing OAP on my rpi4B, with the raspberry pi 7" monitor, I tried to download and untar a very large file of maps from openstreetmaps.org - about 15GB to use with Navit. Couldn't get it to unpack, due to the 4GB restriction on a FAT32 SD card. As I got ready to move the file to my 250GB 2.5" HDD, which is attached via USB3 to the rpi4, I decided it might be a good idea to move the entire /home directory to the HDD, so as to minimize the data transfers on the SD card and hopefully keep me from losing too much if the SD card were to fail. I have read about this working on raspberry pi and some people move their entire root directory to the HDD or SSD to get faster transfer rates and better reliability.

However, after two unsuccessful tries, it just isn't working. All seems right, fstab configured, etc, but when I reboot, it won't come back up. All I can figure is there must be something in OAP that keeps it from working.

Here's what I did (HDD is /dev/sda1):
- Formatted the HDD ext4 one partition for the entire drive.
- Created a temp directory: /media/tmp, and mounted /dev/sda1 to it
- Copied everything under /home to the tmp directory
- Unmounted /dev/sda1 and deleted the tmp directory
- mv -rp /home  /home_old
- mkdir /home
- edited fstab to add: /dev/sda1  /home  ext4  default,noatime  0  0
- mount /dev/sda1 /home and checked to make sure all the appropriate directories were there
 - lsblk showed it mounted as /home

It all looked good, but when I rebooted, it wouldn't come back up. Nothing on the screen, won't ssh. I've had to reflash the OAP image on my sd card twice now to get it back up. 

Incidentally, I noticed that when I initially booted up the system, the USB HDD automatically mounted under /media/pi. So I have a directory /media/pi/ and also /home/pi/Media. Is there a reason for that? Seems confusing.

Any idea why this isn't working or how I can make it work?


Try these instructions, worked for me: http://www.kupply.com/move-your-raspberry-pi-system-to-usb-in-10-steps/
Long story short, you must also specify the root PARTID in /boot/config.txt



http://www.kupply.com/move-your-raspberr...-10-steps/
Reply
#3
I appreciate your frustration,  moving things around have unexpected consequences.  I am working with a project that involves audio and eventually streaming video.  Needed a large storage drive and because of space decided to use it to boot as well.  I am enclosing a link to a video that will help you to boot from an SSD while maintaining the file system and organization.  The video is for the standard raspian image but you can use the OAP image.  The only thing i would like to warn you about is that the data partition will most likely need to be expanded to the full size available after you first boot up from the SSD.  That being said be sure to have gparted on the drive.  His explanation of the install and the modification of the cache is also very good.  Hope this helps.

https://youtu.be/iqiPPiPTQ5o
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)