LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to enalrge partition? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-enalrge-partition-914819/)

windstory 11-21-2011 08:29 PM

how to enalrge partition?
 
How to enalrge partition?

My box is scientific linux 6.1 x64, and "fdisk -l"is this;

Code:

[root@RedLeoWebDev t1]# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1098fe58

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          61      485376  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              61        5283    41943040  83  Linux
/dev/sda3            5283        7894    20971520  83  Linux
/dev/sda4            7894      38914  249169920    5  Extended
/dev/sda5            7894        8024    1048576  82  Linux swap / Solaris


jv2112 11-21-2011 08:44 PM

http://partedmagic.com/doku.php?id=downloads

You can boot using a parted magic cd and do your work while the system is not mounted.

jmc1987 11-21-2011 08:53 PM

http://gparted.sourceforge.net/livecd.php

or any live linux distro with gparted installed such as ubuntu.

windstory 11-21-2011 10:53 PM

I've installed gparted, but there's nothing.


http://i.imgur.com/kqArO.jpg

jmc1987 11-21-2011 11:11 PM

Strange might be a bug
http://www.linuxquestions.org/questi...itions-718673/

I found this that might be related

Possible fix
http://www.rodsbooks.com/missing-parts/

This info was a 5 sec google look over and was not verified in anyways. Be sure to read it throughly and understand what your doing befor you do it. Remember I googled this in 5 secs what can you google with time ;).

EDDY1 11-21-2011 11:20 PM

You shold parted-live-cd which you have to boot to.
Also which partition are you enlarging & which partition are you taking the space from??

syg00 11-21-2011 11:25 PM

With that layout I'm surprised anything (fdisk included) will talk to it.
You only have 30401 cylinders - have a look where the extended partition (allegedly) finishes ...

libparted ain't going to like that. Personally I'd delete the swap and the extended and see what gparted thinks then. Use it to re-allocate as needed.
Make sure fstab gets fixed before attempting a re-boot (after playing in gparted).

BTW the "does not end on cylinder boundary." is informational only - allocation units have changed since the disk was originally set up.

EDDY1 11-21-2011 11:40 PM

The Op can also move sda5 to the right then shrink sda4 from the left using gparted-live

windstory 11-22-2011 12:05 AM

jmc1987/ I tried, but there is not "fixparts" command.

EDDY1/ At livecd gparted shows same state.
I want to enalrge "/" partition to 50G.

syg00/ This hard disk is 350G.

Quote:

Personally I'd delete the swap and the extended and see what gparted thinks then. Use it to re-allocate as needed. Make sure fstab gets fixed before attempting a re-boot (after playing in gparted).
The fstab file is here:
Quote:

UUID=6d68679a-06be-435a-a920-e7487bd5a7a5 / ext4 defaults 1 1
UUID=9fd10fbc-ca77-40d3-ac54-3bd21476b716 /boot ext4 defaults 1 2
UUID=4c10acd9-15a4-40d3-8a24-f6d1e0204f62 /var ext4 defaults 1 2
UUID=438d5503-5e00-45b3-af15-1bab909900de swap swap defaults 0 0
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
Quote:

BTW the "does not end on cylinder boundary." is informational only - allocation units have changed since the disk was originally set up.
How to fix "does not end on cylinder boundary"?

EDDY1 11-22-2011 12:27 AM

THe lead ink Jmc provided should be read more thoroughly especially
Fixing the Problem the Hard Way
http://www.rodsbooks.com/missing-parts/

jmc1987 11-22-2011 12:52 AM

Quote:

Originally Posted by EDDY1 (Post 4530419)
THe lead ink Jmc provided should be read more thoroughly especially
Fixing the Problem the Hard Way
http://www.rodsbooks.com/missing-parts/

updated my original post.

Yea your right its a quick google and I meant for OP to read it and understand it. I can't say that it works because I haven't personally tested it.

So note to all who tries everything people post. Read what it is doing and understand it.

Happy trouble shooting.


All times are GMT -5. The time now is 10:58 PM.