How to move Partitions ? ( opensuse12.2)

At this time:

cat /etc/fstab

/dev/disk/by-id/ata-FUJITSU_MHV2080BH_PL_NW9ZT723R0FP-part2 swap swap defaults 0 0
/dev/disk/by-id/ata-FUJITSU_MHV2080BH_PL_NW9ZT723R0FP-part3 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-FUJITSU_MHV2080BH_PL_NW9ZT723R0FP-part4 /home ext3 defaults 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

df -h
Файловая система Размер Использовано Дост Использовано% Cмонтировано в
rootfs 20G 7,1G 12G 38% /
devtmpfs 1,3G 8,0K 1,3G 1% /dev
tmpfs 1,3G 320K 1,3G 1% /dev/shm
tmpfs 1,3G 620K 1,3G 1% /run
/dev/sda3 20G 7,1G 12G 38% /
tmpfs 1,3G 0 1,3G 0% /sys/fs/cgroup
tmpfs 1,3G 620K 1,3G 1% /var/lock
tmpfs 1,3G 620K 1,3G 1% /var/run
tmpfs 1,3G 0 1,3G 0% /media
/dev/sda4 52G 43G 6,8G 87% /home

/dev/sda1 300Mb ext3
/dev/sda3 2Gb swap
/dev/sda3 20Gb ext4 /
/dev/sda4 52Gb ext3 /home

I ask about:
/dev/sda2 (swap) have 2 G.
it is necessary to increase the size of this partition from 2G to 4G

How i can do this ?

Serg

What is on sda1? Could it be shrunk to give some to sda2
Shrinking sda3 is risky IMO

You don’t have a huge amount of space to play with either.

Another option could be to shrink some space off /home to create extended space for a new logical swap

It’s pretty messy because I’m suggesting it in such a way that your existing partition table remains the same

So if you create a new swap, you need to shrink the old one down to add it’s space to /
If you delete it, your partition table changes.
You’ll then need to edit fstab to point to the new swap
Then unformat the very small remaining space of the old swap

On 11/25/2012 06:46 AM, skoltogyan wrote:
> it is necessary to increase the size of this partition from 2G to 4G

why do you say that? that is, are you having trouble caused by not
enough swap?

> How i can do this ?

since swap is between partition 1 and partition 3 you must first
decrease the size of one or both of thouse make room for partition 2 to
be expanded…

first step is to backup the data on which ever partition you decide to
shrink…then use a partitioner to reduce either 1 or 3…you didn’t
show us but if i assume 1 is windows i’d say to use windows to reduce
that partition; or reduce 2 using gparted

then when space is available, just use gparted to increase the swap…

but, back to my first question: why? (if it ain’t broke, don’t fix it)


dd http://tinyurl.com/DD-Caveat

On 2012-11-25 06:46, skoltogyan wrote:
>
> At this time:

Please use code tags. Advanced editor, ‘#’ button.
View this
thread for instructions

> df -h
> Файловая система Размер Использовано

Please use English text.


LANG=en_US.UTF-8  df -h

> /dev/sda1 300Mb ext3
> /dev/sda3 2Gb swap
> /dev/sda3 20Gb ext4 /
> /dev/sda4 52Gb ext3 /home
>
>
> I ask about:
> /dev/sda2 (swap) have 2 G.
> it is necessary to increase the size of this partition from 2G to 4G
>
> How i can do this ?

As you did not print the output of fdisk, it is difficult to say where,
but instead of that, create another 2 GB swap partition anywhere you
can, and then activate both in fstab.

If a new partition doesn’t fit, use a swapfile inside a partition that
has size for it, which is easier.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I ask about:
/dev/sda2 (swap) have 2 G.
it is necessary to increase the size of this partition from 2G to 4G

How i can do this ?

How much RAM do you have?
How much swap is being used when under heavy load? You could check with the command top
Have you considered adding a swap file

To eloborate on all trhe useful answers above and to add a bit to your confusion ;):

. As said, why increase Swap?

. As the system can use several different swap spaces at one time, there is no need whatsoever to increase a Swap aprtition. Just add another one, on the same or another disk. This will at least spare you the difficult question of how to increase a partition sitting between to others.

. And, swap space does not need to be on a swap partition. There is also file swap. Thus when you realy, realy need more swap space (which many of us doubt) and you have no place for a swap partition, but you have place inside a file system partition, you can create a swap file there.

> it is necessary to increase the size of this partition from 2G to 4G

why do you say that? that is, are you having trouble caused by not
enough swap?

