Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd June 2008, 18:18
Pasco Pasco is offline
Member
 
Join Date: Aug 2005
Location: Switzerland
Posts: 94
Thanks: 11
Thanked 0 Times in 0 Posts
Default How To Set Up Software RAID1 On A Running System (Incl. GRUB Configuration) (Debian E

Hi folks

I started with the mentioned how-to, but I didn't get far on my debian etch Server.

The problems are starting already here:

Quote:
server1:~# fdisk -l

Disk /dev/sda: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 18 144553+ 83 Linux
/dev/sda2 19 80 498015 82 Linux swap / Solaris
/dev/sda3 81 652 4594590 83 Linux

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
server1:~#
I got the following output on my server, even tough I followed the "perfect setup for debian etch server":

Quote:
fdisk -l

Disk /dev/hda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 48527 389793096 83 Linux
/dev/hda2 48528 48641 915705 5 Extended
/dev/hda5 48528 48641 915673+ 82 Linux swap / Solaris

Disk /dev/hdc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 48527 389793096 83 Linux
/dev/hdc2 48528 48641 915705 5 Extended
/dev/hdc5 48528 48641 915673+ 82 Linux swap / Solaris
The main problem is, that my second partitions are both "Extended" and not like in the how-to "Linux swap / Solaris" and "Linux".

Do anybody knows what I did wrong or if I could set up the RAID 1 even tough? Because I got problems in the following step:

Quote:
fdisk /dev/sdb

Command (m for help): <-- m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): <-- t
Partition number (1-4): <-- 1
Hex code (type L to list codes): <-- L

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / .
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor
16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3 75 PC/IX
Hex code (type L to list codes): <-- fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): <-- t
Partition number (1-4): <-- 2
Hex code (type L to list codes): <-- fd
Changed system type of partition 2 to fd (Linux raid autodetect)

Command (m for help): <-- t
Partition number (1-4): <-- 3
Hex code (type L to list codes): <-- fd
Changed system type of partition 3 to fd (Linux raid autodetect)

Command (m for help): <-- w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
server1:~#
I get following error at the second partition:

Quote:
Command (m for help): t
Partition number (1-5): 2
Hex code (type L to list codes): fd
You cannot change a partition into an extended one or vice versa
Delete it first.
Any ideas?
Reply With Quote
Sponsored Links
  #2  
Old 4th June 2008, 19:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Run
Code:
fdisk /dev/hdc
Instead of
Code:
Command (m for help): <-- t
Partition number (1-4): <-- 2
you type
Code:
Command (m for help): <-- t
Partition number (1-4): <-- 5
because your second partition is on/dev/hdc5.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Pasco (11th June 2008)
  #3  
Old 5th June 2008, 00:11
Pasco Pasco is offline
Member
 
Join Date: Aug 2005
Location: Switzerland
Posts: 94
Thanks: 11
Thanked 0 Times in 0 Posts
Default

Oh, I got it, thanks Falko.

So have I got it right, that in the how-to there are 3 partitions and on my system are only 2 partitions. I don't have to do anything with the "Extended"-Partition?

Thanks a lot!
Reply With Quote
  #4  
Old 5th June 2008, 17:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

That's right - although I haven't tried this myself.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 11th June 2008, 10:20
Pasco Pasco is offline
Member
 
Join Date: Aug 2005
Location: Switzerland
Posts: 94
Thanks: 11
Thanked 0 Times in 0 Posts
Default

It worked like a charm! Thanks again Falko!

I can confirm that the how-to also works with the partitions described from me in this thread (2 Partitions with Extended Version). So I got only md0 (/ and /boot together on one partition) and md1. Works flawlessly!
Reply With Quote
  #6  
Old 7th December 2012, 19:54
pligor pligor is offline
Junior Member
 
Join Date: Dec 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Arrow So sda1 and sda5 only?

I know this is an old post but some things have changed since 10.04

I am currently using 12.04
By default with a regular ubuntu installation in a pc with a single drive is to have the partitions: the main partition (sda1) and an extended partition (sda2) which contains the swap partition (sda5)

Can anybody confirm that is only need to create two (and not three) raid-arrays, md1 and md5 which correspond to sda1 <-> sdb1 and sda5 <-> sdb5 ?

Please let me know if you need further information!
Thank you
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proftpd + MySQL virtual users, can't connect geekman HOWTO-Related Questions 28 27th September 2010 18:03
Installing Debian Etch From a Windows System - Error bluegrass Installation/Configuration 2 24th October 2007 07:28
Advice on how to setup Lintrack As A LAN Gateway And An OpenVPN Bridge eddiequek HOWTO-Related Questions 0 12th July 2007 10:38
Bind Failed christoph2k HOWTO-Related Questions 4 28th April 2007 00:57
newbie ububtu 6.0.6 error PHP binary line 816 davidsky73 Installation/Configuration 8 17th September 2006 11:51


All times are GMT +2. The time now is 02:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.