I’ve opensuse 11.2 installed and running. I have separate mount points for /, home, srv. I have two physical HDs of total 160gb in my system. Now my / partition is nearly full 91-93%. I’m thinking of adding another HD. I cannot figure out how to transfer data after installing the new drive. I plan to move /srv and /home from the main physical disk to the new disk and then add the space freed from under /srv and /home to the / partition. I understand the procedure how to add the drive, how to partition it and so on. I need some help in understanding how to shift the data from one physical drive to the other without losing any simlinks and data of course. I have a virtual host web server running on my machine, so you can understand how difficult it would be if I’d need to do all the linking manually again or worst case if I’d lose any data.
Thanks in advance to anyone who would help me solve this problem.
Best way is combination of dd and resize2fs. (In single user mode of course)
Thanks for your prompt response, but can you elaborate what you mean?
switch to single user mode (init 1)
copy your old partitions to new ones with dd (use ‘man dd’ to see documentation).
use resize2fs on the new partitions to expand the filesystem to the size of the new partition (use ‘man resize2fs’ to see documentation)
Thanks! I’ll check the man pages and if there will be any further questions will get back.
I would not suggest this. It would require editting fstab etc.
My 2 cents: create the partitions on the new disk. Copy over contents of /home and /srv, preserving permissions etc. Then change fstab or use Yast to mount the new partitions in /home and /srv instead of the old ones. Test thoroughly. When successful, delete old partitions. Then use a LiveCD to resize the root partition. Done so lots of times.
do you think that copying content from one disk to the other will retain the links?
How big is your root partition? have you checked to see if the usage is a bunch of temp files? You may just need to purge the tmp ditectory.
On Fri, 02 Jul 2010 13:41:47 +0000, kachora wrote for a reply:
> Thanks Knurpht!
> do you think that copying content from one disk to the other will retain
> the links?
Mostly it depends on what you want to do.
I say if you’re strictly adding a new HD for a /dev/sda, /dev/sdb, /dev/
Then format the new HD, give it a mount point, modify /etc/fstab to mount
the new HD and mount points /dev/sdc1 /home /dev/sdc2 /var.
Then once you mount the new HD, you can drop and drag folders to the new
HD, No DD necessary quick and easy.
Or mount the new HD as /home2 and /var2,
copy /home to the /home2, copy /var to /var2
Then modify /etc/fstab to mount new HD (/home2) as /home, /var2 as /var
verify then delete old HD /home and old HD /var.
Great when you need to convert from one file system to the another, ie,
reiserfs to ext4 for example.
Or if you adding a bigger HD use YaST2 Partition to clone old drive to
new HD. You can change the new HD partition sizes as necessary.
On 2010-07-02 13:41 GMT kachora wrote:
> Thanks Knurpht!
> do you think that copying content from one disk to the other will
> retain the links?
It depends on what you use to copy the files.
I use two methods for this: rsync (with appropriate options, see man) or
There is a howto on this:
(there is in openSUSE an rpm with all those howtos). You don’t need to
follow all that “howto”, but what you need is there.
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))