LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-03-2006, 09:21 PM   #1
DIRdiver
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Rep: Reputation: 0
Making another partition from freespace


Hi say I have /dev/hda1 that is an ext3 partition already but say has 12 Gig available disk space , is there away to make another partition out of that free space without moving data of of it , so just using some of the free space available..

TIA
 
Old 10-04-2006, 01:12 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You can use parted or qtparted to resize the ext3 partition, then use cfdisk or fdisk to create a new entry in the partition table for the new partition.
 
Old 10-04-2006, 03:41 PM   #3
DIRdiver
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks stress junkie , so how do I know what block to start at though ? Can you give me an example cli and how one may determine which block or inode to start the new partition at ?
TIA
 
Old 10-04-2006, 04:07 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by DIRdiver
Thanks stress junkie , so how do I know what block to start at though ? Can you give me an example cli and how one may determine which block or inode to start the new partition at ?
TIA
You don't need to work at that level. Using something like gparted, you simply tell it to resize the partition.
 
Old 10-04-2006, 04:23 PM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
I used qtparted. That gives you a GUI interface. I just told it what partition to resize and I told it what I wanted the new size to be. When I made the new size too small it just gave me an error. When I made the new size to something that qtparted could do correctly then it went ahead and resized the partition.

Note that qtparted may not be able to recover all of the free space on the existing partition. In my case I had a 40 GB partition with NTFS. The Windows software only required 5 GB but the smallest size that qtparted could make this partition was 16 GB. So there is still 11 GB on the Windows partition that is free but qtparted couldn't make it available.
 
Old 01-16-2007, 10:51 PM   #6
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 786

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Originally Posted by stress_junkie
You can use parted or qtparted to resize the ext3 partition, then use cfdisk or fdisk to create a new entry in the partition table for the new partition.
Just how dangerous is this? I've wanted to do it for awhile but I've been deathly afraid. Considering this setup...


Code:
Filesystem         Mount               Megs     Used    Avail %Used fs Type   
/dev/hda1          /                36784.6   8469.7  26416.1  28%  ext2      
configfs           /config              0.0      0.0      0.0   0%  configfs  
devpts             /dev/pts             0.0      0.0      0.0   0%  devpts    
shm                /dev/shm           248.1      0.0    248.1   0%  tmpfs     
proc               /proc                0.0      0.0      0.0   0%  proc      
usbfs              /proc/bus/usb        0.0      0.0      0.0   0%  usbfs     
sysfs              /sys                 0.0      0.0      0.0   0%  sysfs     
securityfs         /sys/kernel/sec      0.0      0.0      0.0   0%  securityfs
...you can see hda1 is the full system basically. I wasn't thinking when I cut up the partitions, and now I'd at the very least like to cut out a chunk for /home and make it an ACL'ed journaling system (maybe XFS). Best case would be /home separate and also /tmp, /var/tmp on their own partitions.

I'd like to hear from actual success (or failure!) cases doing this sort of thing, because I don't have room to mess up: everything was/is compiled/built here so there is no OS CD to restore from. I'll most likely be using GNU parted.
 
Old 01-16-2007, 11:08 PM   #7
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 425

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by jayjwa
Just how dangerous is this? I've wanted to do it for awhile but I've been deathly afraid. Considering this setup...

...


I'd like to hear from actual success (or failure!) cases doing this sort of thing, because I don't have room to mess up: everything was/is compiled/built here so there is no OS CD to restore from. I'll most likely be using GNU parted.
------------------
ALWAYS back up your data. You can reinstall any Linux kernel, or distribution, or application, or all three for that matter, with minimal effort compared with trying to rescue a hard drive that you toasted with a resize that went pear shaped, if in fact, you could rescue your data.

If you can afford to trash things during experimentation, fine, go for it and tell us all what you did and how and the results. Otherwise, resize after backups. Practice safe computing.
 
Old 01-21-2007, 03:36 PM   #8
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 786

Rep: Reputation: 250Reputation: 250Reputation: 250
I think I'll hold on this for now, maybe figure out something using NFS built-in to a rootdisk/bootdisk combo, or possibly even remote tar.
 
  


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
making new partition tavixor Slackware 6 04-04-2005 12:36 PM
check freespace and something like treesize ninmonkeys Linux - General 1 11-09-2004 01:22 AM
Anyone get Freespace 2 working? badmofo666 Linux - Software 8 10-21-2004 12:06 PM
Partition Magic eval not making partition SidA Fedora 7 03-16-2004 05:32 AM
making a new partition zexter Linux - Software 1 12-03-2003 06:26 AM

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

All times are GMT -5. The time now is 09:02 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