LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2013, 03:27 AM   #1
DeWaRs
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
Resize disk Suse sp2


Hello everybody,

I'm a real newbie in Linux and I would like to extend my filesytem /dev/sda2 partion. Here is the partition details :


Code:
fdisk -l

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000161cf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     4209029     2104483+  82  Linux swap / Solaris
/dev/sda2   *     4209030   207640123   101715547   83  Linux
I would like to add the whole free space of /dev/sda to /dev/sda2

Could anyone help me to do that ??

Thanks a lot.

DeWaRs
 
Old 12-11-2013, 03:39 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
check out this links:

http://www.howtoforge.com/linux_resi...xt3_partitions

https://access.redhat.com/site/docum...size-part.html

or tell us your distro for a more specific answer.
 
Old 12-11-2013, 03:45 AM   #3
DeWaRs
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for your answer, I will read this. My distro is Suse SP2

I have forget to specifie that I would like to extend this partition "in live"

Regards

Emmanuel

Last edited by DeWaRs; 12-11-2013 at 03:46 AM.
 
Old 12-11-2013, 03:52 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
check out this link: https://www.suse.com/documentation/s...a/biuz4lz.html

text below from link above.

But you will resize it in a live server, I suggests do a testing before proceeding. Back up, back up, test and verify the back up if it is okay and do what you want. Just to be on the safe side.

Quote:

The lvresize, lvextend, and lvreduce commands are used to resize logical volumes. See the man pages for each of these commands for syntax and options information.

You can also increase the size of a logical volume by using the YaST Partitioner. YaST uses parted(8) to grow the partition.

To extend an LV there must be enough unallocated space available on the VG.

LVs can be extended or shrunk while they are being used, but this may not be true for a file system on them. Extending or shrinking the LV does not automatically modify the size of file systems in the volume. You must use a different command to grow the file system afterwards. For information about resizing file systems, see Section 5.0, Resizing File Systems.

Ensure that you use the right sequence:

If you extend an LV, you must extend the LV before you attempt to grow the file system.

If you shrink an LV, you must shrink the file system before you attempt to shrink the LV.

To extend the size of a logical volume:

Open a terminal console, log in as the root user.

If the logical volume contains file systems that are hosted for a virtual machine (such as a Xen VM), shut down the VM.

Dismount the file systems on the logical volume.

At the terminal console prompt, enter the following command to grow the size of the logical volume:

lvextend -L +size /dev/vgname/lvname
For size, specify the amount of space you want to add to the logical volume, such as 10GB. Replace /dev/vgname/lvname with the Linux path to the logical volume, such as /dev/vg1/v1. For example:

lvextend -L +10GB /dev/vg1/v1
For example, to extend an LV with a (mounted and active) ReiserFS on it by 10GB:

lvextend −L +10G /dev/vgname/lvname
resize_reiserfs −s +10GB −f /dev/vg−name/lv−name
For example, to shrink an LV with a ReiserFS on it by 5GB:

umount /mountpoint−of−LV
resize_reiserfs −s −5GB /dev/vgname/lvname
lvreduce /dev/vgname/lvname
mount /dev/vgname/lvname /mountpoint−of−LV
 
Old 12-11-2013, 04:19 AM   #5
DeWaRs
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hello,

Thanks again for your answer. Regarding the backup, no problem, I'm working on a test environment that I can crash. The problem with the link bellow is it's refer to Logical Volume which I don't use in my case

EDIT : I think I should refer to this link : https://www.suse.com/documentation/s...a/biuymaa.html, I guess I need before to extend the partition but I don't know how to do that



Regards

Emmanuel

Last edited by DeWaRs; 12-11-2013 at 04:21 AM.
 
Old 12-11-2013, 04:45 AM   #6
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
you can check gparted tool, you can install it on a live cd.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem after copying 250GB disk to 1TB disk (cannot resize the old EXTENDED) pabelmont Linux - Newbie 5 02-04-2013 08:38 AM
SUSE 11 SP2 question linux_sj Linux - Server 0 04-11-2012 12:26 PM
External USB Disk: how to boot from XP SP2 ?? lordhurukan SUSE / openSUSE 9 12-06-2007 01:27 PM
wiping an IBM SP2 disk clean zepplin611 AIX 8 05-11-2005 08:33 AM
suSE 9.2 to XP SP2 and ICS Pyr00 Linux - Networking 2 02-25-2005 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration