Page 34 of 55 FirstFirst ... 24293031323334353637383944 ... LastLast
Results 661 to 680 of 1081
Like Tree13Likes
  1. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #661  
    Quote Originally Posted by rwhitby View Post
    Note that if you change partition sizes, the next time you doctor that device with a doctor that has not been equivalently modified to match those sizes, then you USB partition will likely be erased. Similarly for an OTA update that changes partition sizes.

    Has the alternative of using a plain old swap file on /media/internal somewhere been ruled out?

    -- Rod
    Yes, erasing the USB partition is an isssue, but considering this is a Pre-, I don't imagine that I will get any further updates from HP. Any updates that I get are likely to be from the meta-doctor.

    A swap file on media was tried. The performance was significantly worse. And as Xanadu mentions, there is the issue with USB mounting.
  2. #662  
    Quote Originally Posted by carrel View Post
    A swap file on media was tried. The performance was significantly worse. And as Xanadu mentions, there is the issue with USB mounting.

    Ah. I did forget to mention that performance was abysmal with the swap file. Thanks!


    M.
  3. #663  
    Quote Originally Posted by Xanadu73 View Post
    Ah. I did forget to mention that performance was abysmal with the swap file. Thanks!


    M.
    Yeah, I don't think the performance using a file on a FAT partition will ever match a swap partition, or even a extX one, you're adding an extra filesystem layer.

    Why don't you just extend the swap partition on the fly for testing? -- Ok, not "on the fly", I meant with no Doctor

    We have the tools: lvm lvresize and resizefat are there.

    -- Sent from my Palm Pre using Forums
    Just remember: If I helped you, press the thanks button!

    Owner of: Pre Sprint, Pre Telcel, Pre Plus AT&T, Pre 2 Unlocked, Pixi Plus AT&T, and 2 TouchPads (my Pre3 was stolen so it won't appear again here).
    Needs: Veer (anyone?)
    Apps: Subnet Calculator, FreeCam, PhotoFun, NuttyPad (work in progress)
    HomeBrew: meta-doctor and Messaging Plugins collaborator
    Twitter: @cesarneg
  4. #664  
    Quote Originally Posted by NuttyBunny View Post
    Why don't you just extend the swap partition on the fly for testing? -- Ok, not "on the fly", I meant with no Doctor

    We have the tools: lvm lvresize and resizefat are there.
    Me personally? Because I have only one Pre, mon! There's a few folks here with spare Pres that (seemingly) don't mind hosing the /media/internal mount for testing the resizefat procedure. Once that's hammered out a little more, I'll be more than happy to sacrifice my Pre. I backup /media/internal with rsync to my main Gentoo workstation "daily" (haven't figured out how to schedule a CLI task yet - so it's "as I remember to do so" right now), so I know I won't be missing anything on a restore.


    M.
  5. #665  
    Quote Originally Posted by Xanadu73 View Post
    Me personally? Because I have only one Pre, mon! There's a few folks here with spare Pres that (seemingly) don't mind hosing the /media/internal mount for testing the resizefat procedure. Once that's hammered out a little more, I'll be more than happy to sacrifice my Pre. I backup /media/internal with rsync to my main Gentoo workstation "daily" (haven't figured out how to schedule a CLI task yet - so it's "as I remember to do so" right now), so I know I won't be missing anything on a restore.


    M.
    AFTER KNOWLEDGEABLE PEOPLE TEST THIS, WE COULD POST MORE DETAILED INSTRUCTIONS. FOR NOW, IF YOU DON'T KNOW HOW TO DO THIS, IT'S SAFER NOT TO DO IT.

    For the brave souls:

    BACKUP FIRST! BACKUP FIRST! BACKUP FIRST!

    Start in recovery mode and boot with the installer image for your device (it's inside the webOS Doctor, resources/webOS).

    Novaterm to the device

    Then, the commands:

    lvm.static is the tool that can destroy everything, so, please, handle with extreme care.

    lvm.static lvscan <-- will scan your logical volumen partitions and show a summary
    lvm.static lvdisplay <-- will show you information on all your partitions
    lvm.static vgdisplay <--- will show you information on your volume group (think of it as a container for your partitions)

    If you use lvdisplay you can see the current size of the partitions. We're trying to resize media, so look into it.

    You will need to resize the fat partition there, so, use the resizefat command:

    resizefat <newsize> /dev/store/media <--- For 5Gb, newsize=5G, for 13.5Gb, newsize=13G

    Please, don't try to resize it beyond your actual size, you can mess things up badly.

    Second step is to resize the lv partition:

    lvm.static lvresize -L <new size> /dev/store/media <--- The size uses the same naming convention as resizefat

    Third step, confirm it still works

    ****.vfat -v /dev/store/media <---- it's "f s c k . v f a t" with no spaces..

    Code:
    dosfsck 2.11 (12 Mar 2005)
    dosfsck 2.11, 12 Mar 2005, FAT32, LFN
    Checking we can access the last sector of the filesystem
    Boot sector contents:
    System ID "MSWIN4.1"
    Media byte 0xf8 (hard disk)
           512 bytes per logical sector
         32768 bytes per cluster
           126 reserved sectors
    First FAT starts at byte 64512 (sector 126)
             2 FATs, 32 bit entries
       1703936 bytes per FAT (= 3328 sectors)
    Root directory start at cluster 520 (arbitrary size)
    Data area starts at byte 3472384 (sector 6782)
        425878 data clusters (13955170304 bytes)
    0 sectors/track, 0 heads
             0 hidden sectors
      27262976 sectors total
    Checking for unused clusters.
    Checking free cluster summary.
    /dev/store/media: 1891 files, 2717/425878 clusters
    NOTE: I'M NOT COMPLETELY SURE IF A 13Gb FAT PARTITION FITS INSIDE A 13Gb LVM, IT WORKED ON MY PRE PLUS, PLEASE, DO THIS ON A SPARE DEVICE OR AT LEAST BACK UP YOUR STUFF

    The last step is to look with lvm.static lvdisplay and find the line with "Free PE / Size", which contains the "free extents" that we're going to add to the swap partition:

    Free PE / Size 47 / 376.00 MB

    I'll now use:

    root@palm-webos:/# lvm.static lvresize -l +100%FREE /dev/store/swap
    Extending logical volume swap to 480.00 MB
    Logical volume swap successfully resized

    And Presto!

    More and more swap.. :P

    do it with care. And as Rod said, this will probably make the next webOS doctor delete your media partition, so, please backup.
    Last edited by NuttyBunny; 06/19/2011 at 12:10 PM.
    Just remember: If I helped you, press the thanks button!

    Owner of: Pre Sprint, Pre Telcel, Pre Plus AT&T, Pre 2 Unlocked, Pixi Plus AT&T, and 2 TouchPads (my Pre3 was stolen so it won't appear again here).
    Needs: Veer (anyone?)
    Apps: Subnet Calculator, FreeCam, PhotoFun, NuttyPad (work in progress)
    HomeBrew: meta-doctor and Messaging Plugins collaborator
    Twitter: @cesarneg
  6. #666  
    Wow can't believe how far this has come. Can't wait for the test results.

    -- Sent from my Palm Pre using Forums
  7. #667  
    Quote Originally Posted by NuttyBunny View Post

    lvm.static lvresize -L <new size> /dev/store/media <--- The size uses the same naming convention as resizefat

    Third step, confirm it still works

    ****.vfat -v /dev/store/media <---- it's "f s c k . v f a t" with no spaces..

    Is this "safe" to so with a real /media/internal? Meaning, I 100% understand that it's safest to do when we accept that everything could be lost, but, is resizefat smart enough to see real data and move it?

    #######
    #EDIT:

    Why are you resizing the vFAT file system before resizing the partition? Is this the more "proper" way?

    Also, you say that lvmresize takes the same size naming convention as resizefat. Does resizefat accept *relative* numbers? Like -256M and +256M rather than having to specify an absolute size like 5G? Using relative numbers "guarantees" no "dead space" on the device.
    #######


    M.
    Last edited by Xanadu73; 06/20/2011 at 07:31 AM.
  8. #668  
    Quote Originally Posted by Xanadu73 View Post
    Is this "safe" to so with a real /media/internal? Meaning, I 100% understand that it's safest to do when we accept that everything could be lost, but, is resizefat smart enough to see real data and move it?

    #######
    #EDIT:

    Why are you resizing the vFAT file system before resizing the partition? Is this the more "proper" way?

    Also, you say that lvmresize takes the same size naming convention as resizefat. Does resizefat accept *relative* numbers? Like -256M and +256M rather than having to specify an absolute size like 5G? Using relative numbers "guarantees" no "dead space" on the device.
    #######


    M.
    First you resize the inner filesystem, then the outer partition, seems logical I don't wanna resize the outside first and then find out that the inside is no longer able to reach the last sectors...

    But, the *real* proper way to do this should be the approach made by the SHR installer people:

    Get the data OFF the partition (i.e. backup everything in a tar file, preserving permissions if needed), resize the partitions, redo the fat filesystem, resize the swap as well (or just delete the media partition, recreate it, and then grow the swap), and then restore the data from media.

    It's time consuming, but it's REALLY the best way to do it.

    Of course, I only tested it in linux but I know it works under cygwin as well.

    Wanna try? Gimme some hours and I'll post the steps.
    Just remember: If I helped you, press the thanks button!

    Owner of: Pre Sprint, Pre Telcel, Pre Plus AT&T, Pre 2 Unlocked, Pixi Plus AT&T, and 2 TouchPads (my Pre3 was stolen so it won't appear again here).
    Needs: Veer (anyone?)
    Apps: Subnet Calculator, FreeCam, PhotoFun, NuttyPad (work in progress)
    HomeBrew: meta-doctor and Messaging Plugins collaborator
    Twitter: @cesarneg
  9. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #669  
    Actually you don't want to always resize the inside before the outside. It depends on whether you are shrinking or growing. If you are shrinking then you resize the partition (inside) before the volume (outside). If you are growing then you resize the volume before the partition. That is the only way to avoid data loss. If you think about it, it does make sense. Anything else would temporarily leave you in a state where the inside was bigger than the outside. (And only a Tardis can do that.)
  10. #670  
    Has anyone got this working? how is the performance? i am very excited for this.
  11. #671  
    Quote Originally Posted by graffix31 View Post
    Has anyone got this working? how is the performance? i am very excited for this.

    I haven't tried it yet, but, as "luck" would have it (read as: sarcasm...) my headphone jack isn't working anymore. All the usual tricks aren't working. I'm going to the local Sprint Store a little later and hopefully they'll still order me another one (yes, I pay TEP). So should I get a new one in a day or two, I'll Doctor it to 2.1 and try this out before I go hog wild restoring all my stuff.


    M.

    P.S.

    For those that have their phones stuck in headphone mode, this script I pumped out a year or so ago will get it out. Don't have anything plugged into the headphone port when running. Yes, it's gets my current phone out of headphone mode, but it's not seeing the plug go in and out all the time. Yes, I've already done the alcohol-on-a-plug trick.

    Code:
    #!/bin/sh
    
    echo -e \\vMEDIA
    luna-send -n 1 palm://com.palm.audio/media/setVolume '{"scenario":"media_front_speaker","volume":100}'
    luna-send -n 1 palm://com.palm.audio/media/setVolume '{"scenario":"media_back_speaker","volume":100}'
    luna-send -n 1 palm://com.palm.audio/media/setVolume '{"scenario":"media_headset","volume":100}'   
    
    echo -e \\vPHONE
    luna-send -n 1 palm://com.palm.audio/phone/setVolume '{"scenario":"phone_front_speaker","volume":100}'
    luna-send -n 1 palm://com.palm.audio/phone/setVolume '{"scenario":"phone_back_speaker","volume":100}'
    luna-send -n 1 palm://com.palm.audio/phone/setVolume '{"scenario":"phone_headset","volume":100}'
    
    echo -e \\vRINGTONE
    luna-send -n 1 palm://com.palm.audio/ringtone/setVolume '{"volume":100}'
    
    echo -e \\vSYSTEM
    luna-send -n 1 palm://com.palm.audio/system/setVolume '{"volume":100}'
    
    echo -e \\vRINGER SWITCH
    luna-send -n 1 palm://com.palm.keys/switches/status '{"get":"ringer"}'  
    
    echo -e \\vHEASET JACK
    luna-send -n 1 palm://com.palm.keys/switches/status '{"get":"headset"}'
    
    luna-send -n 1 palm://com.palm.audio/media/setCurrentScenario '{"scenario":"media_back_speaker"}'
    luna-send -n 1 palm://com.palm.audio/phone/setCurrentScenario '{"scenario":"phone_front_speaker"}'
  12. #672  
    I still pay tep as well. just got a new one because of my phone radio not working. got a great new one. very tight, looks brand new. let us know how it goes when you get your new one.
  13. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #673  
    Quote Originally Posted by Xanadu73 View Post
    I haven't tried it yet, but, as "luck" would have it (read as: sarcasm...) my headphone jack isn't working anymore. All the usual tricks aren't working. I'm going to the local Sprint Store a little later and hopefully they'll still order me another one (yes, I pay TEP). So should I get a new one in a day or two, I'll Doctor it to 2.1 and try this out before I go hog wild restoring all my stuff.
    If I give you a patch for the Meta-doctor would you try that? It's untested, but I think it is complete. It should simply change the partition re-sizing to make the swap end up 488M (added 384M).

    Dave
  14. #674  
    Quote Originally Posted by bassman97 View Post
    Just an update on my end:

    I tried the following settings on my Pixi:
    ramzswap = 64MB
    swapiness = 70
    dirty/dirty_expire = what Xanadu originally posted.
    cache pressure = 200
    overcommit = 0
    dirty_background/dirty ratio = 5 and 75 (I forget which had which values).

    I am now trying the mods recently proposed by rmauser (only the vm stuff). I'm also trying only 48MB of ramzswap.

    Conclusions thus far:

    The settings I first used made a noticeable difference for the better. RAM typically had 12-2 MB free and swap never used a total of more than 130 MB. Phone also had few, if any major lockups. As soon as I inputed the new settings, my Pixi did a full reset. That seems like it wasn't connected to the change. I'll update after some time with the new settings. Initial impressions though seem to indicate that my new settings aren't as good.
    Another update on settings.

    With the settings I mentioned prior, I finally had a lockup when vm.dirty_ratio was kicked. So, I changed things around again. So now I'm running:

    Ramzswap = 48 MB
    swappiness = 90
    cache_pressure = 300
    dirty_expire = 6000
    dirty_writeback = 18000
    dirty_background_ratio = 5
    dirty_ratio = 90
    page-cluster = 4
    oom_kill_allocating_task = 1
    overcommit=0

    So far, so good for the few hours I've changed to this. Few things to note though. Looking in /proc/sys/vm, zone_reclaim mode is not present, or at least not in a 1.4.5 Pixi, so I removed that. Also, panic_on_oom is not present so I removed that as well. From my experience, lock-up seems to happen when dirty_ratio is tripped, and flushing begins. Problem is in my case, memory never went down. Seems like the Linux settings can only go so far, when the task that needs to be cleaned out is Luna, and doing so can only happen with a Luna reset. I feel as though the best way to solve this problem would be to find a way to tell Luna to garbage collect itself better, or to increase swap so that once Luna peaks in size, one still has enough swap left over to not hit dirty_ratio. I think once I get some free time, I'll try the commands everyone posted for increasing the swap size. Although increasing swap to me seems like a band-aid to solve the real problem (getting Luna to shrink after it grows), it's probably the best solution for us now.

    As to explain my setting changes, dirty_expire is when data/pages expire. dirty_writeback is the interval at which flushing occurs. So my thought process there was to have it so that after a good amount of data has expired in 3 minutes, to initialize flushing at 3 minutes to clean things out. So instead having the times switched around before, which would have flushings in between when data/pages expired, I changed it so that after data/pages expire, flushing occurs. I'm hoping this will free up memory in larger chunks. For dirty ratio, as I mentioned prior, hen this is tripped, my phone locks up. Since this was happening at around 50% swap usage, even when set to 70/75, I bumped it up to 90 to avoid it.
  15. #675  
    Quote Originally Posted by Xanadu73 View Post
    I haven't tried it yet, but, as "luck" would have it (read as: sarcasm...) my headphone jack isn't working anymore. All the usual tricks aren't working. I'm going to the local Sprint Store a little later and hopefully they'll still order me another one (yes, I pay TEP). So should I get a new one in a day or two, I'll Doctor it to 2.1 and try this out before I go hog wild restoring all my stuff.
    Try this. Little something I noticed. Take paper or ,in my case a coffee stir, and cut a small piece off. pop the back off your phone and you will notice a gap between the head phone jack and the yellow plastic part. slide the paper / stir down there. your phone will no longer be stuck. see my attached picture for a better idea.
    Attached Images Attached Images
    Sprint pre -> Motorola Photon 4G
  16. #676  
    So round two of the resize swap battle!
    -If you see any problems this time around let me know again.
    -This is my only phone... palm pre- on sprint
    WARNING THIS COULD ERASE YOUR PHONE

    • I am not responsible for anything that happens to your phone
    • your media may be erased
    • your phone may need to be re-doctored
    • it may catch fire
    • the drive could be come corrupt
    • your phone may hate you for life
    • Back UP! Back UP! Back UP!


    This is what I did:
    1. lvm lvreduce -L 6.3G /dev/store/media
    2. lvm lvresize -L +256M /dev/store/swap
    -I did an vgdisplay
    -you will see the last line Free PE / Size
    - lvm lvresize -L "That number" /dev/store/swap or /dev/store/media your choice more swap or more free space.

    3. resizefat -v /dev/store/media 6.3G
    -In the process of doing this resizefat realized that the vfat was larger then the partition and auto adjusted.
    4. swapoff /dev/store/swap
    5. mkswap /dev/store/swap
    6. swapon /dev/store/swap
    7. reboot

    Notes:
    I did all of this without unmounting /dev/store/media while ssh into my phone. I do not recommend this because if anything goes wrong you are screwed. However it slipped my mind and happened to work.

    Also all my data on my media partition was retained and survived the process.


    Code:
    Filesystem                Size      Used Available Use% Mounted on
    /dev/root                31.0M     10.9M     20.1M  35% /boot
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /dev/.static/dev
    tmpfs                     2.0M    208.0K      1.8M  10% /dev
    /dev/mapper/store-var
                             62.0M     51.3M     10.7M  83% /var
    /dev/mapper/store-mojodb
                            139.5M     31.9M    107.5M  23% /var/db
    /dev/mapper/store-filecache
                            127.5M     78.6M     48.9M  62% /var/file-cache
    /dev/mapper/store-log
                             23.2M     10.7M     12.5M  46% /var/log
    tmpfs                    32.0M    200.0K     31.8M   1% /tmp
    tmpfs                    16.0M     52.0K     15.9M   0% /var/run
    tmpfs                    32.0M     12.0K     32.0M   0% /var/tmp
    tmpfs                   119.8M         0    119.8M   0% /media/ram
    /dev/mapper/store-media
                              6.0G      1.8G      4.2G  30% /media/internal
    cryptofs                  6.0G      1.8G      4.2G  30% /media/cryptofs
    /dev/mapper/store-var
                             62.0M     51.3M     10.7M  83% /opt
    tmpfs                    32.0M    200.0K     31.8M   1% /var/palm/jail/org.webosinternals.modeswitcher.srv/tmp
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/lib
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/bin
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/bin
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/lib
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/palm/frameworks
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/palm/nodejs
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/palm/data
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/share
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/palm/services
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/usr/palm/public
    tmpfs                     2.0M    208.0K      1.8M  10% /var/palm/jail/org.webosinternals.modeswitcher.srv/dev/shm
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/etc/ssl
    /dev/mapper/store-var
                             62.0M     51.3M     10.7M  83% /var/palm/jail/org.webosinternals.modeswitcher.srv/var/ssl/trustedcerts
    /dev/mapper/store-var
                             62.0M     51.3M     10.7M  83% /var/palm/jail/org.webosinternals.modeswitcher.srv/var/ssl/certs
    /dev/mapper/store-var
                             62.0M     51.3M     10.7M  83% /var/palm/jail/org.webosinternals.modeswitcher.srv/var/ssl/crl
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/etc/ls2
    tmpfs                     2.0M    208.0K      1.8M  10% /var/palm/jail/org.webosinternals.modeswitcher.srv/dev/logdir
    /dev/mapper/store-var
                             62.0M     51.3M     10.7M  83% /var/palm/jail/org.webosinternals.modeswitcher.srv/var/luna/preferences
    /dev/mapper/store-filecache
                            127.5M     78.6M     48.9M  62% /var/palm/jail/org.webosinternals.modeswitcher.srv/var/file-cache
    /dev/mapper/store-root
                            441.7M    394.8M     46.9M  89% /var/palm/jail/org.webosinternals.modeswitcher.srv/etc/palm
    /dev/mapper/store-media
                              6.0G      1.8G      4.2G  30% /var/palm/jail/org.webosinternals.modeswitcher.srv/media/internal
    cryptofs                  6.0G      1.8G      4.2G  30% /var/palm/jail/org.webosinternals.modeswitcher.srv/media/cryptofs/apps/usr/palm/services/org.webosinternals.modeswitcher.srv
    tmpfs                    16.0M     52.0K     15.9M   0% /var/palm/jail/org.webosinternals.modeswitcher.srv/var/run
    and lvdisplay

    Code:
     --- Logical volume ---
      LV Name                /dev/store/root
      VG Name                store
      LV UUID                X3fG1C-o6LA-n4Ua-MMAj-6u7I-R2tr-C46guM
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                456.00 MB
      Current LE             57
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       0
      Block device           254:0
    
      --- Logical volume ---
      LV Name                /dev/store/var
      VG Name                store
      LV UUID                Fu7U9d-zqnB-t79i-UlKI-o33w-evU7-fauaz0
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                64.00 MB
      Current LE             8
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       1
      Block device           254:1
    
      --- Logical volume ---
      LV Name                /dev/store/update
      VG Name                store
      LV UUID                L77PM7-0gVm-8H3G-eaki-h3Jg-rYpw-8acGnT
      LV Write Access        read/write
      LV Status              available
      # open                 0
      LV Size                16.00 MB
      Current LE             2
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       2
      Block device           254:2
    
      --- Logical volume ---
      LV Name                /dev/store/log
      VG Name                store
      LV UUID                Uyig3N-D5hP-8OHp-Pd2I-O45h-W4zD-Ou9UTK
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                24.00 MB
      Current LE             3
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       3
      Block device           254:3
    
      --- Logical volume ---
      LV Name                /dev/store/media
      VG Name                store
      LV UUID                k9VWlf-hfJO-LyLl-2Qpn-2E8x-WT02-82Fm9K
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                6.30 GB
      Current LE             807
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       4
      Block device           254:4
    
      --- Logical volume ---
      LV Name                /dev/store/swap
      VG Name                store
      LV UUID                Bn9g9I-RL3q-eAbx-XN6a-fkJ9-RH6a-ZZWoKg
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                504.00 MB
      Current LE             63
      Segments               3
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       5
      Block device           254:5
    
      --- Logical volume ---
      LV Name                /dev/store/mojodb
      VG Name                store
      LV UUID                9qvD5z-oTnX-dShS-V2L3-wJgH-0bhO-HUeKOZ
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                144.00 MB
      Current LE             18
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       6
      Block device           254:6
    
      --- Logical volume ---
      LV Name                /dev/store/filecache
      VG Name                store
      LV UUID                dSo2Z0-YBEX-MfYk-40TJ-x0yV-UGip-UGaDKl
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                136.00 MB
      Current LE             17
      Segments               4
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Persistent major       254
      Persistent minor       7
      Block device           254:7
    and f s c k . v f a t -v /dev/store/media

    Code:
    dosfsck 2.11 (12 Mar 2005)
    dosfsck 2.11, 12 Mar 2005, FAT32, LFN
    Checking we can access the last sector of the filesystem
    Boot sector contents:
    System ID "MSWIN4.1"
    Media byte 0xf8 (hard disk)
           512 bytes per logical sector
         32768 bytes per cluster
            80 reserved sectors
    First FAT starts at byte 40960 (sector 80)
             2 FATs, 32 bit entries
        786432 bytes per FAT (= 1536 sectors)
    Root directory start at cluster 30 (arbitrary size)
    Data area starts at byte 1613824 (sector 3152)
        196558 data clusters (6440812544 bytes)
    16 sectors/track, 4 heads
             0 hidden sectors
      12582912 sectors total
    Checking for unused clusters.
    Checking free cluster summary.
    /dev/store/media: 18192 files, 59642/196558 clusters
    and swapon -s

    Code:
    Filename                                Type            Size    Used    Priority
    /dev/ramzswap0                          partition       98296   85944   100
    /dev/mapper/store-swap                  partition       516088  0       -3
    and vgdisplay

    Code:
    --- Volume group ---
      VG Name               store
      System ID
      Format                lvm2
      Metadata Areas        2
      Metadata Sequence No  17
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                8
      Open LV               7
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               7.62 GB
      PE Size               8.00 MB
      Total PE              975
      Alloc PE / Size       975 / 7.62 GB
      Free  PE / Size       0 / 0
      VG UUID               UH4mMi-QlOx-lF7C-gUXz-GsYP-Jwfo-LnAt7d
    Last edited by theXfactor2011; 06/21/2011 at 02:39 PM.
    Sprint pre -> Motorola Photon 4G
  17. #677  
    Quote Originally Posted by theXfactor2011 View Post
    So round two of the resize swap battle!
    -If you see any problems this time around let me know again.
    -This is my only phone... palm pre- on sprint
    WARNING THIS COULD ERASE YOUR PHONE
    I couldn't think of a reason why this wouldn't work, and just went ahead.
    Notes:
    - The "That number" needs to be preceded by a plus sign ("+")
    - The resizefat command may take a while to complete (more than 15 minutes)

    Otherwise everything is fine.
  18. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #678  
    Quote Originally Posted by theXfactor2011 View Post
    This is what I did:
    1. lvm lvreduce -L 6.3G /dev/store/media
    2. lvm lvresize -L +256M /dev/store/swap
    -I did an vgdisplay
    -you will see the last line Free PE / Size
    - lvm lvresize -L "That number" /dev/store/swap or /dev/store/media your choice more swap or more free space.

    3. resizefat -v /dev/store/media 6.3G
    -In the process of doing this resizefat realized that the vfat was larger then the partition and auto adjusted.
    4. swapoff /dev/store/swap
    5. mkswap /dev/store/swap
    6. swapon /dev/store/swap
    7. reboot
    Wow, I think I am going to try this. I was wondering if resizefat would work on a live partition.

    I'd make some suggestions though. I would change the order to 3, 1, 4, 2, 5, 6, 7. The rationale: resize the fat partition BEFORE shrinking it's volume. this avoids potential issues that are less likely with vfat but still possible. Also swapoff BEFORE making any changes to the swap partition sizes. I was also thinking that there should be a f*s*c*k (I hate the censor bot) step between 6 & 7. I see that you did one. I'd just add it to the set of necessary steps.

    Thanks!!!
  19. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #679  
    Wow, big thanks to Xfactor for trying this out. I just went ahead and did this. It worked fine for me. But just to reiterate the point above:
    THIS CAN TOTALLY TRASH YOUR PHONE!
    First reboot the phone to have things as fresh as possible, then fsck the media partition to be sure all is good before you start.
    1. /usr/sbin/fsck.vfat -r /dev/mapper/store-media

    If this produces any errors or warning, fix them and then reboot. Keep repeating this step until there are no errors/warnings.

    Next do:

    1. /bin/resizefat /dev/mapper/store-media 6448M
    2. /usr/sbin/lvreduce -L 6448M /dev/mapper/store-media
    3. /usr/sbin/fsck.vfat -r /dev/mapper/store-media
    4. /sbin/swapoff /dev/mapper/store-swap
    5. /usr/sbin/lvresize -L +384M /dev/mapper/store-swap
    6. /sbin/mkswap /dev/mapper/store-swap
    7. reboot


    resizefat gave a warning about dosfsck missing but that can be ignored. I chose the sizes above based on wanting to add 384M to my swap. If you want to use the same numbers, you should make sure your media partition was the same size as mine to start. Run the command:
    /usr/sbin/lvs --units m /dev/mapper/store-media
    and it should say that the size is 6832M. If not, don't use these numbers.

    I also disabled compcache while I was at it. I am now running with just a 488M swap partition. I haven't been running this nearly long enough to have any opinion about compcache vs. no compcache but in a few days I should have some feel for this.

    Dave
    Last edited by carrel; 06/22/2011 at 03:19 PM. Reason: add "-r" option to f s c k.vfat and added another f s c k before beginning
  20. #680  
    Quote Originally Posted by carrel View Post
    resizefat gave a warning about dosfsck missing but that can be ignored.

    ipkg-opt install dosfstools


    M.

Posting Permissions