Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Redhat / Fedora Linux Help > hey, what would be the best way to repartition?

Forgot Password?
 Redhat / Fedora Linux Help   Help and discussion related to Redhat and Fedora Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 12-20-2008   #1 (permalink)
Just Joined!
 
Test For Echo's Avatar
 
Join Date: May 2008
Location: Israel
Posts: 37
Send a message via MSN to Test For Echo
Red face hey, what would be the best way to repartition?

i want to move space from one ntfs partition to another, my c:\ in vista is growing very small

here is some data:

Quote:
df -h

[root@Home ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
5.0G 3.4G 1.6G 69% /
/dev/sda3 190M 20M 162M 11% /boot
tmpfs 1014M 76K 1013M 1% /dev/shm
/dev/sda1 23G 20G 2.9G 88% /media/disk
/dev/sda2 269G 248G 21G 93% /media/Data
[root@Home ~]#



cat /etc/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=10

splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu

title Fedora (2.6.26.6-49.fc
root (hd0,2)
kernel /vmlinuz-2.6.26.6-49.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.26.6-49.fc8.img

title Fedora (2.6.26.5-28.fc
root (hd0,2)
kernel /vmlinuz-2.6.26.5-28.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.26.5-28.fc8.img

title Vista
rootnoverify (hd0,0)
chainloader +1


mount

[root@Home ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda3 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda1 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda2 on /media/Data type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
[root@Home ~]#

i want to move space from /dev/sda2 to /dev/sda1

how do i do that in the safest way?


thanks
Test For Echo is offline  


Reply With Quote
Old 12-20-2008   #2 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,025
Take a look at the PartedMagic LiveCD. It's a small download, quick burn to CD, and is very easy to use.

You need to have free space next to any partition that you want to expand, so you might have to shrink one or more partitions in order to gain some free space, then do some partition moving in order to get things finally settled in the way you want them.
__________________
oz

New Members: * README *
ozar is offline   Reply With Quote
Old 12-20-2008   #3 (permalink)
Linux Guru
 
Join Date: Oct 2007
Posts: 2,410
I agree PartedMagic is the best way to go if you are resizing partitions. The output of fdisk -l would also be required for further advice since we can't tell from df -h or mount if sda1 and sda2 are next to each other on the disk.
The simplest case is when they are, you need to shrink sda2, move it to make space next to sda1 and expand sda1 to take up the additional space.

Something to keep in mind is you are vulnerable to power failure etc during the partition resize, you have a not far off full 270GB partition you want to shrink. Because there is a lot of data on the partition this will take a long time - I'd expect at least several hours for this operation alone ... similar time to move the partition afterwards. If you can backup data for sda1 and sda2 at least until you have resized it will help reduce risk for you.

Given this situation I would probably try to archive data to free up disk space or move data from sda1 to sda2 to free up space.

Good luck
Jonathan183 is offline   Reply With Quote
Old 12-20-2008   #4 (permalink)
Just Joined!
 
Test For Echo's Avatar
 
Join Date: May 2008
Location: Israel
Posts: 37
Send a message via MSN to Test For Echo
thanks , here is my fdisk -l output

Quote:
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1490f981

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2946 23661568 7 HPFS/NTFS
/dev/sda2 3892 38914 281312256 7 HPFS/NTFS
/dev/sda3 2947 2971 200812+ 83 Linux
/dev/sda4 2972 3891 7389900 5 Extended
/dev/sda5 2972 3891 7389868+ 8e Linux LVM

Partition table entries are not in disk order

Disk /dev/dm-0: 5435 MB, 5435817984 bytes
255 heads, 63 sectors/track, 660 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table
there shoul'dnt be any problem with grub.conf?
Test For Echo is offline   Reply With Quote
Old 12-20-2008   #5 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,025
Partition size changes shouldn't have any effect on GRUB.

Changes to partition count and filesystem types will.
__________________
oz

New Members: * README *
ozar is offline   Reply With Quote
Old 12-20-2008   #6 (permalink)
Linux Guru
 
Join Date: Oct 2007
Posts: 2,410
Code:
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2946    23661568    7  HPFS/NTFS
/dev/sda3            2947        2971      200812+  83  Linux
/dev/sda4            2972        3891     7389900    5  Extended
/dev/sda5            2972        3891     7389868+  8e  Linux LVM
/dev/sda2            3892       38914   281312256    7  HPFS/NTFS
Order on disk is sda1, sda3, sda4, sda2 - you can see from block numbers. In order to move space from sda2 to sda1 will require you to:-
resize sda2 and move to right
move sda4 to right
move sda3 to right
expand sda1 to fill available space

You will be moving every partition on the disk ... backup data - partition moves can fail just as partition resizes can
Jonathan183 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:35 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2