Active Topics

 



Notices


Reply
Thread Tools
Ken-Young's Avatar
Posts: 387 | Thanked: 1,700 times | Joined on Feb 2010 @ Cambridge, MA, USA
#321
I'm too stupid to figure out how to use FlopSwap. I've read the FlopSwap wiki page, but it does not contain all the info I need. I'm hoping someone can help me out.

I've got a 64 GByte SD card which seems to work well in my N900. If I set it up as one big partition, all is well. I want to set it up with three partitions, one big one for /media/mmc1, and two smaller ones for flopswap to use. As I understand it, FlopSwap expects the 2nd and 3rd partitions of the SD card to be the swap spaces (is that right?). I've used sfdisk to partition the SD card as follows:
Code:
/home/user # sfdisk -l /dev/mmcblk1

Disk /dev/mmcblk1: 1948992 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk1p1          0+ 1894591  1894592-  60626943+  83  Linux
/dev/mmcblk1p2     1894592  1921791   27200     870400   82  Linux swap / Solaris
/dev/mmcblk1p3     1921792  1948991   27200     870400   82  Linux swap / Solaris
/dev/mmcblk1p4          0       -       0          0    0  Empty
Since the blocks are 32768 bytes, the second and third partitions have 32768 x 27200 = 850 MBytes each. After repartitioning, I initially built an ext3 file system on partition 1 only, and rebooted the N900 (no file system was built on partitions 2 and 3). FlopSwap did not recognize the two new SD card partitions - it saw only the original internal swap. So I built ext3 file systems on partitions 2 and 3, and rebooted again. After rebooting, the N900 mounted partition 2 as /media/mmc1p2 and partition 3 as /media/mmc1p3. FlopSwap still did not find the SD card partitions. I tried manually dismounting partitions 2 and 3, but FlopSwap still did not see them.

Must the SD card swap partitions be numbers 2 and 3?

Must the SD card swap partitions be exactly 800 MBytes in size? Will slightly larger partitions work?

Must one build a file system on the swap partitions? If so, will ext3 work?

Must one do something to make FlopSwap notice the new SD card partitions, or to mark the new partitions as swap partitions for the OS?

Is there something else that I'm obviously doing wrong?

Thanks for any tips/info/help!
 
ste-phan's Avatar
Posts: 1,195 | Thanked: 2,708 times | Joined on Jan 2010 @ Hanoi
#322
Originally Posted by Ken-Young View Post
I'm too stupid to figure out how to use FlopSwap. I've read the FlopSwap wiki page, but it does not contain all the info I need. I'm hoping someone can help me out.

I've got a 64 GByte SD card which seems to work well in my N900. If I set it up as one big partition, all is well. I want to set it up with three partitions, one big one for /media/mmc1, and two smaller ones for flopswap to use. As I understand it, FlopSwap expects the 2nd and 3rd partitions of the SD card to be the swap spaces (is that right?). I've used sfdisk to partition the SD card as follows:
Code:
/home/user # sfdisk -l /dev/mmcblk1

Disk /dev/mmcblk1: 1948992 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk1p1          0+ 1894591  1894592-  60626943+  83  Linux
/dev/mmcblk1p2     1894592  1921791   27200     870400   82  Linux swap / Solaris
/dev/mmcblk1p3     1921792  1948991   27200     870400   82  Linux swap / Solaris
/dev/mmcblk1p4          0       -       0          0    0  Empty
Since the blocks are 32768 bytes, the second and third partitions have 32768 x 27200 = 850 MBytes each. After repartitioning, I initially built an ext3 file system on partition 1 only, and rebooted the N900 (no file system was built on partitions 2 and 3). FlopSwap did not recognize the two new SD card partitions - it saw only the original internal swap. So I built ext3 file systems on partitions 2 and 3, and rebooted again. After rebooting, the N900 mounted partition 2 as /media/mmc1p2 and partition 3 as /media/mmc1p3. FlopSwap still did not find the SD card partitions. I tried manually dismounting partitions 2 and 3, but FlopSwap still did not see them.

Must the SD card swap partitions be numbers 2 and 3?

Must the SD card swap partitions be exactly 800 MBytes in size? Will slightly larger partitions work?

Must one build a file system on the swap partitions? If so, will ext3 work?

Must one do something to make FlopSwap notice the new SD card partitions, or to mark the new partitions as swap partitions for the OS?

Is there something else that I'm obviously doing wrong?

Thanks for any tips/info/help!
-Yes, flopswap expects 2nd and 3rd SD partition to be the two swap partitions.

-I had the same situation as you (unrecognized secondary swap partions on SD card, only viewing default one): Originally I formatted the card in a PC and it looked as if I had 2 swap partions (82?) but flopswap didn't find those. After I took the SD card back to a PC and used a different formatting tool (yes using GUI tools, hehehe) I noticed there was an error with the two swap partions. Formatted again and it worked.


Must the SD card swap partitions be numbers 2 and 3?


-guess not but then you would have to alter the script of Swapflop?

Must the SD card swap partitions be exactly 800 MBytes in size? Will slightly larger partitions work?


No, I tested long time with both smaller (512MB) and larger ones (1600MB). Results were equal.

Must one build a file system on the swap partitions? If so, will ext3 work?

