[Q] Messing with /etc/vold.fstab & Software RAID-0 - Atrix 4G Q&A, Help & Troubleshooting

Since day 1 of owning the Atrix, it bothered me that that there were two mount points:
/mnt/sdcard (16GB internal memory)
/mnt/sdcard-ext (32GB micro SD card that I shoved in there)
Why it bothers me:
1) It is the year 2011 -- technology's progressed too far to be doing stupid s$&# like this
2) Most devs have no idea that /mnt/sdcard-ext even exists.
3) When I plug my phone in to my BMW w/ iDrive the internal memory gets presented to the iDrive system, NOT the SD card. Problem is that all of my music is on the SD card, NOT the internal memory.
4) Why can't I have 48GB of contiguous space instead of two separate 16GB and 32GB mount points??!?!
...so, I got fed up and edited /etc/vold.fstab, commented out /mnt/sdcard and renamed /mnt/sdcard-ext to /mnt/sdcard. Oh, and rebooted...
All is fine and dandy now, there's one 32GB /mnt/sdcard and NO 16GB /mnt/anything. The device is still there, just not mounted. So that means that I lost 16GB of usable space. Yes, but that leads me to my work-in-progress project. Somehow I need to port mdadm to the Atrix and setup a RAID-0 with the following devices:
The internal eMMC:
/devices/platform/tegra-sdhci.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p18
The SD card:
/devices/platform/tegra-sdhci.2/mmc_host/mmc2 /devices/platform/tegra-sdhci.2/mmc_host/mmc1
Once the Software RAID-0 is established, it should be as simple as mounting it back to /mnt/sdcard. It's not rocket science, just Linux .
So my question: In the interest of time, has anyone even attempted to do that yet? By the way, Rule #1 if it works: DON'T REMOVE THE SD CARD!

I never thought of that being an issue there but yeah i see your point now. Some car stereo systems do see the external sdcard though; my el-cheapo generic joint from best buy could even use usb hubs, thereby letting me plug in my treo and my usb stick. It would index music from both.
RAID on Android might not be a good thing here though; what happens when the internal sd card and the external card can't be read or written to at the same speed?
Or if somehow the sd card inadvertently comes loose inside the phone? (This happens to me from time to time on my current phone)
Then again, I'm only familiar with the PC / Data center implementation of RAID
Sent from my SBM005SH using XDA App

Does changing default storage in the settings have any effect? I'd laugh if it did
Sent from my Xoom using XDA App

starrwulfe,
yeah, I guess a firmware update to the iDrive *could* in theory fix that issue but I guess they're expecting people to plug in a single USB flash drive to it. Good thing the el-cheapo one is smarter than that
as far as the RAID-0 being different speeds, it shouldn't matter because it's a RAID--0 (spanning). So you might get different speeds depending on which memory device it's being read from/written to but it shouldn't cause any problems. As far as it coming loose inside the phone, what are you doing with your phone that makes that happen? lol Mine's never come out
ChongoDroid,
that would be TOO easy lol...but naw, that's just for windows media sync so you have a choice of which storage location is presented to windows media player..

varandian said:
Since day 1 of owning the Atrix, it bothered me that that there were two mount points:
/mnt/sdcard (16GB internal memory)
/mnt/sdcard-ext (32GB micro SD card that I shoved in there)
Why it bothers me:
1) It is the year 2011 -- technology's progressed too far to be doing stupid s$&# like this
2) Most devs have no idea that /mnt/sdcard-ext even exists.
3) When I plug my phone in to my BMW w/ iDrive the internal memory gets presented to the iDrive system, NOT the SD card. Problem is that all of my music is on the SD card, NOT the internal memory.
4) Why can't I have 48GB of contiguous space instead of two separate 16GB and 32GB mount points??!?!
...so, I got fed up and edited /etc/vold.fstab, commented out /mnt/sdcard and renamed /mnt/sdcard-ext to /mnt/sdcard. Oh, and rebooted...
All is fine and dandy now, there's one 32GB /mnt/sdcard and NO 16GB /mnt/anything. The device is still there, just not mounted. So that means that I lost 16GB of usable space. Yes, but that leads me to my work-in-progress project. Somehow I need to port mdadm to the Atrix and setup a RAID-0 with the following devices:
The internal eMMC:
/devices/platform/tegra-sdhci.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p18
The SD card:
/devices/platform/tegra-sdhci.2/mmc_host/mmc2 /devices/platform/tegra-sdhci.2/mmc_host/mmc1
Once the Software RAID-0 is established, it should be as simple as mounting it back to /mnt/sdcard. It's not rocket science, just Linux .
So my question: In the interest of time, has anyone even attempted to do that yet? By the way, Rule #1 if it works: DON'T REMOVE THE SD CARD!
Click to expand...
Click to collapse
Give me the exact year and model of your Bimmer as well as the exact issue (I assume it's that the i-Drive won't see the external SD in your Atrix), and I will look into it at work. I assume you are connecting it through the USB Aux input. It may be a software issue or it may just be that the i-Drive doesn't do it. I will see if I can find out for sure.
I have the exact same setup on my Atrix (all music on external SD) so I can play with it at work.
I'm not back to work until Friday, but i'll see what I can dig up then.

