[問題] Raid 1拆任一顆硬碟都沒辦法開機(已解決)
:開機顯示 grub error 21: selected disk does not exist
:在grub下了
:root (hd0,1)
:setup (hd0)
:reboot
:結果還是一樣@@,一定要接上raid的原本兩顆硬碟才有辦法開機進centos 6.5
:目前 硬碟是兩顆750G 都切三個磁區作 raid 1
:因為想換掉sda卻無法移除更換硬碟
:希望做到拆任何一顆硬碟都能開機 請各位大大指導
解決方法:
原本的/grub.conf
default=0
timeout=5
splashimage=(hd1,1)/grub/splash.xpm.gz
↑
改成(hd0,1)就好了
就是這個當初自己手殘,不知為何改成開機強迫指定第二顆硬碟,
在剩下一顆硬碟情況下,當然沒辦法開機,
非常感謝B大 及 K大 幫忙協助解決問題
--------------------------------------------
以下是我的raid 1部分相關資料
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md2 715785520 133508832 545916816 20% /
tmpfs 2000348 136 2000212 1% /dev/shm
/dev/md1 1032024 44424 935176 5% /boot
/dev/md1:
Version : 1.0
Creation Time : Thu Aug 28 16:42:53 2014
Raid Level : raid1
Array Size : 1048512 (1024.11 MiB 1073.68 MB)
Used Dev Size : 1048512 (1024.11 MiB 1073.68 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sun Mar 15 19:42:13 2015
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : billsue1115:1
UUID : 4d846a1f:7ce57cd0:4f037e0a:06dae47a
Events : 141
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x4eb85246
Device Boot Start End Blocks Id System
/dev/sdb1 1 523 4194304 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2 * 523 653 1048576 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary.
/dev/sdb3 653 91202 727329792 fd Linux raid autodetect
Personalities : [raid1]
md1 : active raid1 sda2[0] sdb2[1]
1048512 blocks super 1.0 [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk
md0 : active raid1 sda1[0] sdb1[1]
4192192 blocks super 1.1 [2/2] [UU]
md2 : active raid1 sda3[0] sdb3[1]
727197504 blocks super 1.1 [2/2] [UU]
bitmap: 2/6 pages [8KB], 65536KB chunk
unused devices: <none>
→
03/15 21:51, , 1F
03/15 21:51, 1F
→
03/15 21:52, , 2F
03/15 21:52, 2F
這是目前的/grub.conf
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.el6.i686)
root (hd1,1)
kernel /vmlinuz-2.6.32-431.el6.i686 ro
root=UUID=e128e42a-223a-46ea-8d58-d5cd7f090596 rd_NO_LUKS rd_NO_LVM
rd_MD_UUID=97d78a49:48423800:8fde082d:367ca2e9
rd_MD_UUID=049eebdd:fca4ddac:1e5f526a:2db4874e LANG=zh_TW.UTF-8
crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.el6.i686.img
root (hd0,1)
boot=/dev/sda
若裝上兩顆硬碟,我試過這幾個選項都能開機,但是拆了一顆就都顯示error 21了
→
03/15 22:35, , 3F
03/15 22:35, 3F
→
03/15 22:38, , 4F
03/15 22:38, 4F
→
03/16 01:11, , 5F
03/16 01:11, 5F
→
03/16 01:11, , 6F
03/16 01:11, 6F
→
03/16 01:54, , 7F
03/16 01:54, 7F
→
03/16 02:00, , 8F
03/16 02:00, 8F
→
03/16 02:00, , 9F
03/16 02:00, 9F
→
03/16 02:09, , 10F
03/16 02:09, 10F
→
03/16 06:50, , 11F
03/16 06:50, 11F
→
03/16 06:52, , 12F
03/16 06:52, 12F
→
03/16 09:03, , 13F
03/16 09:03, 13F
B大 這是我的uuid資料,可否指導該如何去修改目前grub,
我有點擔心亂改會沒辦法開機@@
/dev/md2: UUID="e128e42a-223a-46ea-8d58-d5cd7f090596" TYPE="ext3"
/dev/sda1: UUID="049eebdd-fca4-ddac-1e5f-526a2db4874e"
UUID_SUB="bf38a4f9-acea-fc2f-d19a-88e3ec966b88" LABEL="billsue1115:0"
TYPE="linux_raid_member"
/dev/sda2: UUID="4d846a1f-7ce5-7cd0-4f03-7e0a06dae47a"
UUID_SUB="e17f69e3-c607-0b38-0ee3-8febbcb75d4c" LABEL="billsue1115:1"
TYPE="linux_raid_member"
/dev/sda3: UUID="97d78a49-4842-3800-8fde-082d367ca2e9"
UUID_SUB="c2b38b6b-a669-2a9e-8107-3277b9456b52" LABEL="billsue1115:2"
TYPE="linux_raid_member"
/dev/sdb1: UUID="049eebdd-fca4-ddac-1e5f-526a2db4874e"
UUID_SUB="56d0ef0f-175e-fb3f-efcd-45a5595ead57" LABEL="billsue1115:0"
TYPE="linux_raid_member"
/dev/sdb2: UUID="4d846a1f-7ce5-7cd0-4f03-7e0a06dae47a"
UUID_SUB="77e6c36a-7502-9255-ea5c-a3280c4f25a6" LABEL="billsue1115:1"
TYPE="linux_raid_member"
/dev/sdb3: UUID="97d78a49-4842-3800-8fde-082d367ca2e9"
UUID_SUB="4bfde6d9-a943-dac0-107b-0c977842c006" LABEL="billsue1115:2"
TYPE="linux_raid_member"
/dev/md0: UUID="c44a2a5e-91f2-43bd-a3e0-2836e3be9074" TYPE="swap"
/dev/md1: UUID="5e00e192-d04e-47dc-89e5-c9f006c77f91" TYPE="ext3"
※ 編輯: billsue (180.218.103.82), 03/16/2015 19:53:39
→
03/16 23:24, , 14F
03/16 23:24, 14F
→
03/17 01:02, , 15F
03/17 01:02, 15F
→
03/17 01:04, , 16F
03/17 01:04, 16F
→
03/17 01:04, , 17F
03/17 01:04, 17F
→
03/17 01:05, , 18F
03/17 01:05, 18F
→
03/17 01:05, , 19F
03/17 01:05, 19F
→
03/17 01:05, , 20F
03/17 01:05, 20F
→
03/17 01:06, , 21F
03/17 01:06, 21F
剛剛試著用ubuntu live CD 在只有一顆硬碟sda下安裝grub2完成,
但是重開機依然會停留在grub的命令列上,裝回第二顆硬碟sdb後,
果然已經無法用sda開機了,重新將bios設定sdb優先開機,
(幸好)還能開進Centos,現在重新rebuild硬碟中 = =|||
※ 編輯: billsue (180.218.103.82), 03/18/2015 21:20:01
※ 編輯: billsue (180.218.103.82), 03/18/2015 22:26:32
※ 編輯: billsue (180.218.103.82), 03/18/2015 22:59:29