LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-04-2006, 02:02 AM   #1
Hondro
Member
 
Registered: Mar 2006
Location: Lithuania
Distribution: Slackware-12.2
Posts: 102

Rep: Reputation: 15
new partition in non empty hard disk


Hi, i have one hard disk which have two partitions: ext3 and swap. Is it some how possible to make new small partition from ext3, without deleting existing data in ext3?
Ext3 is used about 40%, 60% space is free.
 
Old 07-04-2006, 04:18 AM   #2
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
just resize the ext3 partition and create a new partition in the empty space from a liveCD (egKNOPPIX)
You'll probably want to resize your ext3 partition then move the swap partition in to that space and use free space at the end of the drive unless you want to edit fstab.
 
Old 07-04-2006, 04:44 AM   #3
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
Prior to anything, backup your data. You then need to unmount the filesystem you want to resize (best option here is to boot from some live/rescue cd and not to mount your system disks). In the following, replace /dev/hdxy by the exact device your partition lies on.
  1. Unconditionnaly check for errors on the filesystem (and repair):
    Code:
    fsck.ext3 -f -y /dev/hdxy
  2. Resize your ext3 filesystem (the last argument is the size, adjust to your needs, read 'man resize2fs' for more details):
    Code:
    resize2fs /dev/hdxy 45G
  3. Resize the partition with fdisk: delete the current partition and create a new one starting at the exact same block. Don't make the partition smaller than the filesystem. (my advice: make the partition a little larger than the filesystem and expand the filesystem to the full partition size once you're done by running 'resize2fs /dev/hdxy' with no arguments. It can even be done on a mounted filesystem using 'ext2online').
  4. You're done. Eventually check your filesystem again with fdisk.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Copy files from partition to partition too slow, SATA hard disk.What should I do£¿ Ryanlee SUSE / openSUSE 20 10-31-2005 08:30 AM
Installing linux on empty hard disk lngmn7 Linux - Networking 4 04-15-2005 07:24 AM
Reclaim disk partition from hard disk installation EStester Linux - Enterprise 2 03-09-2005 12:46 PM
Reclaim disk partition from hard disk installation EStester Linux - General 1 03-09-2005 12:25 PM
Hard Disk Partition nature_priyan Linux - Newbie 4 06-16-2004 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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