GibMcFragger,
2008 535i w/ the navigation option. Thanks for offering to look into it but I don't want both of them to show up in the iDrive, I want to have one device show up as 48GB instead of one as 16GB and the other as 32GB.

varandian said:
GibMcFragger,
2008 535i w/ the navigation option. Thanks for offering to look into it but I don't want both of them to show up in the iDrive, I want to have one device show up as 48GB instead of one as 16GB and the other as 32GB.
Click to expand...
Click to collapse
Oh. Do they both show up at the moment in the i-Drive as separate drives, or the external doesn't shop up at all? If they both show up, but as separate drives.........that is normal I think because of the way the phone mounts them as you said earlier.
So basically:
External drive doesn't show AT ALL in the i-Drive = Possible issue
External drive shows but as separate drive than internal in i-Drive = Normal
As for changing them to show as one in RAID, I would think that would cause more issues that it's worth as both the internal and external drives have to be the same speed of card (highly unlikely as we don't know what flash memory Moto used in the phone), as well as the fact that SD cards tend to corrupt data easily.

3) When I plug my phone in to my BMW w/ iDrive the internal memory gets presented to the iDrive system, NOT the SD card. Problem is that all of my music is on the SD card, NOT the internal memory.
Click to expand...
Click to collapse
Not sure what the goal is here, but you could just put a mount of the external sdcard in the internal memory folder, say ln -s /mnt/sdcard-ext /sdcard/Music. Or you could edit vold.conf maybe to change /mnt/sdcard-ext to /mnt/sdcard/Music.
Cheers!

Saw this thread while waiting for the vet and forgot about it. Just came to say, what you're trying to achieve isn't RAID 0, or even RAID at all. It's a spanned volume, which is variously referred to as JBOD or SPAN.
The real question is, does Android support such a thing. Without checking, no way to know. My gut says no, though.

GibMcFragger said:
As for changing them to show as one in RAID, I would think that would cause more issues that it's worth as both the internal and external drives have to be the same speed of card (highly unlikely as we don't know what flash memory Moto used in the phone), as well as the fact that SD cards tend to corrupt data easily.
Click to expand...
Click to collapse
As was stated previously, the speed of the cards doesn't matter. However, it does mean that the phone now requires that specific (external) SD card be inserted at all times, or the filesystem will be considered corrupt, and data will be lost.
To the OP: the issue with the external SD card not being available in the BMW is a problem with how the BMW handles multi-LUN USB storage devices: multiple storage devices available via one single USB connection. GibMcFragger's suggestion is spot on, with checking for available firmware updates.
Though I don't think it's a good idea, you could always look at a UnionFS mount of the external SD card on top of the internal SD card. This allows for the SD card to be backed up and replaced without any trickery.

