You are not logged in.

#1 2009-09-23 17:00:42

pritchard92
Member
Registered: 2009-06-19
Posts: 62

Moving a large directory to a new partition. How can I do this well?

I have a small home server. I use it mainly as a torrent box, and extra storage. I only started this as a little project, but the advantages of a small server hit me, and I now use it all the time.

I have all my media (movies, music, torrents just after download) in a /server directory, simply because this was a "I wonder if i could" project, and that was just faster. However, I'd like to move it to it's own partition, incase I bork up my Arch installation. This will also make backups a little easier. What is the best way to do this?

I was thinking that I could:

- Use a LiveCD to create a new partition (Filesystem ideas?) large enough to hold /server.
- I could then move the contents of /server to the new partition, and have it mount under /server, so I wouldn't have to rewrite scripts that I've written for maintenance.
- I would then boot back into the LiveCD, and extend the /server partition to fill up the rest of the space.

Would this work? I don't want to corrupt all my media sad.
Also, I have an XP installation on the server. However, I NEVER use it. It's taking up 30GB, and I would like to nuke it. Would this just be a case of deleting it, and moving partitions about? There are a few problems with this though:

- The windows installation is the first partition.
- I installed grub on this partition. I had to, so that I'd be able to boot into windows.

Ideas are welcome smile. Id like to do this in the most efficient way possible.
Thanks smile

Offline

#2 2009-09-23 17:32:10

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Moving a large directory to a new partition. How can I do this well?

Perhaps gparted is helpful for you...........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2009-09-23 18:17:57

pritchard92
Member
Registered: 2009-06-19
Posts: 62

Re: Moving a large directory to a new partition. How can I do this well?

lilsirecho wrote:

Perhaps gparted is helpful for you...........

I know. Thats the liveCD i meant. However, wont the constant resizing, moving and deleting cause integrity problems? Also, how can I go from having grub installed on the windows partition to having it on it's own partitioning? Is it just a simple case of moving the grub stuff onto it's own partition, and set that partition to boot?

Offline

#4 2009-09-23 21:02:38

pritchard92
Member
Registered: 2009-06-19
Posts: 62

Re: Moving a large directory to a new partition. How can I do this well?

Ahhh HELP.

Was using gParted, and really messed up. Made the /boot partition, but when I was moving the arch linux install partition, it said it was done, then gParted closed itself. I couldnt then access gParted until i rebooted back into the liveCD. When I got in, gParted couldnt read my installation's filesystem type! I think it's now corrupt!

Ideas? I've never had to rescue something like this before, so I have no idea!

Offline

#5 2009-09-23 21:30:44

pritchard92
Member
Registered: 2009-06-19
Posts: 62

Re: Moving a large directory to a new partition. How can I do this well?

I can't get access to it at all. Fsck won't touch it. Ideas, please?

Offline

#6 2009-09-23 21:34:41

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: Moving a large directory to a new partition. How can I do this well?

This might solve your problem: http://www.cgsecurity.org/wiki/TestDisk
If you did not write anything to the disk after the "crash", Testdisk can and will recover your old partition table, or help you in backuping what can be recovered from the old partitions.


In love I believe and in Linux I trust

Offline

#7 2009-09-23 22:09:18

pritchard92
Member
Registered: 2009-06-19
Posts: 62

Re: Moving a large directory to a new partition. How can I do this well?

Thank you for your reply! Got an idea as to how I'll run this, since I can't boot into linux?

EDIT://

Just read that testdisk is included in Knoppix. Just downloaded Knoppix. Ill burn it to disk and boot to it tonight, and have a tinker. Thank you so much.

Last edited by pritchard92 (2009-09-23 22:10:30)

Offline

#8 2009-09-23 22:13:11

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: Moving a large directory to a new partition. How can I do this well?

I hope it will solve your problem. Have a backup disk at hand just in case the old part-table is unrecoverable, so you can save your data on another drive.


In love I believe and in Linux I trust

Offline

#9 2009-09-23 22:18:42

pritchard92
Member
Registered: 2009-06-19
Posts: 62

Re: Moving a large directory to a new partition. How can I do this well?

Thanks alot ckristi. Will do. smile

Offline

Board footer

Powered by FluxBB