[st.expansion] mount swap on SDHC card ?

Discussion in 'Linux' started by hpfx, Nov 15, 2008.

  1. hpfx

    hpfx

    Joined:
    Oct 30, 2008
    Messages:
    35
    Likes Received:
    0
    hello,
    I just have my SDHC card (8GB class6) into the storage expansion (left side), and I'm wondering if it's possible to move swap on it (instead of the internal SSD)
    do you have such experiance ? is it safe ?
    and how to do that ? (sorry I'm not an linux expert, I still have linpus)

    the goal is to save my SDD drive, such cards cost only 20€.

    other question, if I buy other SD cards, can I switch card if I create a swap onto each of them ?
    but device name might be different ? (/dev/mmcblk0p1)

    what happens if I remove the card (when machine is off) and I switch power on ?

    ho, and what's about /tmp folder ? can we move to the card ??? other idea ??
    thank you.
     
    hpfx, Nov 15, 2008
    #1
  2. hpfx

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    I suppose you could move swap to a SDHC card, but you'd need to create a swap partition on it of course, after a FAT32 parition that is normally used to expand the SSD drive. Or possibly you could get by with using a swapfile as opposed to a swap partition, but I'm not sure how that would work on a FAT32 partition? If I ever used a swapfile with Linux, it was always writing to an ext3 partition. Frankly, the swap doesn't get written to all that much with normal use of the AAO, so I really don't see an advantage to doing this. You'd have to turn the computer off of course, before switching to another card that also had a swap partition. The new card, in the left slot at bootup would still be assigned: /dev/mmcblk0p1. As you're probably aware, you'd need to edit /etc/fstab to have the swap mount on the new swap partition on the SDHC card.

    Yes, there could be problems if you ran Linpus without a swap partition, as you could simply run out of memory.

    /tmp is mounted on a RAM disk, so there is no point in trying to move it to a card.

    Cheers.
     
    rbil, Nov 15, 2008
    #2
  3. hpfx

    hpfx

    Joined:
    Oct 30, 2008
    Messages:
    35
    Likes Received:
    0
    Thank you for your reply, you provide me interessting information.
    is it mandatory to use a FAT32 partition for expansion ?
    ok, right now, it is a FAT32, but I plan to reformat it to ext2, and to leave 1GB to swap.
    yes, that's true normal usage of AAO does not swap a lot.
    but I plan to use visual studio with wine (and it works quite well) but it use a little bit of swap from time to time (hopefully I use version 6 that is lighter) and I really don't plan to open my AAO to add ram, too risky.

    the question I cannot answer, does write cycle higher for SSD than SD card ? does SD card brand have inpact about write cycle ??? (noname SD are less reliable ?)

    I've gparted ready to reformat my card....
    1) shall I remove it from left slot and putting to the right slot to perform reformating ?
    2) will the acer automatic merge stuff still work with a card that have several partition on it ?

    note : at this time, I only have one card, then I didn't know all card will use same device name.
    note : I've changed /etc/aufs.act file to use "tdp" strategy for aufs

    Thank you.
     
    hpfx, Nov 15, 2008
    #3
  4. hpfx

    jhedrotten

    Joined:
    Sep 11, 2008
    Messages:
    208
    Likes Received:
    0
    Location:
    Manila, Philippines
    if i reformat my 16sdhc card to ext2, will it work better on the left slot, and would it 'merge' still?
     
    jhedrotten, Nov 16, 2008
    #4
  5. hpfx

    handy388

    Joined:
    Nov 5, 2008
    Messages:
    66
    Likes Received:
    0
    SWAP on flash memory is extrmely slow!
     
    handy388, Nov 16, 2008
    #5
  6. hpfx

    hpfx

    Joined:
    Oct 30, 2008
    Messages:
    35
    Likes Received:
    0
    ok, I forget this idea, but is it a good idea to reformat the card to ext2 ??
    thank you.
     
    hpfx, Nov 16, 2008
    #6
  7. hpfx

    jhedrotten

    Joined:
    Sep 11, 2008
    Messages:
    208
    Likes Received:
    0
    Location:
    Manila, Philippines
    i just did last week, no noticeable diffrence but at least it's ext2. aufs will still work. :D
     
    jhedrotten, Nov 26, 2008
    #7
  8. hpfx

    Andysan

    Joined:
    Jul 9, 2008
    Messages:
    272
    Likes Received:
    0
    Has anyone running Ubuntu on an 8GB SSD moved the swapfile to an SDHC card please? Any performance benefits, and what was the format of the SD card please?

    Cheers.
     
    Andysan, Feb 23, 2009
    #8
  9. hpfx

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    I have not moved the swap file but I have used a 16 Gb SDHC card in the left slot on the power side of the computer as my home partition so I suspect you can use the SD card for a swap partition but I believe it would be too slow and not of much use.
     
    donec, Feb 23, 2009
    #9
  10. hpfx

    Andysan

    Joined:
    Jul 9, 2008
    Messages:
    272
    Likes Received:
    0
    Hi donec,

    Thanks for your reply - i have the SSD AAO, would using a class 6 SDHC be even slower than the internal SSD? I guess its all a moot point because i would like to use the card in the left slot and i think Ubuntu Intrepid corrupts this when put to sleep...?

    :ugeek:
     
    Andysan, Feb 28, 2009
    #10
  11. hpfx

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    I have not found any distro that works for sleep with sleep when you use an SDHC card as home. I don't know about the difference of speed between the SDHC's and the SSD as I have found all OS's to be the about same speed after you get your computer setup with software the way you want it. I had never seen an OS as fast as Linpus but it is very restrictive as it comes and when I made the alterations I needed to run the way I wanted it started slowing down also (true not quite as much as others).
     
    donec, Mar 1, 2009
    #11
  12. hpfx

    Andysan

    Joined:
    Jul 9, 2008
    Messages:
    272
    Likes Received:
    0
    Mkay, thanks for the reply donec. I've installed XFCE this weekend and am very impressed with the speed. Boot and login times not what i was getting with Linpus mind but i think thats an unreachable target,
     
    Andysan, Mar 1, 2009
    #12
  13. hpfx

    JerryP

    Joined:
    Jan 17, 2009
    Messages:
    31
    Likes Received:
    0
    After getting frustrated trying to customize Linpus I repartitioned & reformatted the SSD and restored a backup of my very customiized Slackware 12.1 system to it. Currently using kernel 2.6.28.6 customized for the AA1. I use a 4GB class 6 sdhc card mounted on /home and have no problems with suspend to ram. The key to using suspend/resume and a sdhc card appears to be configuring the kernel with
    "CONFIG_MMC_UNSAFE_RESUME=y".
    Jerry
     
    JerryP, Mar 1, 2009
    #13
  14. hpfx

    Andysan

    Joined:
    Jul 9, 2008
    Messages:
    272
    Likes Received:
    0
    Hi Jerry,

    Thanks, thats certainly useful information. I appreciate that its probably a dumbass question, but where can i express that parameter please?

    Thanks. :mrgreen:
     
    Andysan, Mar 1, 2009
    #14
  15. hpfx

    donec

    Joined:
    Sep 11, 2008
    Messages:
    952
    Likes Received:
    0
    Great question.
     
    donec, Mar 2, 2009
    #15
  16. hpfx

    JerryP

    Joined:
    Jan 17, 2009
    Messages:
    31
    Likes Received:
    0
    It's a kernel build configuration parameter. The custom kernel that comes with Linpus has it set, I'm assuming that various distro kernels must not.
    You have to either build your own custom kernel or find a kernel built with CONFIG_MMC_UNSAFE_RESUME=y.
    The config for the Linpus kernel is in /boot as config-something-or-other. I used that as a starting point to build a custom kernel for the AA1.
     
    JerryP, Mar 2, 2009
    #16
  17. hpfx

    Andysan

    Joined:
    Jul 9, 2008
    Messages:
    272
    Likes Received:
    0
    Ah, i understand. Thank you for taking the time to explain.
     
    Andysan, Mar 3, 2009
    #17
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.