How and Why to partition SD Card?

sparks555

Active member
Mar 4, 2011
26
3
0
Visit site
I need some extra SD storage so I got a new micro SD card for my rooted LG Optimus S (LS670ZVH). I backed up my phone with Titanium Backup and also did a nandroid backup with Xionia CWMA custom recovery. There is a lot of information out there in the forums and it's a bit confusing I don't have any Custom ROMS (yet), so what do I do next after copying the current card to my PC? Do I just copy all the files and folders from the PC back to the new SD card or do I need to partition the SD card first? and how should I do it?
 

DoesItMatter

Well-known member
Dec 3, 2010
294
37
0
Visit site
If at all possible, put the new micro-sd card into an adapter and format it under windows.

Leave it as Fat-32 format, but do a LONG format, un-check the quick-format

This will scan for any bad sectors and make it fresh

Then copy over all your old data, make sure phone is off, insert new Micro-SD and power on phone.

Don't mess with any ext3/4 formatting if you're not gonna mess with a custom rom.
 

sparks555

Active member
Mar 4, 2011
26
3
0
Visit site
Thanks for the information, I do plan on getting a custom rom in the future (once I learn more about it). Should I worry now about partitioning and setting up the card properly or will I anyway have to reformat the card when I do custom rom?
 

DoesItMatter

Well-known member
Dec 3, 2010
294
37
0
Visit site
Really depends how much you are going to do with the phone.

I don't install a ton of apps, so I only need the phone memory to do anything I want to do.

If you're the type that needs 100+ apps installed at any given time, you may want to read up
on formatting the card with EXT4 and Fat-32 partitions.

If you only keep the apps you need on the phone and uninstall when done, just keep the card
as Fat-32 format and it will always be readable in Windows.
 
  • Like
Reactions: sparks555

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
If you do pursue allocating a portion of the SD card to either apps (apps2sd) or data (data2sd), try using a partition editor like GParted to set it up. It is free, easy to use and graphical. You can also use it in a live environment so that you don't have to install anything else on your computer (just be sure to select your SD card and not your HDD ;) ). Then all you have to do is set up the mounting in Android.

GParted on Sourceforge
 
  • Like
Reactions: myshkin

Jessicalt1

Lover of all things Andi
May 17, 2010
401
47
0
Visit site
I partitioned my SD card to free up internal memory on my phone. I went from about 40mb available to 825 mb available. It makes it a little snappier. I did everything through thunderc recovery.

Edit, just partitioning doesn't free up the memory, but enabling data2sd does.
 

sparks555

Active member
Mar 4, 2011
26
3
0
Visit site
If you're the type that needs 100+ apps installed at any given time, you may want to read up
on formatting the card with EXT4 and Fat-32 partitions.

I do have a lot of apps, that's why I'm getting a bigger card. What I don't understand is the need or benefit to partition. I currently move apps to SD via titanium backup without any partition.

Where can I read up more on partitioning and EXT4 etc?
 

mcasas

Well-known member
Dec 11, 2010
120
6
0
Visit site
if you partition your sd card how do you enable data 2sd and is it compatible with the new gb update and xiona recovery
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
I do have a lot of apps, that's why I'm getting a bigger card. What I don't understand is the need or benefit to partition. I currently move apps to SD via titanium backup without any partition.

Where can I read up more on partitioning and EXT4 etc?

This only moves part of the app to the SD card. If you create an EXT partition you can configure the phone to use the EXT partition as if it were internal memory. This means the entire app can be installed to the EXT partition on the SD card and widgets (and other programs) that have problems when moved to an SD card will work fine on an EXT partition of an sd card.

if you partition your sd card how do you enable data 2sd and is it compatible with the new gb update and xiona recovery

See [How-To] data2ext for Reborn, Froyo 2.2 and CM7.
This requires xionia recovery, I don't think the GB update has support for EXT partitions so you would need the EXT filesystem modules to install. I don't know of any that are available right now.
 

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
EXT is a native file format for Linux; FAT is tied to Windows. EXT is arguably superior in its management of the space, but I expect that the reason you need to have an EXT partition for this operation involves allowing or even tricking the Linux-based OS to use the SD storage as internal memory.

Also, if you are a Windows user, you will not be able read the EXT partition when plugging your Android device in, because Windows can't read anything that isn't in its native formats (FAT and NTFS). Linux and Mac users should have no problem.
 
