LinuxQuestions.org
Visit Jeremy's Blog.
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 08-26-2011, 01:23 PM   #1
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
move partition with directory & contents to another drive.


I have a partition sda10 which is named /home partimage, it resides within my Debian logical partition, but is not added to my fstab as I prefer not to automount after login.
It's approximately taking up 400G space on my Debian hdd sda & I would like to move to sdb windows drive which has 750G unallocated space also without automounting.
Would it be easier to just create the partition & just move the directory to it?
 
Old 08-26-2011, 01:39 PM   #2
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
wouldn't the following work:

Code:
dd if=/dev/sda10 of=/dev/sdbX
 
Old 08-26-2011, 01:51 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Thank you for your response, I usually use clonezilla, never used the command line to do it.
So my question is can I take it out of logical & create & place on a primary partition.
Also does this command create the partition or does it need to be created prior to the dd command you supplied?
 
Old 08-28-2011, 08:10 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
Would it be easier to just create the partition & just move the directory to it?
This sounds ok to me, especially if you want to retain Linux perms etc (I assume you mean an ext3 or ext4 partition).
Create the new partition, mount it, mv the old dir to a new name eg /home2 on new partition, rename old to /home3, rename new to /home and reboot/test.
If ok, delete old one...
 
Old 08-28-2011, 10:12 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Would this command work, or do I need to add to the command?
Quote:
mv /home/partimage sdb2
or would the command that chickenjoy gave be better.

Last edited by EDDY1; 08-28-2011 at 10:17 PM.
 
Old 08-29-2011, 12:13 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Have the device names changed in the commands on this howto dated from 2005
http://www.linuxquestions.org/questi...ommand-362506/
Or are the commands upto date

Last edited by EDDY1; 08-29-2011 at 01:19 AM.
 
Old 08-29-2011, 02:40 AM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I've created a partition on sdb3 & am going to copy everything fro sda10 to sdb3 they are all image files I will just copy individual folders .
 
  


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
Using mv to move the contents of one directory into another apachedude Linux - Software 13 01-16-2009 08:57 AM
LXer: How to move your /home directory to its own partition LXer Syndicated Linux News 0 09-26-2007 02:11 PM
move directory to another partition jackuret Fedora 13 04-22-2007 12:16 AM
can I move the /usr directory to another partition? walterbyrd Linux - Newbie 4 07-10-2005 07:24 PM

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

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