the computer doesn’t pass to the sleep mode.
When i do:
#pm-hibernate

the computer starts to pass to the sleep mode.
i see black screen. and at the top i see:

[LEFT]Looking for splash system… splash_start_splash:error -3

[/LEFT]and in such condition it remains.

Tasks: 145 total, 2 running, 143 sleeping, 0 stopped, 0 zombie
%Cpu(s): 4,5 us, 2,3 sy, 0,0 ni, 91,8 id, 1,3 wa, 0,0 hi, 0,0 si, 0,0 st
KiB Mem: 2555648 total, 1425052 used, 1130596 free, 49360 buffers
KiB Swap: 5823556 total, 0 used, 5823556 free, 615232 cached

Serg

And this makes you think swapspace is too smal? It could very well be some driver not being unloaded when going into hibernation, or not being able to load when coming out of it.

And why do you think that it is related to swap size?

Agree completly with the above. Why didn’t you ask here to help you with that error message?

I already resized partitions.

RAM = 4GB
SWAP was = 2 G
Therefore I thought that there is no place

At this time:

RAM=4G
SWAP = 5.5 G
And the problem with pm-hibernate remained
(opensuse12.2)

Please, Help me

On 11/25/2012 05:26 PM, skoltogyan wrote:
> the problem with pm-hibernate remained

because that problem had nothing to do with the amount of swap…as you
have now proven…

