You are not logged in.
I've got a problem. I bought a new hard disk for my laptop. I copied content of my old home directory (on separate partition with ext3fs, approx. 17GB) using dd to a file.
dd if=/dev/hda6 of=home.img
Then a backed the file on an external hdd.
When I had installed new hdd and arch, I copied the file to new home partition (also ext3fs, approx. 40 GB).
dd if=home.img of=/dev/hda6
And here comes the problem. The home partition reports havimg just 17GB (as the old one).
Can I fix it somehow? Is there any other way to copy content of whole partition without this problem?
Offline
Briefly, dd created an image of your old partition, and that image will always be 17GB - there's nothing you can do about that. If you still have the old disk, mount it somewhere and do one of the following:
- copy the contents using cp -a
- archive the contents using tar
Either of these methods will allow you to restore to the larger partition.
If you no longer have the old disk, or can't mount it anywhere, you can always create another partition with the unused 23GB, and use it that way.
Offline
those are valid suggestions, tomk. i think you forgot that you can mount a drive image though
first, reformat your /home directory as desired, then do the following:
mount -t ext3 home.img /mnt -o loop
cp -a /mnt /home
Offline
I recommend to use rsync -a over cp for such tasks.
Offline
Hi,
i think you can change the partition size using cfdisk and then resizing your ext3-partition with
resize2fs
.
Have look at the manpage for the options.
For the next backup you should use tar.
Greets
Sunnemer
Offline
Consider using dump (in extra) instead of dd. It's the unix-way of back-up .
Offline
those are valid suggestions, tomk. i think you forgot that you can mount a drive image though
I did indeed - thanks.
Offline
Thak you all, for your help. Arch community is really great!
As I had already deleted the .img file I copied content out using rsync -a, formated partition and rsync -a back. So it's working.
ota
Offline