Combining internal and external sdcards as one storage unit? Android LVM?

Search This thread

schnowdapowda

Senior Member
Jun 7, 2010
821
135
Dallas, TX Yaurdme?
Basically what im getting at is would it be possible to combine both storage units to where the os can mount them as one? In traditional Linux I would use LVM2.
 
Last edited:

reinaldistic

Senior Member
May 3, 2011
1,216
217
dude, desktop computers require an entire card in order to do this kind of stuff, it's called raid, and android isn't programmed to support it

Sent from my SPH-L900 using xda app-developers app
 

schnowdapowda

Senior Member
Jun 7, 2010
821
135
Dallas, TX Yaurdme?
That is incorrect. Try looking into what an LVM actually is before attempting to answer. RAID is something completely different.

Edit: not trying to be a **** but your post had a condescending tone to it.
 

aramova

Senior Member
Jun 30, 2011
160
53
Atlanta, GA
schnowdapowda is correct, LVM would be able to do this just fine if Android supported it, but as far as I can tell the Android system doesn't have the kernel modules or systems in place sadly. Otherwise it'd be no problem making a physical volume from the two SD partitions, then a volume group and logical volumes.

One down side is you would run into system overhead while the slower SD card is keeping LVM from writing to faster on-board "SD card" partition space.

I just run the following at boot time, and it swaps the internal and external cards... Note this is with the Perseus kernel.

Code:
busybox mount -o remount,rw /

busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
if busybox mount | busybox grep vold/179:49; then
busybox mount -o bind /data/media /mnt/extSdCard  
fi

I saw this on a website and it works perfectly, just need to verify your dev/block/vold/NNN:NN mount point and make this change after the SDCard is initialized.
 

Tw1sted247

Senior Member
Nov 10, 2012
1,118
957
NorthWest
schnowdapowda is correct, LVM would be able to do this just fine if Android supported it, but as far as I can tell the Android system doesn't have the kernel modules or systems in place sadly. Otherwise it'd be no problem making a physical volume from the two SD partitions, then a volume group and logical volumes.

One down side is you would run into system overhead while the slower SD card is keeping LVM from writing to faster on-board "SD card" partition space.

I just run the following at boot time, and it swaps the internal and external cards... Note this is with the Perseus kernel.

Code:
busybox mount -o remount,rw /

busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
if busybox mount | busybox grep vold/179:49; then
busybox mount -o bind /data/media /mnt/extSdCard  
fi

I saw this on a website and it works perfectly, just need to verify your dev/block/vold/NNN:NN mount point and make this change after the SDCard is initialized.

How well does this work for you? And do you do this at every boot or only when you want to swap? Also when running apps after you swap the two and all of your other apps are already installed on internal then you swap the two, can you still just open the app drawer click and run? Or do they no longer run after the switch.
Also after the switch how does that all work when going into recovery and wiping directory's/folders etc and flashing ROM's what will it wipe since the directories are switched? :confused:
 

schnowdapowda

Senior Member
Jun 7, 2010
821
135
Dallas, TX Yaurdme?
How well does this work for you? And do you do this at every boot or only when you want to swap? Also when running apps after you swap the two and all of your other apps are already installed on internal then you swap the two, can you still just open the app drawer click and run? Or do they no longer run after the switch.
Also after the switch how does that all work when going into recovery and wiping directory's/folders etc and flashing ROM's what will it wipe since the directories are switched? :confused:

Sorry i had forgotten about this thread. This shouldn't effect app storage. Only SD storage and the mock SD storage partition on your internal memory. I believe it might screw up any apps you have installed on your external unless there is some mechanism that changes where the system thinks they're installed. And this wouldn't effect recovery as you cant run that script till startup.

What is the benefit of swapping?

Sent from my SPH-L900 using xda app-developers app

Being able to save stuff automatically to your external without in app configuration.

Anyway.. this isn't what I'm really looking for. As far as I'd be concerned.. the system overhead wouldn't be an issue as I would gladly take a slowdown in read and writes to my storage for the convenience of having it accesible like that. I guess its just a matter of some genius dev compiling LVM into their kernel.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    schnowdapowda is correct, LVM would be able to do this just fine if Android supported it, but as far as I can tell the Android system doesn't have the kernel modules or systems in place sadly. Otherwise it'd be no problem making a physical volume from the two SD partitions, then a volume group and logical volumes.

    One down side is you would run into system overhead while the slower SD card is keeping LVM from writing to faster on-board "SD card" partition space.

    I just run the following at boot time, and it swaps the internal and external cards... Note this is with the Perseus kernel.

    Code:
    busybox mount -o remount,rw /
    
    busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
    if busybox mount | busybox grep vold/179:49; then
    busybox mount -o bind /data/media /mnt/extSdCard  
    fi

    I saw this on a website and it works perfectly, just need to verify your dev/block/vold/NNN:NN mount point and make this change after the SDCard is initialized.