[Q] Trying to create a RAID 0 - Galaxy S I9000 Q&A, Help & Troubleshooting

Hi,
I am trying to create a raid 0 with 2 partition on an external sd.
Right now I ogt a problem while trying to create 2 partition on the external sd:
(running on JPK rooted with busybox 1.17.1 and terminal emulator)
when I "fdisk -l" I got no output, tried with "su" but nothing happens.
I found the external sd in "/dev/block/mmcblk1" but cant fdisk it neihter access (the external sd has been unmounted before...)
How can I clean and create 2 ext2 partition on the external sd?
After this I will create the raid array:
mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/block/mmcblk1p{1,2} #a partitionned sd is seen as mmcblkXpy where X is the disk, Y the partition so here I try to create a raid using both partitions#
mkfs.ext2 /dev/md0
tune2fs -c 0 -j 0 /dev/md0
mount /dev/md0 /mnt
Is it correct?
About why am I doing this, it is simple, because I can... (or I can try to do it) Also I wanna try to create a raid 0 and copy/loop/link some files to try another way to fix the lag. Dunno if it will work or not, if it will burn the sd or whatever but if we dont try we will never know ^^.

Plug it into a PC with an adapter and then boot up a Linux install disk and run from disk. You can then use the partition management software on there to do it. This is what I use to recover corrupt and fake SD/MicroSD cards.

That is an Absolutely Futile task on flash disks
you can get it to work, but the internal SD and external SD will die in no time.
and if you do as you said with 2 partitions on the same external SD is even more futile
the goal of any RAID is to use separate physical DISKs not partitions
each DISK is a volume, not each partition
in the end it's futile

I want that mdadm binary. Where did you get it?! I am testing with two separate files on two disks.. as in.. /data/media and /Removable/MicroSD (class 10) .... at first just loop devices, one file on each partition.. and yes, it is possible to create a RAID array using loop devices.

Mdadm for armel, I has it.. no work. Mdadm that works on android. Please post.

Related

Partition and A2SD setup

