I've got two Ubuntu 9.04 LTSP servers, lts1 and lts2, which have been setup differently by different people. Each server has 4+ scsi disks that I'd like to setup with LVM and SW_Raid-1 (for mirroring) on disks 0-3 on each.
Abbreviated:
Abbreviated:
The first part of this problem is that lts2 server was setup with LVM on /dev/sda during install, and the lts1 server wasn't, so I need to emulate the LVM configuration of lts2 on lts1. So, first I need to move the standard install off of lts1:/dev/sda to /dev/sdd, so that I can begin a new LVM configuration on lts1:/dev/sda.
Is "dd if=/dev/sda of=/dev/sdd" a sufficient copy?
The LVM install on lts2 had created:
Were these links/nodes automatically created by "vgscan --mknodes"?
I'd like to end up with the same for lts1:
That's enough to start, I think.
Don't get me wrong - what you are looking to do here is possible, however it involves a lot of mangling that may not be obvious at first. Honestly, if at all possible it is simpler to back up the data, wipe and re-install the system the way you want it to be. I've done this type of thing on Fedora based systems and it isn't pretty.
Besides just moving the data around, you'll have to reconfigure grub to find the new location of the root partition (it will be different inside an lvm) and you'll also have to create a new initrd file with LVM/RAID modules and information. Since the system wasn't installed with lvm & raid originally it won't have lvm & raid modules in the current initrd.
You'll need to change the /etc/fstab file for all the filesystems to change them to LVM - though if you are careful to re-create the filesystem labels properly that may work ok for some of them (if they are using filesystem labels to recognize the FS at least)
You will probably also need to boot the system from a rescue CD or liveCD to do the data-migration between disks. I don't know if you even CAN do a clean copy of sda if that is where your OS is running from. I would boot from a CD, create a filesystem on /dev/sdd, and use cpio to make cpio archives of the filesystems on /dev/sda, then wipe /dev/sda and create the LVM partitions/filesystems and use cpio to put the data back. Actually - if you're booting from a CD anyway, just swap sda and sdd. Saves you the time of copying all the data since you're just going to copy it back anyway.
But be prepared to do a lot of mangling with grub and initrd files to be able to get the system to boot again.
Oh - and I also noticed your disks are different sizes - don't forget that software RAID requires the raided partitions to be the same size.
As I said at the start - it's probably simpler/faster to just back up the system and re-install it.
Cheers,
Anthony
Last edited by icefalcon; 10-21-2009 at 11:03 AM..
Hi folks,
I am trying to configure Apache webserver and also a virtual host inside this webserver.
For Global server config: /var/www/html/index.html
For virtual host config: /var/www/virtual/index.html
Both client10 & www10 are pointing to 192.168.122.10 IP address.
BUT, MY... (1 Reply)
Hi,
I am trying to find some free space on this system. The following physical volumes look empty. Would you please help me confirm this? What other commands can I use to find free space?
Thank you in advance!
# pvdisplay -m /dev/block/104:2
--- Physical volume ---
PV Name ... (3 Replies)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
I'm sure it's really easy, but I have searched on Google and on the forums and haven't found anything.
For instance, if I open the grep manual (man grep), I can't close it.
I've tried ctrl+c, ctrl+x, scrolling to the bottom of the manual.
How can I exit the manual without closing the shell?
... (8 Replies)
I have an ASCII file that I receive on a monthly bases that is fixed length. I break the file into separate files based on a 5 character numerical sequence. I have 20 different sequences I have to find.
the input file looks something like this
xy-ins 2008yuthnrlsinrthsntwilgrha33260001... (4 Replies)
I don't seem to be able to get man pages up for any command. When I try the "No manual entry for..." message is displayed. When checking my $MANPATH variable I get the following
/opt/SUNconn/man:
However, when I check this directory it doesn't exist. Searching for any man directories results... (3 Replies)