![]() |
2014-01-26
, 15:19
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#42
|
(edit: replace $MY_MOUNTPOINT above by $MNT if you want the SD-card mounted the very same way a FAT-formatted card would - I am using a different mount point)
![]() |
2014-01-26
, 17:00
|
Posts: 284 |
Thanked: 661 times |
Joined on Aug 2013
@ Finland
|
#43
|
![]() |
2014-01-27
, 03:26
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#44
|
![]() |
2014-01-27
, 13:36
|
Posts: 594 |
Thanked: 1,094 times |
Joined on Aug 2012
@ Rhine
|
#45
|
The Following User Says Thank You to Leinad For This Useful Post: | ||
![]() |
2014-02-01
, 10:05
|
Posts: 24 |
Thanked: 7 times |
Joined on Nov 2011
|
#46
|
![]() |
2014-02-01
, 13:21
|
Posts: 594 |
Thanked: 1,094 times |
Joined on Aug 2012
@ Rhine
|
#47
|
@Leinad hi, your solution of mounting /home/ entirely on the sdcard seems quite desirable to me... Do you have any feedback on this? Any problem? Does it work well with latest OS upgrade?
![]() |
2014-02-01
, 14:01
|
Posts: 284 |
Thanked: 661 times |
Joined on Aug 2013
@ Finland
|
#48
|
@Thoke: that's really sad. i always took the sdcard out of the phone and reformated with gparted on pc to avoid something like this.
![]() |
2014-02-01
, 14:20
|
Posts: 594 |
Thanked: 1,094 times |
Joined on Aug 2012
@ Rhine
|
#49
|
The Following User Says Thank You to Leinad For This Useful Post: | ||
![]() |
2014-02-01
, 16:24
|
Posts: 539 |
Thanked: 518 times |
Joined on May 2010
@ nanaurbusiness
|
#50
|
On topic, while I researched about btrfs, wouldn't this be possible:
First change the mount-sd.sh as said here
Then create btrfs subvolume(s), for example music:
btrfs subvolume create /user/100000/media/sdcard/Music
#!/bin/bash SDCARD=/mnt/sdcard DEF_UID=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2) DEF_GID=$(grep "^GID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2) DEVICEUSER=$(getent passwd $DEF_UID | sed 's/:.*//') MNT=/run/user/$DEF_UID/media/sdcard if [ "$ACTION" = "add" ]; then if [ -b /dev/mmcblk1p1 ]; then ln -sf /dev/mmcblk1p1 $SDCARD elif [ -b /dev/mmcblk1 ]; then ln -sf /dev/mmcblk1 $SDCARD else exit $? fi su $DEVICEUSER -c "mkdir -p $MNT" mount $SDCARD $MNT -o uid=$DEF_UID,gid=$DEF_GID || mount -o subvol=sdcard,compress /dev/mmcblk1 /home/nemo/sdcard/ mount -o subvol=Videos /dev/mmcblk1 /home/nemo/Videos/ mount -o subvol=Desktop /dev/mmcblk1 /home/nemo/Desktop/ mount -o subvol=Documents /dev/mmcblk1 /home/nemo/Documents/ mount -o subvol=Downloads /dev/mmcblk1 /home/nemo/Downloads/ mount -o subvol=Music /dev/mmcblk1 /home/nemo/Music/ mount -o subvol=Pictures /dev/mmcblk1 /home/nemo/Pictures/ mount -o subvol=Public /dev/mmcblk1 /home/nemo/Public/ mount -o subvol=Templates /dev/mmcblk1 /home/nemo/Templates/ mount -o subvol=.android /dev/mmcblk1 /data/sdcard/ else umount $SDCARD if [ $? = 0 ]; then rm -f $SDCARD else umount -l $MNT rm -f $SDCARD fi fi
/dev/mmcblk1 on /home/nemo/Public type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Templates type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /data/sdcard type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/sdcard type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Videos type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Desktop type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Documents type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Downloads type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Music type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache) /dev/mmcblk1 on /home/nemo/Pictures type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Public /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Templates /dev/mmcblk1 60G 3.0G 53G 6% /data/sdcard /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/sdcard /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Videos /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Desktop /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Documents /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Downloads /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Music /dev/mmcblk1 60G 3.0G 53G 6% /home/nemo/Pictures
mount -o subvol=sdcard,compress /dev/mmcblk1 /home/nemo/sdcard/ mount -o subvol=.android /dev/mmcblk1 /data/sdcard/
now, if someone know how to lauch script we the other half is installed or removed, that would be great.
i want to mount/unmout my sdcard with that method