I have been trying to set up A2SD for a while now but i cant set up a partition on my sd card.
So far i have got adb to work, but when i connect my g1 to my computer (and mount it) it automatically disconnects when i go into the disk management section.
(my sd card is an 8 gig and trying to set it up on CyanogenMod)
shockaj said:
I have been trying to set up A2SD for a while now but i cant set up a partition on my sd card.
So far i have got adb to work, but when i connect my g1 to my computer (and mount it) it automatically disconnects when i go into the disk management section.
(my sd card is an 8 gig and trying to set it up on CyanogenMod)
Click to expand...
Click to collapse
you can't format your card by mounting it to windows....
if you don't have a card reader, read this tutorial
http://forum.xda-developers.com/showthread.php?t=534714
it has instructions for a swap setup as well but modify it to not have one if you dont want it
Or you can go to the link in my sig. Its a different way of setting up your partitions through a linux live cd.
recovery console (i assume you have 7948 mb, you can verify using "print" after typing "parted /dev/block/mmcblk0) don't type stuff in < >
parted /dev/block/mmcblk0
rm 1 <removes fat32 partition, might want to backup data on this>
rm 2 <removes ext partition, backup apps if you want to (adb pull)>
rm 3 <removes 3rd partition, if existent>
mkpartfs primary fat32 0 7436
mkpartfs primary ext2 7436 7948
quit
upgrade_fs <converts ext2 - ext3>
reboot recovery
flash ROM if you want to...
thanks everyone i was looking for a guide just like these!
your help is much apperciated!

Have A2SD, SD card fried but apps still work. I'm confused!

Okay so I'm pretty sure my SD card got fried (or damaged) last night.
The notification of "Damaged SD card" kept on showing up.
I tried running the repair file systems from CM recovery 1.4, all variations of rebooting, powering down, removing the SD card and all that to help 'fix' my problem.
I also went into settings to see if i have the option to mount and format the SD, but shows unavailable. Also SD secondary is unavailable as well.
So for sure my SD card is fried..... i think lol.
The thing that I am confused about is that I have apps2sd and try to use the apps that I know are installed on my SD card, I'm still able to access and use them, even though my SD card is damaged. I tried rebooting without the SD card inserted and I get FC's galore.
So does that mean my FAT32 partition is damaged and not my EXT partition?
How do I go about to remedy this?
Do I go ahead and click the on the notification to format my SD card?
Then it'll format my FAT32 partition and not my EXT partition?
Or is that totally wrong?
Confused and in need of some guidance. Thanks.
mrcrs said:
So does that mean my FAT32 partition is damaged and not my EXT partition?
.
Click to expand...
Click to collapse
Spot on
Format your card. If you use Linux, you can back up your apps, but you'll have to format and then re-install the EXT2 partition.
Basically, the FAT32 partition got corrupted. Anytime you actually see anything about the SD card on the phone itself, it's always the FAT32 partition.
hey there i had that same problem all i did was resize my fat32 partition
i used GNU parted so go to console and type
Code:
parted /dev/block/mmcblk0
now type
Code:
print
this displays the sd cards size in MB write down the max memory
now type
Code:
resize
it will ask what partition number type 1 it will the ask for a start size just type 0 if it errors saying couldnt write 0 but can write 8192B just say yes and for the end size type 1MB less than your max
Example for my 8gig card
Code:
resize
1
8192B
7965 - change to 7964
this will bring up a error saying the filesystem is damaged do you want to fix say yes
then type
Code:
quit
then
Code:
upgrade_fs
and that should do it
forgot to add your going to have to delete your ext partition FIRST! for that type
Code:
rm 2

How can I delete the EXT2 partition?

I got my N1 "Froyo" updated->rooted->Titanium apps restored.
EXT2 seems useless since official app2sd is now supported,my question is,how can i delete the EXT2 partition?
Might wanna hold off on that for a bit...
Looks like the official app2sd method requires developers to set a flag on each application so that it is allowed to be installed on SD card. Any attempts to manually move current apps to the SD card only seem to work until a reboot, at which point you'll have to reinstall everything to the internal storage.
where to? in pc or mobile?
in pc: http://gparted.sourceforge.net/livecd.php
Same question here. Currently have an Ext2 partition in sd card mobile however 8 gb San Disk class 2 card doesn't fully support Apps2Sd (especially large apps 15 mb+) as I often experienced force close and slow down. Any advice how to delete it?
Thanks in advance.
Boot into recovery and connect phone to computer. Open a command prompt and navigate to the "tools" folder of the SDK. Enter the following:
1. adb shell
2. parted /dev/block/mtdblock0
3. list
This will show you the list of partitions on your card. Partition 2 should be ext. You can straight up delete it using "rm 2" but that won't reclaim the empty space to the fat32 partition. You'll have to backup files from your fat partition, delete all partitions and make one new fat32 partition using the entire space.
This is, of course, the long way. Alternatively, you can use the SD Partition utility built into the AmonRa recovery. All that requires is that you enter the amount of space you wanna allocate. That still nukes your files so make backups.

SDHC card as ext3?

This really isn't Android development related but seems too technical for the general area. Please move it if there is a more correct place for this post to be.
I had the bright idea that I could get 'extra' storage by sym linking an internal application directory to the external SDHC card.
So I copied files and tried to link:
ln -s /sdcard/sdcard2/some_app_dir /sdcard/some_app_dir
This fails. After reading some here I figured out that its because the SDHC card is formatted in FAT32 and the internal /sdcard directory is a linux type format (ext2, ext3 or ext4, not sure which).
I figure no big deal, just format the SD card as ext3 (or 2 or 4 whatever matches, I just picked 3 for my attempts).
Now I can su in terminal and type:
mount -t ext3 -o rw /dev/block/mmcblk2p1 /sdcard/sdcard2
and its mounted and everything. Life seems good.
So I exit terminal and see what I can do with 'normal' apps. No go. Figure I had a permission problem. That can be fixed.
The bigger issue is the need to open a terminal session and manually mount the SDHC card.
So my questions are 2...
Is what I'm trying to do really do-able? As in will the whole sym link and ext3 formatted SDHC card idea work?
Secondly, how do I get the SDHC card to automagically mount?
bsoplinger said:
This really isn't Android development related but seems too technical for the general area. Please move it if there is a more correct place for this post to be.
I had the bright idea that I could get 'extra' storage by sym linking an internal application directory to the external SDHC card.
So I copied files and tried to link:
ln -s /sdcard/sdcard2/some_app_dir /sdcard/some_app_dir
This fails. After reading some here I figured out that its because the SDHC card is formatted in FAT32 and the internal /sdcard directory is a linux type format (ext2, ext3 or ext4, not sure which).
I figure no big deal, just format the SD card as ext3 (or 2 or 4 whatever matches, I just picked 3 for my attempts).
Now I can su in terminal and type:
mount -t ext3 -o rw /dev/block/mmcblk2p1 /sdcard/sdcard2
and its mounted and everything. Life seems good.
So I exit terminal and see what I can do with 'normal' apps. No go. Figure I had a permission problem. That can be fixed.
The bigger issue is the need to open a terminal session and manually mount the SDHC card.
So my questions are 2...
Is what I'm trying to do really do-able? As in will the whole sym link and ext3 formatted SDHC card idea work?
Secondly, how do I get the SDHC card to automagically mount?
Click to expand...
Click to collapse
Try this yet ? I used it on a test build on the kyocera zio and it worked.
https://market.android.com/details?id=com.a0soft.gphone.app2sd
Let us know
I didn't mean that I needed to save app space since I already use app2sd but that I wanted to save space from the files some particular app saves onto internal memory by moving them to the SDHC card.
If the app(s) in question were written with the idea that there could be multiple places to store files I wouldn't need to do this but they aren't. They write to a single, fixed location that's on the internal memory of the Streak. Which means if I move those files to the SDHC I need to make them appear in their internal memory location, hence the link command in my OP.

[Q] vold.fstab appending an extra /devices/platform/s3c-sdhci.2(?)/mmc_host/mmc2

In short,
what should vold.fstab look like to link /sdcard/external_sd to the 2nd partition on the EMMC external sdcard? (/dev/block/mmcblk0p2 is a bad idea)
Background and why you might want to do this:
3 data partitions, how best to arrange? (/mnt/emmc /mnt/sdcard & 2nd emmc partition)
My internal memory has shrunk down from 8gb to about 4gb, which is annoying but natural for flash storage.
This is no longer enough space for apps such as Sygic to store it's maps in.
Sygic looks in /mnt/sdcard & /mnt/sdcard/external_sd. These older apps are always going to be a problem so I'm looking to make /mnt/sdcard/external_sd available somehow. But which way is best?
I have 2 partitions on the EMMC sdcard and the internal SDcard is just fat32:
Internal SD = ~4gb, /mnt/sdcard
External SD partition 1 = fat32, ~10gb, /mnt/emmc
External SD partition 2 = ext3, ~5gb, currently used by link2sd in /mnt/sec I think
Click to expand...
Click to collapse
/mnt/sdcard/external_sd is unused.
I would prefer to do:
Code:
ln -s /mnt/sec/external_sd_emulated /mnt/sdcard/external_sd
...but presumably because the /mnt/sdcard is only fat32 I have permission denied. I was hoping this would work since the source for the link is ext3 even if the destination is fat32.
I could edit fstab to change that but I'd rather not if possible because that's a bit too non standard for me. If I did though... what would that be?
I guess it would be adding to vold.fstab:
Code:
dev_mount emmc /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.[B]3[/B]/mmc_host/mmc[B]2[/B]
^ but should it be a 3 or a 1 at this line? fstab -l with no output and nothing in /devices makes it hard to figure out
I would normally experiment but in this case I don't want to get it wrong. How do I find out what /mnt/asec is mounted to because df isn't showing it
Just to show I have searched, a related thread:
http://forum.xda-developers.com/showthread.php?t=941443
&
http://forum.xda-developers.com/showthread.php?t=1524831
Also a note to anyone reading this; obviously backup your vold.fstab file... but also put it somewhere that you can access easily via adb and CWM recovery if it doesn't work. I guess mounting /dev/block/mmc... might work but that would then fail if the sdcard isn't present... which would be I guess when USB mass storage mode is turned on.
Some documentation on /devices on Android would be good:
http://miuiandroid.com/community/threads/vold-fstab-modding-need-help.15576/
Same problem.
I used Galaxy S 8GB and found that it's too less space for install many game.
So I buy micro sdhc 32 GB.
I added it in vold.fstab too but it seem like does not work.
Now I used workaround by run command.
mount -o /mnt/sdcard/Android /mnt/emmc/Android/
But it's not convenient to use because if you want to plug computer via USB you must umount first unless it might have problem when mount.
So If you can find solution to add it automount external sd (micro sdcard ) at startup same as internal sd feature please guide me.
Thanks
frankind said:
I used Galaxy S 8GB and found that it's too less space for install many game.
So I buy micro sdhc 32 GB.
I added it in vold.fstab too but it seem like does not work.
Now I used workaround by run command.
mount -o /mnt/sdcard/Android /mnt/emmc/Android/
But it's not convenient to use because if you want to plug computer via USB you must umount first unless it might have problem when mount.
So If you can find solution to add it automount external sd (micro sdcard ) at startup same as internal sd feature please guide me.
Thanks
Click to expand...
Click to collapse
you're gonna need an entry to whatever the sdcard is but from /devices so it ejects properly. the thing is I I'm not 100% the syntax in my first post is correct.... the only way is to try it unless we can find a command that is equivalent to fdisk -l on linux?
An app called directorybind can do this bit running an app all the time isn't ideal and it crashes for me from time to time

Categories

Resources