NFHimself said:
Not sure what the goal is here, but you could just put a mount of the external sdcard in the internal memory folder, say ln -s /mnt/sdcard-ext /sdcard/Music.
Click to expand...
Click to collapse
I tried doing an ln -s /mnt/sdcard-ext /mnt/sdcard/ExternalSD and got the error:
Code:
link failed Operation not permitted
Then I did su (yes, I'm rooted), and then the same command and got the same error. I then tried doing the ln command without the -s (both as su and regular) and got this error:
Code:
link failed Cross-device link
Any ideas?

Also, editing /system/etc/vold.fstab so that internal sd card mounts first and then mount external sdcard on /mnt/sdcard/ExternalSD doesn't work. Loads internal sd just fine though....

quordandis said:
I tried doing an ln -s /mnt/sdcard-ext /mnt/sdcard/ExternalSD and got the error:
Code:
link failed Operation not permitted
Then I did su (yes, I'm rooted), and then the same command and got the same error. I then tried doing the ln command without the -s (both as su and regular) and got this error:
Code:
link failed Cross-device link
Any ideas?
Click to expand...
Click to collapse
ln does a hardlink which is just two metadata references to the same data blocks. It will look like two different files, but the data is stored in just one place on disk. If you delete one, the data stays (for the other ref) and no space is freed. This is not supported across filesystems, only within a single filesystem.
ln -s creates a symbolic link where the link is just a special file that references the real file, not just the data blocks of that file. This works across filesystems, but is filesystem dependent. I'm pretty sure the vfat filesystem that is doubtlessly on your sdcard doesn't support this.
messing with RAID is risky. A previous poster mentioned something like unionFS, but unfortunately what we're talking about here is individual partition exporting via USB, and so filesystem trickery won't cut it. What you probably want to do is just prevent the internal sdcard from being exported and limit that to only the external sdcard. I believe this can be accomplished from within the android GUI, no?

Related

SD Card SNAFU

Situation Normal All F Up...
So it seems my A101 16 - froyo will read just about any SD card in the "removable" slot, but only one card per boot.
Any other card, it doesn't register anything.
I know I swapped out sd's on eclair, but don't recall if I had this problem always with froyo or not.
mounting them through reader works until someone (son) pulls out the reader unceremoniously, then I have to reboot for it to work again.
It seems like it is reading a serial number or something off the sdcard and only acknowledging that one. I also noticed on a couple of boots that it did a quick check of the file system.
Are there unix commands we should be able to use through terminal emulator to manually mount a new sdcard?
It's a bug. Hopefully it will be fixed in the update when it comes out.
Sorry but I don't know of any commands to use with terminal emulator to make something mount.
You can manually mount the external sdcard from terminal emulator:
Code:
su
ls /dev/block/vold (this will list the block devices your tablet is seeing, one of which is your internal sdcard which should already be mounted)
mount /dev/block/vold/179:18 /mnt/storage/sdcard (179:18 was my external sdcard; YMMV)
That will mount it with the default mount options, which apparently the automounter does not use. You could specify all the options on the command line though.
If you cat /proc/partitions after inserting your sdcard, it should show the major:minor numbers for the device and any partitions on it.
I've just tried this one on A70.
I have no-name microSDHC 8GB Class2 (that writes ~6MB/s ) and I've tried to switch to old 2GB microSD Class2 Verbatim.
Second card was not recognized and got stuck in slot when I tried to remove it
Finger nail push later and it was flying across the room
I have no problems with my 8GB card, slides easy in, doesn't fly out of the slot when removing... And they look identical to me ....
. 71 seems to have fixed this. It took me two tries on the first switch, but it does work. Now I just need to put nomedia files on my sdcards.

[Q] SD Card Will not show up on Viewsonic G Tablet

So I recently Romed my Viewsonic G Tablet.
I followed this guide.
http://forum.xda-developers.com/showthread.php?t=865245
Everything is fine..except when I put a SD card into the SD slot the Tablet doesn't recognize it. It just tells the the internal Space not the SD card space.
I used ZPad Clean v3.0 for the ROM and I used cwmod_internal.zip instead of cwmod_microsd.zip
I then used my friend's G Tablet and put the SD card in it..It read it just fine.
So I wanted to test it out while it was rooted. (to double check)
I then Rooted my friends GTablet also. I rooted it the same way but the only change I did was have a SD card in the tablet the whole time. Still the same problem.
Is there any way to fix it? DO i need to use cwmod_microsd.zip....instead of cwmod_internal.zip??
I'm really confused if someone can help me that would be amazing!
Is there an APP that tells you the storage of your installed SD Cards?
Thank you
You mean flashed the rom when you say romed. Have you checked to make sure the sdcard is getting mounted? If there is no data on it you might try reformatting it in either of the g tabs. If you can get to a shell you might reboot, and look at the last 20 lines or so of dmesg. Insert the card and take another look at dmesg and see if the kernel is picking up the insert at all. If so it is likely just a mounting issue.
muqali said:
You mean flashed the rom when you say romed. Have you checked to make sure the sdcard is getting mounted? If there is no data on it you might try reformatting it in either of the g tabs. If you can get to a shell you might reboot, and look at the last 20 lines or so of dmesg. Insert the card and take another look at dmesg and see if the kernel is picking up the insert at all. If so it is likely just a mounting issue.
Click to expand...
Click to collapse
Well I reformatted it and I mounted it. Still nothing..How can I check if the kernel is picking up the SD card at all?
Would changing Kernel's fix the problem? I'm just using the Stock Kernel that the ROM came with.
Thanks
You were able to reformat and mount it via the g tablet with the zpad software on it? And even having done that it doesn't list it as having any free space?
muqali said:
You were able to reformat and mount it via the g tablet with the zpad software on it? And even having done that it doesn't list it as having any free space?
Click to expand...
Click to collapse
Not yet. So should I go to Storage and devices and unmount and format the SD card via the tab?
Try it on the tablet.
If I reformat the SD card wouldn't I loose the root? or no right because I did external
My understanding of root is that it modifies files on your tab/phone, not an external sd card. Worst case you lose root and reroot the device.
muqali said:
Try it on the tablet.
Click to expand...
Click to collapse
steveojp said:
Not yet. So should I go to Storage and devices and unmount and format the SD card via the tab?
Click to expand...
Click to collapse
When I tap click mount it says 11.3 gigs available.
when i unmount it says unavailable.
The card is only 8GB.
It should be internal storage 16GB.
SD card like 8gb.
Not sure what's going on.
If I format I think I'll wipe it all.
Ok, there is an internal 16GB, yes. Of which you have 11GB free. The SD card you're having the issue with is a separate uSD 8GB, right?
I'm meaning for you to try to mount/unmount or possibly format the 8GB SD card. If it isn't showing at all then the issue is something beyond it simply not being mounted.
muqali said:
Ok, there is an internal 16GB, yes. Of which you have 11GB free. The SD card you're having the issue with is a separate uSD 8GB, right?
I'm meaning for you to try to mount/unmount or possibly format the 8GB SD card. If it isn't showing at all then the issue is something beyond it simply not being mounted.
Click to expand...
Click to collapse
Yeah. It's a separate card that I plugged into it.
Was there ever a fix/resolution for this? I am having the same issue.
Everyone,
I've written this a bunch of times -- but here's one more:
/sdcard -- internal memory of the tablet
/sdcard2 -- miniSD card in the external slot
/usbdisk -- USB key slot
Put your recovery folder and update.zip on /sdcard, turn off the tablet, the press power
and volume + to initiate standard recovery.
Second, put your recovery folder and update.zip on a miniSD card. Edit the command file
in the recovery folder with Notepad to change the location from /sdcard to /sdcard2 and
save it with the name "command" (NO .txt or other file extension). Then boot
recovery with power/volume + and the OS will use the sdcard (assuming you don't
have a live recovery/update.zip file in /sdcard).
Third, if you can boot recovery to CWM but can get your ROM to work, go in recovery to
the mount menu and go down to the mount USB memory option and choose it.
Then plug your connector cable from the miniSB port to your PC. When you plug into
your PC an Explorer window should open and you should have a drive letter representing
the G-Tablet (it's G: on mine) on you menu. You now can select that
letter and you have access to your tablet memory (/sdcard). I've even had a time or two
when not a single file showed!!! I added update.zip and recovery and loaded
a ROM!
The tablet boot process apparently checks /SDCARD. If it doesn't find a recovery files there
it does the same check if you have a miniSD external card installed. The large USB slot is not
useable for booting or recovery so far as I have determined or read.
I hope this helps you.
Rev
I own a visio tablet which I rooted with vegan and clockwork. I have a 32GB SD card but when I check the storage is says 12GB on SD and 2GB on internal. The tablet should have 16GB + my 32GB. Anyone have an idea why it wont come up?
Is the fix above the best way to take care of this issue?
Can anyone kindly help? I've read through a lot of the links and can't find anything. I have rooted my device with clockworm v8, Vegan, got the market place to work and now I just need to figure out what is going on with my 32GB SD card. Should I format it with FAT32? How can I get it to be recognized?
Thanks in advance!
Formatting to Fat32 would be a good start ;-)
SD Card Dilemma
I have the VEGAn-TAB-v1.0.0B5.1 installed in my G-Tab and, with the exception of the SD card issue, things are just peachy! I've read the entire thread but, even with butchconners description, I seem to still be missing something. Let me try to structure this a bit differently...
1. The sdcard2 DOES show up in ifilemanager (with only one file, LOST.DIR) but NOT in SETTINGS. Since it does not appear in SETTINGS, there is no way to mount or dismount it (although if it shows up in the file manager and I can see the file on it, one might infer that it is already mounted.)
2. Even though I can see it in ifilemanager, I'm not so sure how I can actually USE it. It seems to me that the system would need to know (via SETTINGS) that it is there and I would have to tell the system where to put my files (i.e., sdcard or sdcard2).
3. When I connect my G-Tab to my Win7 PC, I only have access to sdcard AND NOT sdcard2. This seems a bit unusual since I have always had access to the removable sd card AND NOT the system memory on all my other devices (EVO, Blackberry, etc.)
My goal is to be able to set applications (some or all) to use the sdcard2 (at least for data) and be able to access it via the usb connection to my PC. Does anyone know how to accomplish this?...Has a solution for this already been posted somewhere?
Many thanks.
I am not an expert but the pc sees(?) only sdcard(internal) but no sdcard2(microsd).
Right, Guys?
I am now able to see both sdcard1 and sdcard2 using pershoots latest oc kernal released 4/25 when hooking up gtab via usb to computer. I am using Vegan tab gingeredition.
where does one find that kernel and how do i install it? Im running vegan ginger right nowand have the same sd card issue.
thanks!

[Q] Getting Internal & External Storage to work together

Coming from the Evo, I'm not used to having both Internal storage (8gb on the phone) and External storage (my microsd card) available to me. As I'm restoring files and data, I'm finding that numerous apps are hardcoded to only look to one filepath: /mnt/sdcard. That was fine on the Evo, as that pointed to the actual SD Card, but on the P4G, it points to the Internal storage.
Being rooted, I tried just making a simple symlink in /mnt/sdcard to /mnt/sdcard-ext but that didn't fly. And I don't want to necessarily "swap" the two by hacking whatever is the equivalent of fstab.
Thoughts on how to better manage having two data stores? Am I just going to have to get used to a new way of doing things?
I have the same issue with Companion Link for Outlook.

[Q] Redirect Rdio app storage to sdcard-ext?

Rdio's Android app is a bit of a disaster, but thankfully they're working on a new one. However, in the meantime, any ideas on how to get it to put its local cached data on the external SD card, instead of the internal storage? It seems to explicitly use /sdcard/rdio, and ignores any of the system settings for data storage. If the internal filesystem wasn't fat32, I could just set up a symlink to /sdcard-ext, but that's not possible. I could change the mount locations of the two storage partitions, but then I'd have the opposite problem with a bunch of other apps.
Any ideas on how to get around this? Would rather put music on my 32GB sd card than fill up the internal storage
rustak said:
Rdio's Android app is a bit of a disaster, but thankfully they're working on a new one. However, in the meantime, any ideas on how to get it to put its local cached data on the external SD card, instead of the internal storage? It seems to explicitly use /sdcard/rdio, and ignores any of the system settings for data storage. If the internal filesystem wasn't fat32, I could just set up a symlink to /sdcard-ext, but that's not possible. I could change the mount locations of the two storage partitions, but then I'd have the opposite problem with a bunch of other apps.
Any ideas on how to get around this? Would rather put music on my 32GB sd card than fill up the internal storage
Click to expand...
Click to collapse
would love to know this as well for my GS3.
Try this as root in your terminal emulator or in adb shell:
Code:
mkdir -p /sdcard-ext/rdio
chmod 777 /sdcard-ext/rdio
mount --bind /sdcard-ext/rdio /sdcard/rdio
Note however that I don't have rdio and don't even know what it is, so this is entirely untested.
If this happens to work (and you'll know by files appearing in /sdcard-ext/rdio), you'll need to execute these commands on every boot. If you're on a CM-based ROM, I suggest putting them into your userinit.sh.

/sdcard doesn't exist

Just got my Note (previous Epic user) and put in my SD card from that phone. Loaded up my apps as usual and went to fire things up and found... not much.
A bit of investigation revealed that the note uses the modular SD slot as 'external_sd', but there's no '/sdcard' visible on my Note right now (or rather /sdcard is the chroot location for my data storage and my apps are oblivious). I've seen reference to how there is a good size memory card built in, and that it uses the /sdcard/ location - which is why external_sd is necessary.
Most of my apps don't understand using the new structure.
I am checking out doing a move of all my contents from the 16gb 'external' card to internal space, but that raises a couple questions and concerns of mine:
1 - how safe is that internal memory from a wipe in the case of doing roms or factory reset - which normally does not touch the SD card?
2 - this pretty much ruins any sort of portability if the phone takes a nose dive and gets trashed, is there a way to swap mount locations of /sdcard and /external_sd (or make it /internal_sd instead) without hosing the system, or know of an alternative that makes the external SD useful again?
tigerknight said:
Just got my Note (previous Epic user) and put in my SD card from that phone. Loaded up my apps as usual and went to fire things up and found... not much.
A bit of investigation revealed that the note uses the modular SD slot as 'external_sd', but there's no '/sdcard' visible on my Note right now (or rather /sdcard is the chroot location for my data storage and my apps are oblivious). I've seen reference to how there is a good size memory card built in, and that it uses the /sdcard/ location - which is why external_sd is necessary.
Most of my apps don't understand using the new structure.
I am checking out doing a move of all my contents from the 16gb 'external' card to internal space, but that raises a couple questions and concerns of mine:
1 - how safe is that internal memory from a wipe in the case of doing roms or factory reset - which normally does not touch the SD card?
2 - this pretty much ruins any sort of portability if the phone takes a nose dive and gets trashed, is there a way to swap mount locations of /sdcard and /external_sd (or make it /internal_sd instead) without hosing the system, or know of an alternative that makes the external SD useful again?
Click to expand...
Click to collapse
1. Mine retains, with normal wipes, but if you odin you can wipe everything except external_sd
2. Just use tb to restore and you don't need to worry about the drive structure. I came from evo and it wasn't like the note, but never had your described issue using tb
tigerknight said:
Just got my Note (previous Epic user) and put in my SD card from that phone. Loaded up my apps as usual and went to fire things up and found... not much.
A bit of investigation revealed that the note uses the modular SD slot as 'external_sd', but there's no '/sdcard' visible on my Note right now (or rather /sdcard is the chroot location for my data storage and my apps are oblivious). I've seen reference to how there is a good size memory card built in, and that it uses the /sdcard/ location - which is why external_sd is necessary.
Most of my apps don't understand using the new structure.
I am checking out doing a move of all my contents from the 16gb 'external' card to internal space, but that raises a couple questions and concerns of mine:
1 - how safe is that internal memory from a wipe in the case of doing roms or factory reset - which normally does not touch the SD card?
2 - this pretty much ruins any sort of portability if the phone takes a nose dive and gets trashed, is there a way to swap mount locations of /sdcard and /external_sd (or make it /internal_sd instead) without hosing the system, or know of an alternative that makes the external SD useful again?
Click to expand...
Click to collapse
I advise if your coming from another device that you start fresh whether that is doing a FAT32 wiping your external and re-downloading your apps or just buy a new one. Internal memory is alot safer than external SD that could fail on occasion for various reasons. In any case if you are going to install custom ROM's the importance of a Nandroid backup cannot be overstated and back that up on your computer as well. It is pretty safe wiping your memory, Odin back to stock and then follow install procedures for the ROM you are installing per the OP from the Dev.

Categories

Resources