Ask / Submit

Is it possible to move /home to SD?

asked 2015-05-09 18:53:49 +0300

breiti_oi gravatar image

Hi everyone,

i want to move my /home directory to my 64gb btrfs formatted sd card, but i can't figure out how to umount the /home directory to be able to set an symlink to the sd card. probably the recovery mode is the solution, but how?

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted

answered 2015-05-09 19:53:40 +0300

juiceme gravatar image

updated 2015-05-09 19:56:08 +0300

Just edit your /etc/fstab to fix /home to point to your sd card. Or, edit your home location in /etc/passwd.

Either should work; no repair mode needed, just normal drvice boot.

edit flag offensive delete publish link more


Did you try that? According to #60941 it seems to be not so easy.

femtopeta ( 2015-05-11 11:30:45 +0300 )edit

Yes, it worked for me. I did not try to change the mountpoint but I added a new one for my home. I guess the problem you describe was related to something else?

juiceme ( 2015-05-11 13:30:00 +0300 )edit

Your solution sounds good! In #60941 the are mounting /data/media from sdcard. SInce /data/media/Android/ seems to be same as /home/nemo/android_storage/Android/ it should work your way, too, but I didn't dive into it too much as of yet..

Would you mind posting your steps and the contents of your fstab here? Does Backup > Copy to SD Card work?

femtopeta ( 2015-05-11 15:46:33 +0300 )edit

Here you are;

[nemo@Jolla ~]$ 
[nemo@Jolla ~]$ mount | grep home
/dev/mmcblk1p1 on /home type btrfs (rw,noatime,ssd,noacl,space_cache)
[nemo@Jolla ~]$ 
[nemo@Jolla ~]$ cat /etc/fstab 
UUID=0f8a2490-53ed-4ff6-ba34-b81df3430387  /  btrfs  defaults,autodefrag,noatime 0 0
#UUID=0f8a2490-53ed-4ff6-ba34-b81df3430387  /home  btrfs  noatime,subvol=@home 0 0
/dev/mmcblk1p1 /home  btrfs  noatime 0 0
devpts     /dev/pts  devpts  gid=5,mode=620   0 0
tmpfs      /dev/shm  tmpfs   defaults         0 0
proc       /proc     proc    defaults         0 0
sysfs      /sys      sysfs   defaults         0 0
[nemo@Jolla ~]$ 
[nemo@Jolla ~]$ 
[nemo@Jolla ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 14G  4.5G  8.4G  36% /
/dev/mmcblk0p28        14G  4.5G  8.4G  36% /
devtmpfs              404M   64K  404M   1% /dev
tmpfs                 405M   80K  405M   1% /dev/shm
tmpfs                 405M  2.3M  403M   1% /run
tmpfs                 405M     0  405M   0% /sys/fs/cgroup
tmpfs                 405M  8.0K  405M   1% /tmp
/dev/mmcblk0p18        64M   45M   20M  70% /firmware
/dev/mmcblk0p19       7.9M  4.1M  3.9M  52% /drm
/dev/mmcblk0p25       7.9M  4.2M  3.8M  53% /persist
/dev/mmcblk1p1         15G   12G  3.4G  77% /home
/dev/mmcblk0p9         48M   11M   37M  23% /var/systemlog
tmpfs                 405M     0  405M   0% /mnt/asec
tmpfs                 405M     0  405M   0% /mnt/obb
[nemo@Jolla ~]$

As for "Backup > Copy to SD Card", I have no idea, have not tested that since I backup my device by cron&rsync every night to external server... :)

juiceme ( 2015-05-11 16:59:04 +0300 )edit

well, if you use an directory on the sdcard for home, it should work. (/media/sdcard/..../home/ for example) maybe juiceme also got an idea how to realize that? ;)

breiti_oi ( 2015-05-11 19:27:50 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2015-05-09 18:53:49 +0300

Seen: 691 times

Last updated: May 09 '15