Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Re: File system backup / moving partitions



Scott,

Unix (and Linux) is designed to do this. It's quite 
straightforward. I did something similar not too long ago 
when I rearranged the partions on a machine. 

It used to be pretty common to have "spare" root partitions 
on servers so that the machine could be brought up quickly in case
of a disk crash. These days, most people use mirrored disks/RAID
so things are automatically kept in sync. 

You basically just have to change /etc/fstab to point the mount
points to the right partitions and tell your boot manager
which partition to boot. There may be some other details,
e.g. symbolic links /dev/cdrom to /dev/hdd or your own symbolic
links, but it should not be bad. 

You can copy the data over using tar. Just make the new
partition and mount it somewhere like /mnt/newhome. Then (as root)

# cd /usr/home
# tar cvf - . | (cd /mnt/newhome && tar xf -)

Links (hard and soft) can cause some fun, but should not be too
much of a problem with what you are doing. You can look for
links using find. 
# Soft links
find -type l
# Hard links
find -links +1 -type f

Go for it. At least with your setup, you are safe trying, as you
still have your original setup on the other disk. 

Watch out with NT, though. I think that Win2K will want to 
have its root within the first 8GB (or something like that) 
of the first disk, otherwise it can't boot. At least that used 
to be a problem with WinNT. 

Jake

--- scott in sendai <linuxdorkjp@example.com> wrote:
> Hi TLUG,
> 
>  I thought that I would post this question before I dive
> off the cliff into potential disaster with my current
> beloved RH7.2 system. 
> 
> Situation: Currently I have 3 OS's spread accross 2 hard
> drives. Win98Eng(hda), Win98Jp(hda), and RH7.2(hdb). 
> 
> Problem: I need to install win2000 server so I can have a
> "testing environment" available. (I know, it sucks, but
> until I can convince my boss to go full Linux I'm stuck
> with working with M$...)
> 
> Idea: Resize HDA partitions to make room, then move Linux
> off of HDB onto HDA, retaining current setup, wipe HDB,
> and install M$ product.
> 
> Problem: I don't know if it will work. What am I going to
> have to change in terms of fstab and mount points, etc?
> I'm pretty sure that I can create the proper partitions
> using parted on hda, so if I just create the appropriate
> partitions and then copy the contents of hdb partitions
> into hda, will the system be bootable? I thought if this
> sort of operation were possible, then people could
> potentially use the same steps to create system backups,
> like replicoaster into predetermined partitions. What do
> you all think?
> 
> Thanks,
> 
> Scott VanDusen in Sendai (but soon Tokyo)
> 
>  
> PS here is some exterraneous data about my hard disks'
> structure if it is helpful:
> Disk geometry for /dev/hda: 0.000-43979.414 megabytes
> Disk label type: msdos
> Minor    Start       End     Type      Filesystem  Flags
> 1          0.031   4502.592  primary   FAT         boot
> 3       4502.593   8918.898  primary   FAT         hidden,
> lba
> 2       8918.899  43974.799  extended              lba
> 5       8918.930  23932.771  logical   FAT
> 6      23932.802  38946.643  logical   FAT
> 7      38946.674  43974.799  logical   FAT
> Disk geometry for /dev/hdb: 0.000-29314.687 megabytes
> Disk label type: msdos
> Minor    Start       End     Type      Filesystem  Flags
> 1          0.031   4996.779  primary   ext3        boot
> 2       4996.780   9993.559  primary   ext3
> 3       9993.560  14990.339  primary   ext3
> 4      14990.339  29313.918  extended              lba
> 5      14990.370  19987.119  logical   ext3
> 6      19987.150  23987.680  logical   ext3
> 7      23987.711  26035.026  logical   linux-swap
> 8      26035.058  28082.373  logical   FAT         lba
> 
> 

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links