Moving from 6gb drive to 2gb???

Phimp

Gawd
Joined
Dec 9, 2006
Messages
596
Openfiler is installed on a 6GB drive.
Across all partitions only about 1 GB is actually being used.
I just got a 2GB CF card and an IDE>CF adapter to replace it.

Can I just recreate the partitions on the 2GB card (with the / partition obviously being smaller) and while logged in as root simply copy all of the files over to the 2gb card partitions? Would permissions and such remain intact would this boot? Or am I just dreaming of simple ways.

Otherwise, I guess I'll have to reinstall on the 2GB card from scratch (which is a pain cuz I'd have to connect a cdrom and all that crap), then load the saved config file from my current setup, and hope my 3x750gb array still works =S
 
If you boot a LiveCD (or any other way of not running the file system you want to copy) then you can just run cp -PR --preserve=all /source /destination
Also make sure to rerun grub to update the MBR on the CF drive.
The problem with copying a running file system is you'll get all kinds of shit from /proc and /dev being mounted
The "less hackish" way of doing this is to resize your 6gb down to the same number of sectors as the 2gb partition and dd it over. This will preserve the order of files on disk, and you should end up with less fragmentation.
 
Back
Top