so, lets start over (to now i actually have NO idea what is causing your
problem, but maybe one of these will help the helpers learn the problem:

  1. what desktop environment and version are you using?

  2. have you installed anything from Tumbleweed or Factory?

  3. did this system ever go into and out of “sleep mode” correctly, and
    then suddenly one day it stopped working?

  4. did you do any cleaning up and as root deleting stuff you didn’t
    think you needed

  5. is openSUSE 12.2 the first Linux on the machine, ever? or have you
    had other Linux distros on it before? which? and, if you did did you
    install after formatting all linux partitions?

  6. please show us the terminal output and input from


zypper lr -d
uname -a


copy/paste the in/output back to this thread using the instructions
here: http://goo.gl/i3wnr

dd http://tinyurl.com/DD-Caveat

On 2012-11-25 17:26, skoltogyan wrote:

> At this time:
>
> RAM=4G
> SWAP = 5.5 G
> And the problem with pm-hibernate remained
> (opensuse12.2)

One or more swap spaces?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

This information from the linux terminal:

 LANG=en_US.UTF-8 zypper lr -d # | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service --+---------------------------+------------------------------------+---------+---------+----------+--------+-----------------------------------------------------------------+-------- 1 | google-chrome | google-chrome | Yes | Yes | 99 | rpm-md | http://dl.google.com/linux/chrome/rpm/stable/i386 | 2 | openSUSE-12.2-1.6 | openSUSE-12.2-1.6 | Yes | Yes | 99 | yast2 | http://download.opensuse.org/distribution/12.2/repo/oss/ | 3 | repo-debug | openSUSE-12.2-Debug | No | Yes | 99 | yast2 | http://download.opensuse.org/debug/distribution/12.2/repo/oss/ | 4 | repo-debug-update | openSUSE-12.2-Update-Debug | No | Yes | 99 | rpm-md | http://download.opensuse.org/debug/update/12.2/ | 5 | repo-debug-update-non-oss | openSUSE-12.2-Update-Debug-Non-Oss | No | Yes | 99 | rpm-md | http://download.opensuse.org/debug/update/12.2-non-oss/ | 6 | repo-non-oss | openSUSE-12.2-Non-Oss | Yes | Yes | 99 | yast2 | http://download.opensuse.org/distribution/12.2/repo/non-oss/ | 7 | repo-source | openSUSE-12.2-Source | No | Yes | 99 | yast2 | http://download.opensuse.org/source/distribution/12.2/repo/oss/ | 8 | repo-update | openSUSE-12.2-Update | Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/12.2/ | 9 | repo-update-non-oss | openSUSE-12.2-Update-Non-Oss | Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/12.2-non-oss/ 

and this

 LANG=en_US.UTF-8 uname -a Linux linux-bg3a.site 3.4.11-2.16-desktop #1 SMP PREEMPT Wed Sep 26 17:05:00 UTC 2012 (259fc87) i686 i686 i386 GNU/Linux 

Use one swap space. Serg

On 2012-11-26 20:46, skoltogyan wrote:
>
> dd;2506519 Wrote:
>> On 11/25/2012 05:26 PM, skoltogyan wrote: > the problem with
>> pm-hibernate remained because that problem had nothing to do with the
>> amount of swap…as you have now proven… so, lets start over (to now i
>> actually have NO idea what is causing your problem, but maybe one of
>> these will help the helpers learn the problem: 1. what desktop
>> environment and version are you using? 2. have you installed anything
>> from Tumbleweed or Factory? 3. did this system ever go into and out of
>> “sleep mode” correctly, and then suddenly one day it stopped
>> working? 4. did you do any cleaning up and as root deleting stuff you
>> didn’t think you needed 5. is openSUSE 12.2 the first Linux on the
>> machine, ever? or have you had other Linux distros on it before? which?
>> and, if you did did you install after formatting all linux partitions?
>> 6. please show us the terminal output and input from >
> Code:
> --------------------
> > > zypper lr -d uname -a
> --------------------
>>> copy/paste the in/output back to this thread using the instructions
>> here: ‘Posting in Code Tags - A Guide’ (http://goo.gl/i3wnr) – dd ‘DD
>> Caveat’ (http://tinyurl.com/DD-Caveat) This information from the linux terminal:
> Code:
> --------------------
> LANG=en_US.UTF-8 zypper lr -d # | Alias | Name | Enabled | Refresh | Priority | Type | URI | Service --±--------------------------±-----------------------------------±--------±--------±---------±-------±----------------------------------------------------------------±------- 1 | google-chrome | google-chrome | Yes | Yes | 99 | rpm-md | http://dl.google.com/linux/chrome/rpm/stable/i386 | 2 | openSUSE-12.2-1.6 | openSUSE-12.2-1.6 | Yes | Yes | 99 | yast2 | http://download.opensuse.org/distribution/12.2/repo/oss/ | 3 | repo-debug | openSUSE-12.2-Debug | No | Yes | 99 | yast2 | http://download.opensuse.org/debug/distribution/12.2/repo/oss/ | 4 | repo-debug-update | openSUSE-12.2-Update-Debug | No | Yes | 99 | rpm-md | http://download.opensuse.org/debug/update/12.2/ | 5 | repo-debug-update-non-oss | openSUSE-12.2-Update-Debug-Non-Oss | No | Yes | 99 | rpm-md | http://download.opensuse.org/debug/update/12.2-non-oss/ | 6 | repo-non-oss | openSUSE-12.2-Non-Oss | Yes | Yes | 99
| yast2 | http://download.opensuse.org/distribution/12.2/repo/non-oss/ | 7 | repo-source | openSUSE-12.2-Source | No | Yes | 99 | yast2 | http://download.opensuse.org/source/distribution/12.2/repo/oss/ | 8 | repo-update | openSUSE-12.2-Update | Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/12.2/ | 9 | repo-update-non-oss | openSUSE-12.2-Update-Non-Oss | Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/12.2-non-oss/
> --------------------

I¡m sorry, but this is unreadable. I do not know what has happened, but
all lines are run together in one.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Sorry, but is this realy a straight copy/paste from the terminal window into the post between the CODE tags? Look at the results of posted computer text in other posts all ovger the forums. All other people have no problem doing this correct.

I’ve seen this before. Particularly if you copy code from an existing post and try to post it in code tags

Let me try.
I’ll post my fstab

cat /etc/fstab
/dev/disk/by-id/ata-FUJITSU_MJA2250BH_G2_K95CT9A2D4UF-part2 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-FUJITSU_MJA2250BH_G2_K95CT9A2D4UF-part5 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-FUJITSU_MJA2250BH_G2_K95CT9A2D4UF-part6 /home                ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0


Next I’ll start a new reply and try copying the code from this post to replicate it again in code

So let me try posting it


cat /etc/fstab /dev/disk/by-id/ata-FUJITSU_MJA2250BH_G2_K95CT9A2D4UF-part2 swap                 swap       defaults              0 0 /dev/disk/by-id/ata-FUJITSU_MJA2250BH_G2_K95CT9A2D4UF-part5 /                    ext4       acl,user_xattr        1 1 /dev/disk/by-id/ata-FUJITSU_MJA2250BH_G2_K95CT9A2D4UF-part6 /home                ext4       defaults              1 2 proc                 /proc                proc       defaults              0 0 sysfs                /sys                 sysfs      noauto                0 0 debugfs              /sys/kernel/debug    debugfs    noauto                0 0 usbfs                /proc/bus/usb        usbfs      noauto                0 0 devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Just as I thought

Exeactly, but we ask for a straight copy from the treminal in between the CODE tags. It shouldn’t be that difficult to do. And it is the most straighforeward and rather easy thing to do IMHO.