LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2006, 02:17 PM   #1
APB_4
Member
 
Registered: Nov 2004
Distribution: KDE Neon User edition; Kubuntu; OpenSUSE Leap
Posts: 292

Rep: Reputation: 31
Copying hda3(~5GB) to hda1(~10GB) nearly fills hda1


I recently ran out of space on my root partition but I've liberated a couple of x windows partitions. Now what I want to do is copy everything on the current root hda3 to hda1, I've tried using dd and cp but both have resulted in leaving approximately the same amount of free space left on hda1 as on hda3. Eg. Before: hda3 used space=4.75GB; hda1 used space = 0
After: hda1 used space = 9.98GB, free space = 17.42MB; hda3 free space=17.42MB
Anybody got any ideas why this happens and what I can do to stop it?
 
Old 03-01-2006, 02:32 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 168Reputation: 168
Are the source and destination filesystems both native linux filesystems (ext2/3, reiserfs, etc.)? If so, can you post the cp command that you used? If /dev/hda3 was mounted on /mnt/src and /dev/hda1 was mounted on /mnt/dest you should just need something like:
Code:
cp -a /mnt/src/* /mnt/dest
 
Old 03-01-2006, 05:59 PM   #3
APB_4
Member
 
Registered: Nov 2004
Distribution: KDE Neon User edition; Kubuntu; OpenSUSE Leap
Posts: 292

Original Poster
Rep: Reputation: 31
Thanks for the reply gilead. They are both reiserfs. The cp command was
Code:
cp /dev/hda3 /dev/hda1
Also if you're interested the dd commands were similar although I tried several they were along the lines of
Code:
dd if=/dev/hda3 of=/dev/hda1 bs=4096
When I tried a copy from mounted filesystem to mounted filesystem I got a load of crap about things in /sys and /proc which is why I changed to using /dev/hda(n)

Last edited by APB_4; 03-01-2006 at 06:00 PM.
 
Old 03-01-2006, 07:12 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,160

Rep: Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981
Quote:
dd if=/dev/hda3 of=/dev/hda1 bs=4096
This just basically copied byte for byte hda3 into hda1. So hda1 is an identical filesystem of hda3 which is why you still have the same amount of free space. Using the cp command for filesystems that are not the same size will work better but you will need to reformat hda3.

But why not use both hda1 and hda3. Is your entire install one partition or several? If you need more space in /usr or /var or /home for example just copy the that directory into the new partition and create an entry in fstab to mount it as such.

BTW.
http://wiki.linuxquestions.org/wiki/Dd
 
  


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
Resizing hda1 bulldogzerofive Linux - Newbie 3 01-20-2005 03:56 PM
create several partitions between hda1 and hda3 tcma Linux - General 7 09-15-2004 12:18 PM
moving hda3>hda1 repartition rh9 wolfe2554 Linux - Software 0 05-13-2004 02:08 AM
hda1, hda2 and hda3.. partitioning order concoran Linux - Software 4 10-16-2003 12:26 AM
\dev\hda1 ?! maoinchina Linux - General 6 10-06-2003 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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