LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making another partition from freespace (https://www.linuxquestions.org/questions/linux-newbie-8/making-another-partition-from-freespace-489198/)

DIRdiver 10-03-2006 09:21 PM

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

stress_junkie 10-04-2006 01:12 PM

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.

DIRdiver 10-04-2006 03:41 PM

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

pixellany 10-04-2006 04:07 PM

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.

stress_junkie 10-04-2006 04:23 PM

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.

jayjwa 01-16-2007 10:51 PM

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.

moxieman99 01-16-2007 11:08 PM

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.

jayjwa 01-21-2007 03:36 PM

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.


All times are GMT -5. The time now is 11:08 PM.