LoginSignup
0
0

More than 5 years have passed since last update.

CentOS5 で Software Raid 1をやめ通常のパーティション構成にする手順

Last updated at Posted at 2016-12-07

新HDDのパーティション構成

CloneZilla (ubuntu版)で起動

  • Debian版だとなぜかmdadm認識しなかった。
  • CloneZilla alternative stable - 20161121-yakkety からbootした。
  • 既存のSoftware Raid 1 が /dev/md126, /dev/md127 と認識した。
既存のデータを新HDD(sdc)にコピー
cd /home/
mount /dev/sdc2 /home/partimage
mkdir /home/partimage/boot
mount /dev/sdc1 /home/partimage/boot

mkdir /mnt/md126 /mnt/md127

mount -o ro /dev/md126 /mnt/md126
mount -o ro /dev/md127 /mnt/md127

cp -a /mnt/md126/* /home/partimage/boot/
cp -a /mnt/md127/* /home/partimage/

sync;sync;sync
reboot
  • 新HDD(sdc)を別のPCに差し込み以下実施

CentOS 5.11 のインストールDVDから起動

Grubの起動オプション
linux rescue
mount /dev/sda2 /mnt/sysimage
mount /dev/sda1 /mnt/sysimage/boot

cd /home/partimage
for i in dev sys proc; do mount -o bind /$i $i;done
chroot .

md を sdaに書き換え

  • /etc/fstab
  • /etc/mtab
- /dev/md1
+ /dev/sda2

- /dev/md0
+ /dev/sda1
  • /boot/grub/menu.lst
- /dev/md1
+ /dev/sda2
grub-install /dev/sda

VirtualBox_raid_07_12_2016_11_55_37.png

  • DVDを抜いて新HDDで起動することを確認。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0