Last edited:

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
Does android have a swap file like linux and if so can the sdcard be used for the swap file?

Yes and yes.

However the consensus is that it is not a good idea. Swap is turned off by default and is not needed (other low end phones when the Optimus came out only had 256 MB ram, the Optimus has 512 MB ram). Also using the SD card for swap means the phone will be repeatedly writing to the same sectors (swap partition) of the SD card all the time and may cause an early failure. SD cards have a limited number of read/write cycles using one for a swap partition will drastically increase the read/write cycles on the sd card.
 

Dorion-Grey

Well-known member
Mar 31, 2011
61
0
0
Visit site
Yes and yes.

However the consensus is that it is not a good idea. Swap is turned off by default and is not needed (other low end phones when the Optimus came out only had 256 MB ram, the Optimus has 512 MB ram). Also using the SD card for swap means the phone will be repeatedly writing to the same sectors (swap partition) of the SD card all the time and may cause an early failure. SD cards have a limited number of read/write cycles using one for a swap partition will drastically increase the read/write cycles on the sd card.

Is this why the data2ext4 how-to states you should have a class 4 sd? I have a 16g sd not sure class how do I find out?

Sent from my LG-LS670 using Tapatalk
 

graphic1982

Well-known member
Jul 27, 2011
55
5
0
Visit site
most of the time the sdcard will have a number with a circle stamped on it (pretty small). that would be the class of the card. at least that was what I always heard.
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
So how can I backup/copy my EXT partition on my PC?

Really this is treated just like internal memory on the phone now which you don't backup unless you are doing a nandroid backup. There are a couple of options

  1. Do a nandroid backup, the custom recovery will backup the EXT partition as well.
  2. Use ADB, you use adb pull to copy things from the internal memory (or EXT) of your phone to your PC.
  3. Use a Linux Live CD, such as Ubuntu, Boot from the CD and you will be able to read/backup from the EXT partition on your SD card.

Really the best option is the nandroid backups. Then you can backup your nandroid images onto the PC. The EXT partition now has your app installations so it's fine to restore it when you restore a nandroid but if you load a new ROM you should reinstall the apps or restore them with titanium backup. Restoring the EXT partition loaded with apps from a previous ROM could cause problems.
 

epidenimus

Racer of Elevators
Apr 13, 2011
1,119
255
0
Visit site
Use a Linux Live CD, such as Ubuntu, Boot from the CD and you will be able to read/backup from the EXT partition on your SD card.

I think that Ubuntu may have disabled NTFS-3g in the live environment a few versions ago. If so, he wouldn't be able to put the EXT backup file directly on the Windows partition while using just the live disc. If he isn't doing an install or doing a unetbootin, he may have to place the backup on the FAT partition of the SD card or on another USB stick temporarily. I've been using a live PuppyLinux for such backup operations for a while, so I am not sure anymore.

I agree with the_maplebar, the nandroid would be your best backup method. Or better yet, upgrade your PC by installing Linux. ;)

There is always a way or ten to get the job done.
 

Kyleluvsandroid

Active member
Jan 26, 2011
30
1
8
Visit site
The reason I added an EXT partition to my optimus was that with the native move to sd the card would flake out after a few days, weeks or months. At some point it stop reading the card, but a computer would read it fine and I could move the stuff off format and move it back and it work again for a while. I used titanium backup to move the apps. I'm an app junkie and the phone just couldn't handle very many and move to sd also has a limit of like 120 apps. I found an app called link2sd that moves alomst the entire app. Some apps it will move the entire thing, some it leaves a small part. Since I started using using link2sd I haven't had anymore issues with the sd card. I have a 4gb I believe class 4 sd card. I now have 163 apps installed and the only issue I have is I have used up all the 512MB ext4 part I made so I need to make it bigger. That is way more than the phone has ever thought of running. The only way to back them that I can tell is titanium backup. You must have a custom rom that supports the ext format you use. I run reborn rom and use ext4. Whenever I flash a new rom I do have to a file called data2ext and I am currently using v4 so data2ext4-v4. This turns on the option for ext4, the support is already there it just has to be turned on. This only has to be done the first after flashing the rom or updated rom. That was the most difficult part to figure out, there are a ton of forums our there that will tell you how to format it ext4.
 
  • Like
Reactions: sparks555

Forum statistics

Threads
941,406
Messages
6,908,673
Members
3,157,908
Latest member
EverCurious