-Swap is swap, you just format as SWAP space, OS will know what to do with it.

Must one do something to make FlopSwap notice the new SD card partitions, or to mark the new partitions as swap partitions for the OS?

No, just make sure the swap partiions are correctly created.

Is there something else that I'm obviously doing wrong?

No, it looks good. But then again , I am not the expert.
 

The Following 2 Users Say Thank You to ste-phan For This Useful Post:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#323
2+3 should not be formatted as ext3, they need to be formatted for swap. As root: mkswap /dev/partitionname (eg. mmcblk1p2). Needs to be done for both.
 

The Following 4 Users Say Thank You to Android_808 For This Useful Post:
Ken-Young's Avatar
Posts: 387 | Thanked: 1,700 times | Joined on Feb 2010 @ Cambridge, MA, USA
#324
Originally Posted by Android_808 View Post
2+3 should not be formatted as ext3, they need to be formatted for swap. As root: mkswap /dev/partitionname (eg. mmcblk1p2). Needs to be done for both.
Thanks very much! That was the step I was missing. I'm a happy FlopSwap user now.
 
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#325
no worries. not 100% sure but I think the requirement to have swap on part's 2+3 was removed a while back. I generally stick with it though as I have part. 1 formatted as vfat (done on device). I've found Windows does't always like accessing disks if the first partition it finds is not readable (fat*, ntfs etc)
 

The Following User Says Thank You to Android_808 For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#326
Originally Posted by marmistrz View Post
Well, I don't see a reason for autochecking in Flopswap. You can easily schedule the checking script, e.g. with alarmed.
Yep I agree

Originally Posted by Ken-Young View Post
I'm too stupid to figure out how to use FlopSwap. I've read the FlopSwap wiki page, but it does not contain all the info I need. I'm hoping someone can help me out.

Must the SD card swap partitions be numbers 2 and 3?
Not in the latest version, this is just recommended.
In stock Maemo the first partition must be FAT for the card to be used for storage, this is why the partitions 2/3 are recommended.
Also as mentioned you may get issues with windows not mounting the card (not an issue for some I know)
They can be anywhere on the card, they are found at boot time using blkid.

Originally Posted by Ken-Young View Post
Must the SD card swap partitions be exactly 800 MBytes in size? Will slightly larger partitions work?
No, this is just the recommended size.

Originally Posted by Ken-Young View Post
Must one build a file system on the swap partitions? If so, will ext3 work?
No, they must be linux-swap partitions.

Originally Posted by Ken-Young View Post
Must one do something to make FlopSwap notice the new SD card partitions, or to mark the new partitions as swap partitions for the OS?
No, the flopswap will setup all the correct settings for your version of upstart. The upstart file can be removed using the "Use External swap on boot" option, however, this is checked as default.

If you could point me to the parts of the wiki you found unhelpful I can fix them for you. I thought I covered most bits in the Q&A section.

Originally Posted by Ken-Young View Post
Thanks very much! That was the step I was missing. I'm a happy FlopSwap user now.
Happy Flopswaping!
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#327
I'd suggest performing a mandatory check right after each fresh swap. Otherwise the displayed info is obsolete, e.g. it looks like there is 87% fresh swap written, when in fact it is close to zero.

Also, a mandatory check is performed each time FlopSwap is started by the user, which refreshes the info. Since Flopswap thus doesn't require a Check button press to update the info at app start, it makes sense to update the info after a fresh swap as well.

Finally, note that a mandatory check will not add much time to the fresh swap operation; a fresh swap typically takes minutes, and a check takes a few seconds.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.
 

The Following 2 Users Say Thank You to chill For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#328
Originally Posted by chill View Post
I'd suggest performing a mandatory check right after each fresh swap. Otherwise the displayed info is obsolete, e.g. it looks like there is 87% fresh swap written, when in fact it is close to zero.
I agree with you... partially.

Since the swap used is close to zero, flopswap's indicator should be set to zero just after freshing

No one needs that kind of accuracy when swap used is that low. The check would be useless then.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#329
Well, the check may indicate how intensive the current write to swap is. Normally if I do a manual check right after a fresh swap, it will indicate >0% fresh swap written.

But I agree with you that this may not be very useful; to me that's more of a curiosity and possibly to detect if there is a intensive process running that I don't know about.

So I guess it comes down to what is more valuable to the user, the percentage information or the time to do a check.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#330
Originally Posted by chill View Post
I'd suggest performing a mandatory check right after each fresh swap. Otherwise the displayed info is obsolete, e.g. it looks like there is 87% fresh swap written, when in fact it is close to zero.
Originally Posted by chill View Post
Well, the check may indicate how intensive the current write to swap is. Normally if I do a manual check right after a fresh swap, it will indicate >0% fresh swap written.
???
I did not check sources of flopswap for a long time but I am sure sixwheeler does swap on/swap off. And this will copy whole content of used memory from old to new swap. [sixwheeledbeast to confirm]
So new swap will have used already immediately after swap current amount of used swap memory memory! That is reason why I use 1,5G for my swap sizes, to increase the time between swap refreshs.

But just now thinking of using bb-power 'swapon -p': if I select for new swap always a higher priority it ..... will not work as after second refresh the swaps are not defragmented anymore
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:43.