LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2009, 05:30 PM   #1
ermeyers
LQ Newbie
 
Registered: Oct 2009
Location: Spring City, PA
Distribution: Xubuntu
Posts: 12

Rep: Reputation: 0
Manual LVM2 config


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:
Code:
root@lts1:~# lshw -C disk                         
  *-cdrom                                                      
       ...
  *-disk:0                                                     
       description: SCSI Disk                                  
       logical name: /dev/sda                                  
       size: 8683MiB (9105MB)
  *-disk:1
       description: SCSI Disk
       logical name: /dev/sdb
       size: 8683MiB (9105MB)
  *-disk:2
       description: SCSI Disk
       logical name: /dev/sdc
       size: 16GiB (18GB)
  *-disk:3
       description: SCSI Disk
       logical name: /dev/sdd
       size: 8683MiB (9105MB)
Abbreviated:
Code:
root@lts2:~# lshw -C disk           
  *-cdrom                 
       ...
  *-disk:0                                       
       description: SCSI Disk                    
       logical name: /dev/sda                    
       size: 8683MiB (9105MB)                    
  *-disk:1                                       
       description: SCSI Disk                    
       logical name: /dev/sdb                    
       size: 8683MiB (9105MB)                    
  *-disk:2                                       
       description: SCSI Disk                    
       logical name: /dev/sdc
       size: 8683MiB (9105MB)
  *-disk:3
       description: SCSI Disk
       logical name: /dev/sdd
       size: 8683MiB (9105MB)
  *-disk:4
       description: SCSI Disk
       logical name: /dev/sde
       size: 16GiB (18GB)
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:
Code:
root@lts2:~# ls -l /dev/lts2
total 0
lrwxrwxrwx 1 root root 21 2009-09-11 15:02 root -> /dev/mapper/lts2-root
lrwxrwxrwx 1 root root 23 2009-09-11 15:02 swap_1 -> /dev/mapper/lts2-swap_1
Were these links/nodes automatically created by "vgscan --mknodes"?

I'd like to end up with the same for lts1:
Code:
root@lts1:~# ls -l /dev/lts1
total 0
lrwxrwxrwx 1 root root 21 2009-09-11 15:02 root -> /dev/mapper/lts1-root
lrwxrwxrwx 1 root root 23 2009-09-11 15:02 swap_1 -> /dev/mapper/lts1-swap_1
That's enough to start, I think.
 
Old 10-09-2009, 06:58 PM   #2
Doculus
LQ Newbie
 
Registered: Oct 2009
Distribution: Gentoo
Posts: 29

Rep: Reputation: 17
Hi,
"dd" makes a sector-to-sector copy, but you should not have any of these partitions mounted.
You maybe you should go from a livecd.

Also, do not use them after together at the same time, as they will have the same filesystem uids, and this _can_ lead to problems (not sure about this, but I would avoid).

The dev/mapper links are automatically created, but not by vgscan --mknodes, but by the udev daemon, during the boot process.
(To be more explicit by vgchange -a y). You do not need to care about. You should not create static nodes for them either, as the device minor ids can change if you add/remove volumes, and you will have a mess.

For creating the logical volumes, you should go through pvcreate/vgcreate/lvcreate commands.
See the manual of them to understand them clearly, I do not want to mislead you.

Btw. I would suggest to setup a RAID10 array with the 4 disks, it purforms _much_ better.
 
  


Reply

Tags
lvm, raid1



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
Manual NIC Config navic Slackware 4 06-13-2007 01:16 PM
Modem config manual choice error Deke1955 Linux - Hardware 0 09-20-2005 09:14 AM
Slack drops 'route' after reboot. Manual config required - but why? fireman949 Linux - Networking 1 09-07-2005 01:15 AM
Manual Config Editing for bttv sound device. cachinnare SUSE / openSUSE 4 12-23-2004 06:13 AM
manual network config chosmer Linux - Networking 3 07-26-2002 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:08 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