Debian soft Raid Installation notes

Source: Internet
Author: User

Run mdadm to install raid1 On debian squeeze's existing system recently. Take a note here.


The existing hard disk is/dev/sda, 500 GB, debian squeeze is installed, and a new disk is/dev/sdb, which is 500 GB and is ready to form raid1.


1. For detailed installation process, see the following link:

Http://www.howtoforge.com/software-raid1-grub-boot-debian-etch

This link is very detailed, as long as you have basic mdadm raid knowledge, you can operate.

For more information, see the following link:

Http://feeding.cloud.geek.nz/posts/setting-up-raid-on-existing/


It should be noted that grub2 data is easily lost if the operation is improper. We recommend that you use dpkg-reconfigure grub-pc to update grub, but select/dev/sda and/dev/sdb for the partition to be installed, instead of the virtualized/dev/md0.


2. How to recover a hard disk in Raid 1 in the future.

The method for creating a raid is similar to that for creating a raid. The main steps are as follows:

1. Mark each partition of the bad hard disk as fail and remove it from Array;

2. install a new hard disk instead of a bad hard disk.

3. Copy the partition table with the remaining hard disks in Raid 1 to the new hard disk;

4. Set the partition type of the new hard disk;

5. Add each partition of the new hard disk to Array;

6. The system will automatically start rebuilding data on the new hard disk partition.

Http://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array


3. debian netinst cd usb Installation Problems

Using a netinst CD. iso image to create a USB boot disk may cause "Detect and mount CD-ROM" failure during installation. This problem may occur when debian squeeze and debian wheezy netinst are used. Solution:

1. In text installation mode, Alt + F2 enter the console shell

2. lsmod check whether vfat, fat, ehci_hcd, and xhci_hcd are installed

3. If the vfat and fat modules are not installed, use modprobe fat and modprobe vfat to install them.

4. If xhci_hcd has been installed, remove it. rmmod xhci_hcd

5. Retain ehci_hcd. If it has been installed, remove rmmod ehci_hcd and then install modprobe ehci_hcd.

6. mount/dev/sdx/cdrom and mount the USB flash disk to/cdrom./sdx indicates the device name of the USB flash disk.

Steps 7, 5, and 6 may need to be repeated, because the installer sometimes gets confused.


4. What if Grub is really lost?

This problem occurs during the installation process. grub itself cannot be started and enters the grub rescue Command Line. The error: file not found is displayed when operating any partition. The rescue method is as follows:

1. Use netinst cd or live cd to start the system and enter the shell command line.

2. This shell must support the mdadm command.

3. Insert mdadm and raid modules

Modprobe md
Modprobe linear
Modprobe multipath
Modprobe raid0
Modprobe raid1
Modprobe raid5
Modprobe raid6
Modprobe raid10

4. Install the file system module. For example, if the raid is originally ext3, run modprobe ext3.

5. Start raid and use a hard disk. Grub is lost, and the hard disk data is still there.

Mdadm -- assemble/dev/md0 -- run/dev/sdb1

Mdadm -- assemble/dev/md1 -- run/dev/sdb5

...

6. Mount each raid partition to a temporary location and prepare to restore the file system (in this example,/dev/md1 is the swap partition and does not need to be mounted)

Mount/dev/md0/mnt

Mount/dev/md2/mnt/home

...

7. Mount virtual directories

mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

8. chroot/mnt, and the file system in the original sdb has been restored.

9. Run bash in the same way as the original system environment.

10. Run dpkg-reconfigure grub-pc to restore grub. See section 1st special precautions for grub.

Freelancer.com-the No. 1 software part-time job website part-time programming and development, C/C ++/C #, PHP, Web development, ASP, outsourcing project, foreign private work, programmer part-time, outsourcing development, foreign Project outsourcing, and website Outsourcing




This article is from the "techlife" blog and will not be reposted!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.