LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-23-2007, 03:48 AM   #1
Ejdaha
Member
 
Registered: Jan 2007
Posts: 39

Rep: Reputation: 15
How change space usage of file systems


Hi all
I issue
df -h

And I get:

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 4.0G 2.2G 1.6G 59% /
/dev/sda1 99M 42M 53M 45% /boot
/dev/sdb1 17G 1.4G 15G 9% /data


I want to give 5 G from /dev/sdb1 to /dev/sda2

How can I do it??
Thanks...
 
Old 01-23-2007, 04:42 AM   #2
avallach
Member
 
Registered: Sep 2006
Location: Silesia
Distribution: Debian GNU/Linux 4.0, ArchLinux, OpenBSD
Posts: 190
Blog Entries: 2

Rep: Reputation: 31
As far as I understand you.. You want to repartition your hard disk without loosing your data... For things like this I always use programs like Partition Magic or Paragon Hard Disk Manager.. But QtParted shall handle with this as well..
I'm not sure if QtParted will save your data. Remember that always such repartitioning maybe risky.

Last edited by avallach; 01-23-2007 at 04:44 AM.
 
Old 01-23-2007, 08:47 AM   #3
Ejdaha
Member
 
Registered: Jan 2007
Posts: 39

Original Poster
Rep: Reputation: 15
There is no Linux standart program ??
 
Old 01-23-2007, 09:50 AM   #4
avallach
Member
 
Registered: Sep 2006
Location: Silesia
Distribution: Debian GNU/Linux 4.0, ArchLinux, OpenBSD
Posts: 190
Blog Entries: 2

Rep: Reputation: 31
There are many programs to change your partitions like cfdisk, and QtParted but they have a bit limited features.
Here is something about resizing Ext3 using resize2fs program
Ext3 resizing

No linux doesn't have it's standards...
 
Old 01-23-2007, 10:53 AM   #5
hazmatt20
Member
 
Registered: Jan 2006
Distribution: FC5, Ubuntu
Posts: 126

Rep: Reputation: 15
It's a very risky thing to try. You would be much better off starting over from a clean install. In either case, make sure you backup your data.
 
Old 01-23-2007, 11:26 AM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Also, the fact that you want to take data from sdb1 and give it to sda2 is impossible for one easy reason, they are separate disks!

This could be done with LVM, which is logical volume management, but that has to be setup before the switch is made. You can repartition, and just make things setup differently, but with your current setup, you're not going to be able to transfer from one disk to another. You should setup LVM if you reinstall, so you can shuffle around disks in the future.

Peace,
JimBass
 
Old 01-23-2007, 11:42 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,702

Rep: Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749
As stated what you want to do is impossible but you can move a subdirectory like /usr, /var or /home to a seperate partition on your 2nd hard drive which will free up space on your / partition. As suggested you can use qtparted. Be sure to unmount /data prior to resizing and backup up any data you can not afford to lose. However, it will depend if your 2nd drive contains more then one partition.

http://www-128.ibm.com/developerwork...satmigrat.html

Last edited by michaelk; 01-23-2007 at 11:45 AM.
 
Old 01-24-2007, 12:30 AM   #8
Ejdaha
Member
 
Registered: Jan 2007
Posts: 39

Original Poster
Rep: Reputation: 15
All are excellent replies ..

Thanks..
I'll try to insert another hard drive and copy some files there
 
Old 01-24-2007, 01:35 AM   #9
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
I suggest that you get the GParted LiveCD, and use that. You must ensure that any partitions you are resizing are unmounted when you resize them - and you can't unmount /. If you use this LiveCD, then you don't have to worry about it, because the partitions are not mounted by default.

I recently did some major repartitioning with GParted, and did not lose any data, but MAKE SURE YOU BACKUP.

Also, look into setting up LVM.

--Ian
 
  


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
How do i change spaces inside a txt file, and replace space with backslash \? repolona Linux - Newbie 1 05-24-2006 05:08 AM
How to list file space usage estimate (du), SPECIFIED BY RANGE tsilok Linux - Newbie 6 10-24-2005 04:56 AM
expanding file systems and disk space jmickens Linux - Enterprise 4 10-13-2005 12:04 PM
Space Allocation for File Systems majicrobot Linux - Hardware 1 09-20-2004 05:06 PM
dhcpcd shoots up systems usage ws2030 Linux - Networking 0 06-25-2003 03:53 PM


All times are GMT -5. The time now is 03:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration