Find the answer to your Linux question:
Page 1 of 4 1 2 3 4 LastLast
Results 1 to 10 of 39
Hi, I have 1 GB RAM, so when I first installed FC8 I kept 2 GB swap partition following the thumb rule of giving twice the ram-size. Now, I see, ...
  1. #1
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    177

    Decreasing swap partition

    Hi,

    I have 1 GB RAM, so when I first installed FC8 I kept 2 GB swap partition following the thumb rule of giving twice the ram-size. Now, I see, more than 1 GB swap is not required, and in my case even 512 or less MB will be sufficient, as I checked my swap space has never been user to run all the process.

    So, how can I decrease the swap space to something like 512 MB and give the extra space to my /home partition?

    Thanks in advance.
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Use the PartedMagic CD, you can resize the partitions quite easily. Before you do this though check /etc/fstab to see if the disk partitions are referenced by UUID. If they are I suggest you change them to device names eg fstab on my system with mods ...
    Code:
    jonathan@jonathan-laptop:~$ sudo cat /etc/fstab
    [sudo] password for jonathan:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sda9
    #UUID=8377fdba-c71a-47b3-8dbe-8a382ad73546 /               ext3    defaults,errors=remount-ro 0       1
    /dev/sda9 /               ext3    defaults,errors=remount-ro 0       1
    
    # /dev/sda7
    #UUID=c465dc06-83f3-447b-a424-9af4c5d2431a /home           ext3    defaults        0       2
    /dev/sda7 /home           ext3    defaults        0       2
    
    # /dev/sda1
    #UUID=16D9-B5D2  /media/sda1     vfat    defaults,utf8,umask=007,gid=46 0       1
    /dev/sda1  /media/sda1     vfat    defaults,utf8,umask=007,gid=46 0       1
    
    # /dev/sda2
    #UUID=A22AA8492AA81BF3 /media/sda2     ntfs    defaults,umask=007,gid=46 0       1
    /dev/sda2 /media/sda2     ntfs    defaults,umask=007,gid=46 0       1
    
    # /dev/sda4
    #UUID=0D573EEE2D99D205 /media/sda4     ntfs    defaults,umask=007,gid=46 0       1
    /dev/sda4 /media/sda4     ntfs    defaults,umask=007,gid=46 0       1
    
    # /dev/sda6
    #UUID=f920145b-c614-4559-9450-0cab86cf666a /media/sda6     ext3    defaults        0       2
    /dev/sda6 /media/sda6     ext3    defaults        0       2
    
    # /dev/sda8
    #UUID=2cb45537-bb5c-42cb-8e47-d1859d47d2b3 /media/sda8     ext3    defaults        0       2
    /dev/sda8 /media/sda8     ext3    defaults        0       2
    
    # /dev/sda5
    #UUID=5989366b-39b5-489e-2ed7-231c51046da2 none            swap    sw              0       0
    /dev/sda5 none            swap    sw              0       0
    
    /dev/hdc        /media/cdrom0   udf,iso9660 user,noauto,exec 0       0
    #fusesmb /home/Mint/jonathan/Network fuse.fusesmb rw,nosuid,nodev,allow_other,max_read=32768 0 0
    #
    # mods to replace uuid with device names eg /dev/sda9 March 08
    jonathan@jonathan-laptop:~$

  3. #3
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    177
    Thank for the reply Jonathan.
    I'll give it a try. But one thing I didn't properly understood is
    [qoute]you change them to device names ...[/quote]

    Can you kindly explain it once again.

    Thanks once again.
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Partitions on disk can be referenced in a number of ways, for example uuid, label, device name, device id etc.

    The example fstab I posted is from Linux Mint ... Mint originally created this during the install
    Code:
    # /dev/sda9
    UUID=8377fdba-c71a-47b3-8dbe-8a382ad73546 /               ext3    defaults,errors=remount-ro 0       1
    which I replaced with this
    Code:
    # /dev/sda9
    /dev/sda9 /               ext3    defaults,errors=remount-ro 0       1
    I have found when partitions are resized the UUID changes ... if the entries in /etc/fstab use UUID then Linux will stop working. If you post the output of
    Code:
    sudo cat /etc/fstab
    we can post back the updates required.

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Fedora uses LABELs instead of UUIDs.

    I would suggest you to post the contents of /etc/fstab file and output of fdisk -l command before doing anything with partitions.
    Code:
    cat /etc/fstab
    su -
    fdisk -l
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Quote Originally Posted by devils casper View Post
    Fedora uses LABELs instead of UUIDs.
    Thanks devils casper ... must have read over the FC reference.

    Label should not change with resize so you should be OK without modifying fstab.

    Probably worth posting output of commands devils casper indicated just to make sure before resizing.

  7. #7
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    177
    here it goes:

    # /etc/fstab:
    Code:
    LABEL=/                 /                       ext3    defaults        1 1
    LABEL=/home             /home                   ext3    defaults        1 2
    tmpfs                   /dev/shm                tmpfs   defaults        0 0
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                   /sys                    sysfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0
    LABEL=SWAP-sda8         swap                    swap    defaults        0 0
    $ fdisk -l:
    Code:
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xdde8dde8
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        2611    20972826    7  HPFS/NTFS
    /dev/sda2            2612       19456   135307462+   f  W95 Ext'd (LBA)
    /dev/sda5            2612       10444    62918541    7  HPFS/NTFS
    /dev/sda6           10445       12823    19109286   83  Linux
    /dev/sda7           12824       19197    51199123+  83  Linux
    /dev/sda8          19198      19455    2072353+  82  Linux swap/ Solaris
    Thank you.
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Shrink /dev/sda8 partition and assign free space to /dev/sda7. /dev/sda7 is most probably your /home partition.
    Execute df -h command to check exact used/free space of each partition.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #9
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    177
    Thanks devils casper,

    I'll do it. I'll post if I encounter any problem.
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  10. #10
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Good Luck !
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 1 of 4 1 2 3 4 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...