LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2007, 08:20 PM   #16
phahn
Member
 
Registered: Apr 2002
Location: Philadelphia
Posts: 48

Original Poster
Rep: Reputation: 15
Getting closer


Hi Simon and Norman,

Thanks to both of you.

Quote:
Originally Posted by Simon.
You need to do a test run and keep a log of the useage statistics to be sure - find out how much the RAM and swap actually get used. Adjust accordingly. At the moment, your risc assessment/response seems reasonable for the equipment you have. But, if you double your RAM, you will be surprised at the performance boost.
I wish I could afford more RAM, but it costs too much and the machine is old and out of warranty. The school is getting a 20GB machine. If I need more memory, I could probably convince them to add memory to their machine.

Quote:
BTW: you are planning to copy the MBR over directly? Why not just install the bootloader to the MBR? (dd is the usual method)
You lost me here. I thought if I dd everything in /boot/efi that would make /dev/sdc bootable. Please forgive my lack of understanding.

Quote:
... note the "vfat" fs specified here? This means that the old efi partition was type "ef" in fdisk. You used "ee" for the new one. The ee type needs to be formatted, ef type gets fat32... this also tells you why explicitly formatting fat32 didn't work.
I think I understand. No changes necessary suggested?

Quote:
Your main issue copying the files will be that ext3 has permission-based access control, and fat32 dosn't. You may want to specify the uid and gid for the copied files, explicitly.
/boot/efi stuff is at the root level, so I presume both uid and gid are root for everything. I don't know how to add this to the dd command, but it should be easy to make the changes manually after the move, considering that there are only a few subdirectories.

Quote:
Note: you could have just added the drive to the existing one... you can also add extra partitions to your overall swap space or use swap files instead.

You may want to consider this post-migration - repartition the old drive for swap, and leave it in place. You get faster performance for processes that access swap and root a great deal (i.e. maths) as the heads don't have as far to move.
These suggestions are good, but could complicate my plans: After moving /dev/sd3 to the disk1 position, I have plans to duplicate it on another 72 GB drive in the disk 3 position (as a bootable backup). As Norman noted, that drive would need new /etc/fstab entriess to make it bootable. I have been doing this for years on my Sun workstations and would like to do the same thing on the 7150. Any other drives would not need to be backed up.

Quote:
You may want to consider this post-migration - repartition the old drive for swap, and leave it in place. You get faster performance for processes that access swap and root a great deal (i.e. maths) as the heads don't have as far to move.
Since I avoid swapping as much as possible, I think that this may not be an issue.

Again, many thanks,

Peter
 
Old 11-27-2007, 03:13 PM   #17
linuxonbute
Member
 
Registered: May 2005
Location: North lincolnshire
Distribution: Mint 18 Cinnamon
Posts: 47

Rep: Reputation: 19
I have to admit I am not familiar with this type of machine. I have used mainly 32Bit single processor PC's and spent a little with HP machines running HP-UX ( but that was some 10 years ago. )

Anyway, if the performance needs to be improved I could suggest that you leave most of your setup as it is. I don't know where your data is kept or if a lot of data is written and read. However if it is then I think you can improve performance by having your data on the new disc and swap and the O/S itself on the 18Gig disc.

Suppose your data is on /Data

You could create a new partition using all of sdc ( sdc1 )
create /newdata and mount sdc1 there.
Then use, say, rsync to copy everything from /Data to /newdata
Verify it then delete all on /Data, unmount sdc1 and remount it at /Data.

I think that would mean a lot less work. It would also leave you with more space on sda and a lot of room on sdc for any extra data you might generate.

hth,
Norman
 
Old 11-27-2007, 07:41 PM   #18
phahn
Member
 
Registered: Apr 2002
Location: Philadelphia
Posts: 48

Original Poster
Rep: Reputation: 15
OK, let's take this a bit further.

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).

Lets say, I take your advice and leave the 18GB /dev/sda as the boot drive. Then, I repartition and format the 72 GB /dev/sdc as one large partition. I then move /home/hahn to /dev/sdc. (When I log onto the system, I want to be at /home/hahn, in its new location.)

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.

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.

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.

So, we have everything on the 18GB drive in Slot #1 and the 72GB drive in Slot #3.

How, I want a bootable backup drive in Slot #2. For that I choose one of the remaining old 18GB drives. And, I want a backup drive for /dev/hdc. So, I put the second new 72 GB drive in Slot #4.

I am pretty sure that I can use dd to copy everything on /dev/hdc to /dev/hdd. Can I also use dd to copy everything including /boot/efi from /dev/sda to /dev/sdb?

Is this all still a good idea?

Hope you are still interested.

Thanks,

Peter
 
Old 11-28-2007, 03:09 PM   #19
linuxonbute
Member
 
Registered: May 2005
Location: North lincolnshire
Distribution: Mint 18 Cinnamon
Posts: 47

Rep: Reputation: 19
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 View Post
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.
 
Old 12-01-2007, 05:52 PM   #20
phahn
Member
 
Registered: Apr 2002
Location: Philadelphia
Posts: 48

Original Poster
Rep: Reputation: 15
Hi Norman,

It took a couple of days, but I finally did (almost) everything you suggested. /dev/sda is still my system drive. Though it is one of the discarded 18GB drives with a new installation of RH Enterprise 3.0.

/dev/sdc and /dev/sdd are identical 72GB drives, each containing two partitions: one partition is my home directory and the other partition is 17GB swap space. The swap space in /dev/sdc is activated. And the home directory in /dev/sdc is mounted at /home.

All I need to do is

1. set up the /etc/hosts and /etc/defaultrouter files, so I can communicate
2. re-install my FORTRAN compiler
3. clone /dev/sda to /dev/sdb

I am a little worried about the last item, since I want /dev/sdb to be bootable. But, I don't want the boot manager to get confused by two bootable hard drives.

Thanks for all your help and ideas.

Peter
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IBM x3200 & Centos 4.4 with IBM 36/72GB DDS/5 choyyw@gmail.com Linux - Server 0 04-10-2007 02:30 AM
rh3-2.4.21.32 jyung1982c Linux - Enterprise 3 06-21-2006 05:19 PM
rh3 + 4gig memory saustin99 Red Hat 1 08-25-2005 04:52 PM
IPTables on a RH3 box tarballed Linux - Security 5 12-06-2004 10:24 PM
Trouble installing Conexant 56K SoftModem on SUSE Personal 8.0 with 2.4.18GB SMP andavm Linux - Hardware 4 01-05-2004 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration