Ubuntu Servers :: Converting Single Disk LVM To RAID1 LVM (grub)
May 5, 2010
I have an Ubuntu Server on (8.10) running under Citrix XenServer (though that shouldn't make a difference).
I installed on a single disk:
xvda1 - 200 MB - /boot
xvda2 - 9.8 GB - LVM (ubuntu-base)
The LVM is:
swap - 1.0 GB
root - 8.8 GB - /
I have successfully gotten this converted to RAID1 by adding a new drive (xvdb) and following the Debian howtoforge article [URL]
What I have not been able to do, is get grub working properly.
If I fail xvdb and reboot the system, everything comes up and I can reboot and run.
If I fail xvda and reboot the system, XenServer gives me a bootloader error. i.e.: no grub
If someone has done this, can they tell me what grub commands to run to get a successful boot of the primary disk fails?
View 1 Replies
ADVERTISEMENT
Apr 5, 2011
I recently had an issue where one of my RAID1 configured drives died on a Debian box. By die, I mean after post, I am presented with a black screen and flashing cursor, nothing more. I booted into a knoppix shell and did:
mdadm --assemble /dev/md0 --run -u <UUID of the only working drive> /dev/sda1
I could then 'mount /dev/sda1 /mnt/' and see all the contents as I should be able to. However, I cannot boot from this device by itself for some reason. I have reinstalled grub 'grub-install --recheck --rootdirectory=/mnt /dev/sda1' #something like that, can't remember the exact --rootdirectory command without the switch. I restarted, with the failed drive unplugged, and again, I'm faced with the black screen, flashing cursor.
View 1 Replies
View Related
May 3, 2011
im on 10.10(desktop) and mdadm was v2.8.1 from 2008, very out of date so i tried 3.2.1 -> no change. mdadm raid1 read speeds are the same as single disk. note i used the tests in the disk utility benchmarking tool at first --these showed raid 5 atleast to be much better but when i tried dd reads raid5 dropped off with larger data to almost the same (slow) speed as raid1. compare:
[code]....
using two partitions will be enough to show raid1 performs at single disk speed. I dont really want to use a 4 disk raid0 just to get the read speed i should be able to get with raid1 as i dont really care about the size loss. I would of course use raid10 but i have found this suffers from the same problem (achieve same read speed as 2 disk stripe). So whilst im shocked others aren't reporting this, unless there is some obscure reason why my system would give these results i think raid1 in not behaving as it should.
View 6 Replies
View Related
Dec 7, 2010
Just finished installing F14 with RAID1 setup for 2 hdd (SATA''s). Entire drives are mirrored, including SWAP. As I had done in the past, I was planning on installing grub on MBR of 2nd hdd. In prep for this I did the following to locate the grub setup files:
grub> find /grub/stage1
find /grub/stage1
(hd0,1)
[code]....
I was surprised, expected to get (hd0,0) & (hd1,0), not (hd0,1) & (hd1,1)
running "fdisk -l" I get:
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
[code]....
MBR is the first 512 bytes of the drive. Each partition has a boot sector. In my case grub stage 1 is on 2nd partition of sda & 2nd partition of sdb. What i dont understand is how grub stage 1 can be on sda2 & sdb2, since I am assuming that sda1 & sdb1 would be the first partitions of the drives & therefore contain the MBR's. Maybe this might be because sda1 & sdb1 are SWAP partitions?
View 5 Replies
View Related
Apr 9, 2010
I was installing Ubuntu 9.04 64bit server from the CD on a machine that I normally run ESXi on. I wanted to test disk speed on a direct install vs. the install in ESXi, so I installed a 4th hard disk, shutdown ESXi, and installed Ubuntu directly on the new disk (4th Bios disk - SCSI:3 or sdd). When I tried to boot from this disk, nothing happened. I rebooted from the ESXi install disk (SCSI:2 or sdc), all was fine. Playing around, I finally found that to boot the ubuntu install, i had to boot from SCSI:0 - Grub had installed there, even though I never indicated that disk for anything during the install. It would be much better if Grub ASKED where it should be install, rather than assuming.
View 3 Replies
View Related
Aug 1, 2010
I had done a new lucid install to a 1 TB RAID 1 array using the alternate CD a few weeks back. I messed up that system trying to some hardware working that lucid doesn't have drivers for yet, so I gave up on it and reinstalled to a single 80 GB disk that I now want to move over to the RAID array.
I moved all of the existing files on the array to a single folder, then copied all of the folders from the 80 GB disk over to the array with permissions and symlinks (minus the contents of /proc and /sys, which I created empty).
These are the commands I used:
Quote:
p -a -d -R -v -t /media/raid_array /b*
cp -a -d -R -v -t /media/raid_array /d*
cp -a -d -R -v -t /media/raid_array /e*
cp -a -d -R -v -t /media/raid_array /h*
[Code]....
I tried to change fstab to use the 689a... for root, but when I try to boot, it's still trying to open /dev/disk/by-uuid/412d...
So then I booted from the single disk again and chrooted into the array, then ran update-initramfs -u. I got 3 "grep: /proc/modules: No such file or directory" errors, and "cat: /proc/cmdline: No such file or directory"- so I created directory /proc/modules, created an empty file /proc/cmdline, and ran the initramfs update again. Then I tried to shut down, which hung (probably because I was doing all of this from a terminal window in Gnome), so I killed the power after a couple of minutes.
It's still trying to use /dev/disk/by-uuid/412d... to boot.
What am I missing? I assume I just have to change the UUID to mount as root, but I don't know how.
View 2 Replies
View Related
Oct 27, 2010
I have a hypothetical situation in which I installed my operating system using a RAID1 mirror. At some point I decided that this setup was overkill, my machine isn't system critical, I value doubling my storage space more than speedy recovery, I'm doing routine backups, etc...
Short of backing up my system volume and repartitioning, or otherwise starting over, is there a way I can reconfigure my RAID1 array to only expect one disk so that mdadm no longer reports a Degraded state?
View 3 Replies
View Related
Oct 16, 2009
my Fedora 11 system is not starting anylonger. It stops with the message:
Code:
VFS: Can't find ext4 filesystem on dev dm-0
The system told me since a while, that a lot of the sectors of one disk of the (software) RAID compound are failed already. So tried to disconnect each of the disks and start them separately. Unfortunaltly this is not working (for one its is not working at all, the other wents the same far as with both), when I tried to recover the system with the Fedora DVD, it said no distribution found. I am quite new and do not know so much about linux system, so i do not know what further information you could need. Maybe it can be important, that both disks are encryped (the system wents so far, that I can type in the password).
View 2 Replies
View Related
Jun 9, 2010
I have two 80 GB IDE hard disk. I have create raid1 partition in both drive using [URL] ink. raid is working fine. But i have copy some data on one hard disk (md0) but this data is not autometically copy in second hard disk(md1). I want when data is write on one hard disk, this data autometically write in second hard disk.
View 11 Replies
View Related
Jun 8, 2011
Is there a difference between raid1 and ordinary hard disk?
View 11 Replies
View Related
Mar 12, 2011
I've read many of the postings on ICH10R and grub but none seem to give me the info I need. Here's the situation: I've got an existing server on which I was running my RAID1 pair boot/root drive on an LSI based RAID chip; however there are system design issues I won't bore you with that mean I need to shift this RAID pair to the fakeraid (which happens to most reliably come up sda, etc). So far I've been able to configure the fakeraid pair as 'Adaptec' and build the RAID1 mirror with new drives; it shows up just fine in the BIOS where I want it.
Using a pre-prepared 'rescue' disk with lots of space, I dd'd the partitions from the old RAID device; then I rewired things, rebooted, fired up dmraid -ay and got the /dev/mapper/ddf1_SYS device. Using cfdisk, I set up three extended partitions to match the ones on the old RAID; mounted them; loopback mounted the images of the old partitions; then used rsync -aHAX to dup the system and home to the new RAID1 partitions. I then edited the /etc/fstab to change the UUID's; likewise the grub/menu.list (This is an older system that does not have the horror that is grub2 installed) I've taken a look at the existing initrd and believe it is all set up to deal with dmraid at boot. So that leaves only the grub install. Paranoid that I am, I tried to deal with this:
dmraid -ay
mount /dev/mapper/ddf1_SYS5 /newsys
cd /newsys
[code]....
and I get messages about 'does not have any corresponding BIOS drive'. I tried editing grub/device.conf, tried --recheck and any thing else I could think of, to no avail. I have not tried dd'ing an mbr to sector 0 yet as I am not really sure whether that will kill info set up by the fakeraid in the BIOS. I might also add that the two constituent drives show up as /dev/sda and /dev/sdb and trying to use either of those directly results in the same error messages from grub. Obviously this sort of thing is in the category of 'kids don't try this at home', but I have more than once manually put a unix disk together one file at a time, so much of the magic is not new to me.
View 2 Replies
View Related
Jul 22, 2011
I have SLES10-SP3 running on an Intel SR1600URHS board with 3 hot-swap SATA disks configured using mdadm as Raid1 with hot spare. If I pull one of the active disks, all file i/o will stop for about 2.5 minutes after which it will start again and the raid array will be rebuilt using the spare disk. Is there any way I can reduce this 2.5 minutes of inactivity? I've tried setting /sys/block/sdX/device/timeout and /sys/block/sdX/device/retries to 1 for all disks, but this hasn't made any difference. The output from messages is:
12:11:56: ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
12:11:56: ata2.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x1e data 0
12:11:56: res 40/00:03:00:00:20/00:00:00:00:00/b0 Emask 0x4 (timeout)
[code]....
View 1 Replies
View Related
Nov 27, 2010
Posted this on the centos forum too, but I might get better attention here. I just moved my centos server to a mdadm raid1 array. I went partially after this guide: [URL].. What I did was to boot up a livecd and made three partitions on both of my empty disks, one for / one for swap and one for /vz (it's an openvz server). Made those partitions into seperate raid1 arrays and then rsync-ed everything from the old disk to the new partitions.
After I had moved everything I did chroot into the new raid array and edited both grub config files and fstab, according to the guide.
[Code]...
I have managed to run the system on the raid1 disks when using super grub2 disk off a cd, but it has it's own grub and can boot any distro, so I can see that the system is working fine, except for grub. I have tried installing grub both from a livecd (ubuntu 64bit) and when booted into the raid1 array, but it gives the same results as stated above.
View 2 Replies
View Related
Aug 11, 2010
intending to set up an all-in-one server, i threw in the ubuntu server 10.04 (amd64) cd. during the text-install, i set up the device-topology below, and it worked.
[Code]....
then i tested my raid by hot-pulling off the sda wire (ouch). worked fine, system still worked, and it also managed rebooting from the left sdb (which of course showed up being sda, lacking the first drive). now i am trying to recover this pre-crash state. adding the first disk (showing up as sdb), i can add it to md0 and let it start syncronizing for 2 hours. but... i can?t boot anymore with the recovered first disk being sda...
at first, booting got stuck in an initrd-prompt after complaining it couldn?t find my sys-logical volume. after a lot of trial and error i don?t even get any complaints, just a black screen which would let me wait for a boot for weeks... so, my system does not boot from my first disk, whether i plug in the second or not. my second disk still boots. my last attempt to get booting fine again has been: zero sda?s first and last gigabyte to kill any ids duplicate sdb?s first cylinder to sda to make it bootable reinitialize sdb?s part.table using command o in fdisk for a new disk-id recreate sda1 partition add sda1 to md0
View 1 Replies
View Related
Jan 5, 2011
I had a thread earlier asking for help installing Ubuntu Server to my homemade atom based NAS, but I gave up on that (GUI's are more helpful to me ) and so now I'm running Ubuntu 10.10 Desktop 64bit edition.Last night I was finally able to get mdadm set up. I have two 1TB disks set up in RAID1 config. I used
Code:
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
to create the array, and then waited until it finished assembling. Then I used System>Administration>Disk
[code]....
View 1 Replies
View Related
Feb 1, 2011
We have had a hardisk crash in our RAID1 webhosting server running CentOS5 and Plesk. We first realized something was wrong when our main site didn't load but showed MySQL errors. We then found out that the system was in read-only state. Something that also happened the day before yesterday, but we could fix with a FSCK. Then the system worked well til around 18 hours later when it crashed with the same sympoms. So, we rebooted the server and wanted to do a filesystem check again. But the HDD wouldnt even load. It was gone. Unfortunatelly it was not realized that the second disk in the system was also not working any more for some time now. Fortunatelly we had our main site backed up externally though. So we could re-install a fresh box and mounted the two drives to the system. We checked the harddisk. One is practically empty (the older one), the other has almost only files in 'lost + found' but these are all "numbered", no real filenames or so.
View 2 Replies
View Related
May 3, 2011
Followed steps 2-5 and purged/reinstalled grub now it boots as it should, NO idea where it was messed up.[URL].. I had 9.10 running in raid1 and upgraded my hardware (cpu, mb, memory etc) and wanted to do a fresh install of 10.04 to get updated. After following the various guides online such as [URL]...It begins to load grub and drops to a "grub> " shell. Which I have to do the following to get it to boot.
Code:
set root=(md1)
linux /vmlinuz root=/dev/md1 ro
initrd /initrd.img
boot
Then it boots up normally and I can use it like any other desktop. I've been over my grub.cfg and /etc/defaut/grub files and cannot find the issue. At this point I'm wondering if the fact it's a raid1 setup is keeping grub from finding it's files.
[Code]...
View 9 Replies
View Related
Jul 29, 2010
I have built a small test server. I am planing on using this machine a an email and web server to test out its hosting capacities. in the future I will build a larger and more well equipped version.
AMD Athlon x2 2.0ghz
2 160gb SATA drives (hardware raid 1, done through the Motherboard)
2 gb ram (dual channel)
Like I said small test server. I am trying to install 10.04 server edition. When I get to the point of partitioning it asks me to activate the raid so I do. I get through the guided partitioning and get ready to write the file system to the drives and the screen goes red and says that it has failed. On a side note, this works if i install it on the same drives without any raid configuration.
View 6 Replies
View Related
Feb 7, 2011
I have a RAID1 array, where mdadm states that one of the disks is "removed." Naturally, I assume one of the drives has failed. The mdadm --detail command tells me that the sda drive has failed. However, further inspection from the mdadm -E /dev/sdb1 command says that sdb1 disk has been removed. I am a bit confused. Can someone clarify which drive is failed? Am I misreading the command outputs?
Code:
sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
[Code]...
View 3 Replies
View Related
Jul 26, 2014
I have a VIA Epia M 5000 system with 2 western digital 1TB NAS SATA drives connected through SATA<->IDE adapter. Everything installs and writes as expected except... grub. It never boots, after a message 'Grub loading' I always get 'error: no such disk'. I've tried numerous times and has been attemping to fix the issue for the past 2 days.
/dev/sda
0.999TB 0xfd linux raid autodetect partition
1GB 0xfd linux raid autodetect, logical partition
/dev/sdb exactly the same
0.999TB 0xfd linux raid autodetect partition
1GB 0xfd linux raid autodetect
/dev/md0
RAID1 of /dev/sda1 and /dev/sdb1
marked as ext4, boot point /
/dev/md1
RAID1 of /dev/sda5 and /dev/sdb5
marked as swap
update-grub2 in rescue mode generates grub.cfg with SET root=/mduuid/UUID_OF_SDA1
then after that there's search --no-floppy etc --set root=/mduuid/UUID_OF_MD0
I'm writing this from memory but simply the two uuids are different. Is this correct? I get those UUIDs to compare from blkid. All partitions are marked as bootable. grub-install /dev/sda and grub-install /dev/sdb produces no errors. grub-install /dev/md0 does not work, complains about superblocks or something similar.
Grub.cfg file contains insmod raid mdraid1x and similar lines, so that should be ok. Grub drops to rescue mode with message error: no such disk. Not device, but disk. Google finds many results for 'no such device' error, but I am not getting that error. 'ls' produces
(hd0) (hd0,msdos1) (hd1) (hd1,msdos1) ls ANY_VALID_PATH produces empty newline being printed, nothing more.
setting prefixes manually does not work, with error message 'error: file not found'. ls (hd0,msdos1)/boot/grub also produces empty line being printed. Rescue CD and auto-assemble of md0 and md1 works, the files are there, everything okay, except grub.
View 3 Replies
View Related
Nov 14, 2010
One of the hard drives in my server failed the other day, backups saved the day and downtime was only a few hours, but when setting up the new drive I went ahead and migrated to software RAID, in the hopes it may give me less downtime in the future when a drive fails. It all went rather well, but my main root partition won't finish syncing for some reason.
sda was the original drive with sda4 as /, sda1 as /boot, and sda2 as swap. sdb was the drive that failed and was replaced with the new drive. So I set up sdb with the same partitions of sda, added it to a RAID1 array, copied files from sda, and reboot to md4 as /, md1 as /boot, and md2 as swap. I added the sda partitions to the array, and the sync went off without a hitch on md1 and md2, md4 progresses well, but after a few hours /proc/mdstat just shows this:
Code:
root@d668:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sdb2[1] sda2[0]
9767424 blocks [2/2] [UU]
[Code]...
View 3 Replies
View Related
Feb 4, 2011
I have a ubuntu sever with a raid1 data drive formated in native linux ext3. I have searched for answers to my question but most likely I'm not asking it correctly. I want to use the data drive to store backups of files from various ubuntu and windows machines. Do I need to reformat the drive as ntfs to enable windows use or can it remain as ext3? For that matter can I reformat as ext4 as a soultion? Again, I wish to use the data drive as a backup storage.
View 3 Replies
View Related
Apr 10, 2011
I accidentally rm -rf 'ed /etc directory from the main server. The server has raid1 soft-raid. Is there a way to recover the directory.
View 4 Replies
View Related
Jul 21, 2010
Could anyone give the steps for converting a logical volume to a raw disk to mount Oracle ASM Instance on it?
View 2 Replies
View Related
Oct 26, 2010
I'm trying to migrate my LVs over to a Luks volume (prompt on password at boot). Unfortunately, as soon as I add my luks-encrypted physical volume to my volume group, I'm no longer able to update my grub configuration. I've detailed my steps below:
I've created and unlocked my encrypted partition with the following:
Code:
sudo cryptsetup -c aes-cbc-essiv:sha256 -y -s 256 luksFormat /dev/sdb1
sudo cryptsetup luksOpen /dev/sdb1 crypto_agilityssd
My /etc/crypttab looks like this:
[Code].....
View 2 Replies
View Related
Jan 3, 2010
I am running Ubuntu 9.10 x64 on a relatively old laptop and I find Grub is taking about 20 seconds to initially load before booting the system. The laptop only has a single 120GB hard drive, and I chose the "use entire disk" option when installing, so I do not have any fancy partitioning scheme.When the system boots I get the "LOADING GRUB" text displayed and then shortly after it just shows the flashing cursor with no text, and stays there for about 20 seconds. After that it finally starts loading the system.All the searching I have done only turned up solutions relevant to people with multiple hard drives. This was not an issue on Grub 1.
View 1 Replies
View Related
Feb 2, 2010
Recently, one the SMART utility said that one of the drives had failed and another drive was about to fail. I downed the box and hooked them up to my windows machine to run sea tools on them (They are all seagate drives). Sea Tools said that the drives were fine, while ubuntu said they were failing/dead. Yesterday I decided to try to fix one of the drives in the raid. I turned the server off, took the failed drive out, and restarted. Of course the raid didn't work because only 2 of the 3 drives were there, however it had been working w/ only 2 of the 3 drives for a couple months now (I'm a lazy college student). I turned it back off and back on with the drive there just to see if I could get the raid up again, but I havn't been able to get it to go. So far I've tried:
Code:
mdadm --assemble /dev/md0 /dev/sd[b,c,d]
mdadm: no recogniseable superblock on /dev/sdb
mdadm: /dev/sdb has no superblock - assembly aborted
[code]....
I'm looking for a way to trick the raid into working with just 2 drives until I can warranty the seagate and buy an external 1.5 TB drive to use as another backup. how to remove the bad drive from the array and replace it with a fresh drive, without data loss.
View 3 Replies
View Related
Dec 11, 2010
Does anyone have a simple to use bash script or some such that will convert MSSQL dump files to MySQL formatted dump files?
View 6 Replies
View Related
May 18, 2010
Was wondering if it's possible to set up a single disk with btrfs and then later on convert it to a 'mirrored' array?
View 1 Replies
View Related
Jan 25, 2010
I'm trying to figure out if a box is running just a single sda disk. or if it actually has hardware RAID setup and Linux just sees this virtual sda disk which is actually composed of several drives hidden behind the card. for software raid i know that doing mount command would show something like
/home mounted on /dev/mapper/ddfadasdf34234234234
and for nvidia card it would say something like
/home mounted on /dev/mapper/nvidia_34324234234
but in my case i just see /dev/sda1 mounted on /home
cat /proc/scsci/scsi however see several drives being on the system, dmesg shows the same. But I only see this one drive when doing mount. So basically I have conflicting information. What would be the sure way to figure out if i do have a raid array and if so what raid level I'm running.
View 3 Replies
View Related