Sorry it's taking so long to answer, as you may have noticed I am in a different time-zone here in Scotland!
Quote:
Originally Posted by phahn
Hi Norman,
You are making a lot of sense. Let's figure this out.
The machine had four 18GB drives. /dev/sda is the boot drive in Slot #1. The most important data is on /dev/sda/home/hahn. Some data resides on the other three drives. I removed the original 18GB drive from Slot 3, in order to partition one of the two new 72 GB drives (currently named /dev/sdc).
|
A rethink now I have more info on what you intend overall.
I would use say 55GB of the 72GB drive in slot 3 to contain the whole of /home.
I would make 17GB on it for swap --> which would not be in use <--
I would use rsync rather than dd to do the copying because it should verify what's being transferred.
Initially, after doing this there is no need to delete any of /home off sda. Just mount sdc1 at /home and what's on the old one will be hidden.
When you are happy with it you can unmount sdc1 so the old /home is visible and clear it out then remount sdc1.
I would do the same for the the other 72GB drive. On this I would enable swap.
I would create a directory to mount this second drive and, unless you do backups to some other device, run regular backups, again using rsync as rsync would only copy differences.
Once you do not need sdb you could use it as a clone of sda.
Don't know what size of swap you have on sda but you could perhaps end up with (22-17GB) on it and the same scheme on sdb.
Again I would not have swap enabled on sda but I would have it enabled on sdb, Again use rsync to keep it up to date with sda.
So :
sda O/S + programs + swap ( swap disabled )
sdb copy of O/S + programs + swap ( swap enabled )
sdc /home with data + swap ( swap disabled )
sdd copy of /home with data + swap ( swap enabled )
That way, as the kernel only uses swap when it needs to, you would not have swap on either the drive with the O/S and programs or on the drive with data.
I think this would give you the fastest and most resilient setup.
Quote:
(When I log onto the system, I want to be at /home/hahn, in its new location.)
|
It should be
Quote:
So far so good. Now, when I run experiments on /home/hahn, I want to be able to access / which has my FORTRAN compiler (in /opt) and other software and libraries. I presume all that is still on /dev/sda.
|
Yes it should be just where it was.
Quote:
Now, I want up to 22GB of swap space. Currently, there is very little on /dev/sda, but there are loads more in three big swap files on the three other drives. I add these as necessary, depending upon my experiment, with the swapon command. Let's say, for an argument, I put swap space on /dev/sda in place of /home/hahn.
|
I believe writing to a swap partition is faster than to a swap file.
If you do as I suggest above you would need to shrink the partition on sda which had /home - which I am guessing was set up as one partition using all of sda - then create a swap partition in the freed up space.
Quote:
Now, I want to have a backup boot drive. So, I take any useful data from the remaining three 18 GB drives and put that data on the new /dev/sdc.
|
That would be sdb under the scheme I suggested
Quote:
Can I also use dd to copy everything including /boot/efi from /dev/sda to /dev/sdb?
|
As I said in an earlier post I am not familiar with this architecture but I suspect it would.