<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Mirror the root disk in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729006#M43129</link>
    <description>Nejad&lt;BR /&gt;&lt;BR /&gt;please check the below thread.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1461020" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1461020&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;kamal</description>
    <pubDate>Tue, 21 Dec 2010 11:22:53 GMT</pubDate>
    <dc:creator>kemo</dc:creator>
    <dc:date>2010-12-21T11:22:53Z</dc:date>
    <item>
      <title>Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729005#M43128</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;i have dl320 g3 server and I just installed RedHat version 5 with the following partitions:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;/dev/sda -----&amp;gt; (First disk)&lt;BR /&gt;/dev/sda1 -- /boot&lt;BR /&gt;/dev/sda2 -- Will be used by LVM2 as following&lt;BR /&gt;/dev/vg00/lvol1 --- /&lt;BR /&gt;/dev/vg00/lvol3 --- /home&lt;BR /&gt;/dev/vg00/lvol4 --- /tmp&lt;BR /&gt;/dev/vg00/lvol5 --- /usr&lt;BR /&gt;/dev/vg00/lvol6 --- /var&lt;BR /&gt;/dev/vg00/lvol7 --- /opt&lt;BR /&gt;&lt;BR /&gt;*Second Disk&lt;BR /&gt;/dev/sdb -- free space and i formatting with LVM mode(Will be mirror to /dev/sda disk (RAID 1))&lt;BR /&gt;&lt;BR /&gt;I have 2 internal disks that are available on the system and are the same size.&lt;BR /&gt;&lt;BR /&gt;I want to mirroring the root disk with another internal disk. by using GUI or text command How i can do it that ?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 21 Dec 2010 09:40:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729005#M43128</guid>
      <dc:creator>Mousa55</dc:creator>
      <dc:date>2010-12-21T09:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729006#M43129</link>
      <description>Nejad&lt;BR /&gt;&lt;BR /&gt;please check the below thread.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1461020" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1461020&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;kamal</description>
      <pubDate>Tue, 21 Dec 2010 11:22:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729006#M43129</guid>
      <dc:creator>kemo</dc:creator>
      <dc:date>2010-12-21T11:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729007#M43130</link>
      <description>This would be a variation of the procedure described in:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://raid.wiki.kernel.org/index.php/SATA_RAID_Boot_Recipe" target="_blank"&gt;https://raid.wiki.kernel.org/index.php/SATA_RAID_Boot_Recipe&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Since your root filesystem is on LVM, you can use pvmove to migrate your vg00 onto the RAID set while it is in use, so there will be no requirement to use a Live CD.&lt;BR /&gt;&lt;BR /&gt;WARNING: if the system is rebooted while in the critical phase of this procedure, you may need to use the RHEL 5 installation CD/DVD in rescue mode to boot the system and complete the mirroring procedure.&lt;BR /&gt;&lt;BR /&gt;DISCLAIMER: I have not tested this procedure.&lt;BR /&gt;&lt;BR /&gt;# Copy the partition table of /dev/sda to /dev/sdb:&lt;BR /&gt;sfdisk -d /dev/sda | sfdisk /dev/sdb&lt;BR /&gt;&lt;BR /&gt;# Change the type of partitions on /dev/sdb to "Linux raid autodetect: &lt;BR /&gt;fdisk /dev/sdb&lt;BR /&gt;ENTER "t"&lt;BR /&gt;SELECT "1" for partition 1&lt;BR /&gt;ENTER "fd" for partition type&lt;BR /&gt;Repeat for partition 2&lt;BR /&gt;&lt;BR /&gt;# Make sure your system sees the new partition table on /dev/sdb by checking the list of visible partitions:&lt;BR /&gt;cat /proc/partitions&lt;BR /&gt;&lt;BR /&gt;# If necessary, use the "partprobe" command to refresh the partition information:&lt;BR /&gt;partprobe&lt;BR /&gt;&lt;BR /&gt;# Create "degraded mirrored RAIDs" on /dev/sdb1 and /dev/sdb2&lt;BR /&gt;mdadm -Cv -ayes /dev/md0 -n2 -l1 missing /dev/sdb1&lt;BR /&gt;mdadm -Cv -ayes /dev/md1 -n2 -l1 missing /dev/sdb2&lt;BR /&gt;&lt;BR /&gt;# Confirm that the RAIDs are running:&lt;BR /&gt;cat /proc/mdstat&lt;BR /&gt;&lt;BR /&gt;# Format /dev/md0: this will be your new /boot.&lt;BR /&gt;mkfs.ext3 /dev/md0&lt;BR /&gt;&lt;BR /&gt;# Mount /dev/md0 temporarily to /mnt:&lt;BR /&gt;mount /dev/md0 /mnt&lt;BR /&gt;&lt;BR /&gt;# Copy everything from /boot (on /dev/sda1) to /mnt (on /dev/md0):&lt;BR /&gt;cp -a /boot/* /mnt/&lt;BR /&gt;&lt;BR /&gt;# Unmount /mnt and /boot&lt;BR /&gt;umount /mnt&lt;BR /&gt;umount /boot&lt;BR /&gt;&lt;BR /&gt;# Edit your /etc/fstab to mount /boot from /dev/md0 instead of /dev/sda1:&lt;BR /&gt;vi /etc/fstab&lt;BR /&gt;(At this point, the old /boot is still as it was before, only it won't be mounted when the system comes up - the new /boot will be mounted instead.)&lt;BR /&gt;&lt;BR /&gt;# Mount /boot again, now using /dev/md0:&lt;BR /&gt;mount /boot&lt;BR /&gt;&lt;BR /&gt;# Initialize /dev/md1 as LVM PV:&lt;BR /&gt;pvcreate /dev/md1&lt;BR /&gt;&lt;BR /&gt;# Join /dev/md1 into vg00:&lt;BR /&gt;vgextend vg00 /dev/md1&lt;BR /&gt;&lt;BR /&gt;# (Critical phase begins: *do not reboot* after this point until all the remaining steps are complete)&lt;BR /&gt;&lt;BR /&gt;# Migrate all vg00 content from /dev/sda2 to /dev/md1:&lt;BR /&gt;pvmove -i 10 /dev/sda2 /dev/md1&lt;BR /&gt;(After this, the old initrd cannot mount the root filesystem, because it is not prepared to activate the RAID devices first)&lt;BR /&gt;&lt;BR /&gt;# Remove the now-empty /dev/sda2 from vg00:&lt;BR /&gt;vgreduce vg00 /dev/sda2&lt;BR /&gt;&lt;BR /&gt;# Copy the partition layout of /dev/sdb to /dev/sda:&lt;BR /&gt;sfdisk -d /dev/sdb | sfdisk /dev/sda&lt;BR /&gt;&lt;BR /&gt;# Add the corresponding partitions of /dev/sda to the mirror sets:&lt;BR /&gt;mdadm /dev/md0 -a /dev/sda1 ; mdadm /dev/md1 -a /dev/sda2&lt;BR /&gt;(This will overwrite the old /boot filesystem: your system is definitely not bootable at this point. That will be fixed shortly...)&lt;BR /&gt;&lt;BR /&gt;# The system will automatically resynchronize the mirrors. You can monitor this procedure with "cat /proc/mdstat". Wait for the resync to complete.&lt;BR /&gt;&lt;BR /&gt;# Re-create your initrd: when you do this, mkinitrd will detect your root VG is on a RAID array, and it will add the necessary RAID support modules to the new initrd.&lt;BR /&gt;&lt;BR /&gt;mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)&lt;BR /&gt;&lt;BR /&gt;# Re-install your bootloader... twice.&lt;BR /&gt;The Master Boot Record is located outside /dev/md* devices, so it won't be mirrored automatically. Therefore you must install GRUB separately to both disks.&lt;BR /&gt;&lt;BR /&gt;GRUB identifier "(hd0)" means "first disk detected by the system", so the bootloader on /dev/sdb needs to be installed with the assumption that if/when /dev/sdb is used to actually boot the system (= when current /dev/sda is damaged or removed), it will be (hd0) for GRUB.&lt;BR /&gt;&lt;BR /&gt;The bootloader on /dev/sda must be reinstalled because the physical positions of /boot/grub/* files on the disk have been altered by this procedure.&lt;BR /&gt;&lt;BR /&gt;Commands:&lt;BR /&gt;&lt;BR /&gt;grub&lt;BR /&gt;grub&amp;gt; device (hd0) /dev/sdb&lt;BR /&gt;grub&amp;gt; setup (hd0)&lt;BR /&gt;grub&amp;gt; device (hd0) /dev/sda&lt;BR /&gt;grub&amp;gt; setup (hd0)&lt;BR /&gt;grub&amp;gt; quit&lt;BR /&gt;&lt;BR /&gt;# (Critical phase ends: your system should now be capable of booting from RAID without a rescue CD.)&lt;BR /&gt;&lt;BR /&gt;# create /etc/mdadm.conf; add a line with keyword MAILADDR and the mail address that should receive notification from disk failures:&lt;BR /&gt;echo "MAILADDR Nejad@your.work.email.example" &amp;gt;/etc/mdadm.conf&lt;BR /&gt;&lt;BR /&gt;# Send a test message:&lt;BR /&gt;mdadm --monitor --scan -1 --test&lt;BR /&gt;(You should receive a TestMessage alert email for both md0 and md1. The actual RAID disk failure alarms will use a similar message format.)&lt;BR /&gt;&lt;BR /&gt;# configure the RAID monitoring service to start at boot, and start it now:&lt;BR /&gt;chkconfig mdmonitor on&lt;BR /&gt;service mdmonitor start&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 21 Dec 2010 13:57:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729007#M43130</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-12-21T13:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729008#M43131</link>
      <description>Hi Nejad,&lt;BR /&gt;&lt;BR /&gt;Please be aware that for software two-way mirroring (that means mirroring with LVM) you need three disks: two for the two half of the mirror, and one for logging. Alternatively, you can do it from two disks by keeping the logs in memory. For further info, see "man lvconvert" and particularly the --corelog switch.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Viktor</description>
      <pubDate>Wed, 22 Dec 2010 15:12:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729008#M43131</guid>
      <dc:creator>Viktor Balogh</dc:creator>
      <dc:date>2010-12-22T15:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729009#M43132</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I facing this message when applying this command # sfdisk -d /dev/sdb | sfdisk /dev/sda&lt;BR /&gt;"&lt;BR /&gt;/dev/sda2: Moved: 100.0%&lt;BR /&gt;[root@syslog /]# vgreduce vg00 /dev/sda2&lt;BR /&gt;  Removed "/dev/sda2" from volume group "vg00"&lt;BR /&gt;[root@syslog /]# sfdisk -d /dev/sdb | sfdisk /dev/sda&lt;BR /&gt;Checking that no-one is using this disk right now ...&lt;BR /&gt;BLKRRPART: Device or resource busy&lt;BR /&gt;&lt;BR /&gt;This disk is currently in use - repartitioning is probably a bad idea.&lt;BR /&gt;Umount all file systems, and swapoff all swap partitions on this disk.&lt;BR /&gt;Use the --no-reread flag to suppress this check.&lt;BR /&gt;Use the --force flag to overrule all checks."&lt;BR /&gt;&lt;BR /&gt;How to skip this problem?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Sat, 25 Dec 2010 08:32:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729009#M43132</guid>
      <dc:creator>Mousa55</dc:creator>
      <dc:date>2010-12-25T08:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729010#M43133</link>
      <description>The advice given by the fdisk command is actually very good.&lt;BR /&gt;&lt;BR /&gt;Looks like /dev/sda is still being used for something. &lt;BR /&gt;&lt;BR /&gt;Perhaps it contains a swap partition? Run "swapon -s". If it lists any reference to /dev/sda (e.g. /dev/sda3), then you've found the cause. With "swapoff -a" you can disable swapping for the mirroring procedure. When you reboot the system or run "swapon -a", the swap partition will be enabled again.&lt;BR /&gt;&lt;BR /&gt;If a swap partition is not the cause, then please show the output of these commands:&lt;BR /&gt;&lt;BR /&gt;fdisk -l /dev/sda&lt;BR /&gt;cat /proc/mounts&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Sat, 25 Dec 2010 11:54:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729010#M43133</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-12-25T11:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Mirror the root disk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729011#M43134</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the problem is still and i facing a new message it is&lt;BR /&gt;&lt;BR /&gt;# swapon -s&lt;BR /&gt;Filename                                Type            Size    Used    Priority&lt;BR /&gt;/dev/mapper/vg00-lvol2                  partition       4194296 0       -1&lt;BR /&gt;# swapoff -a&lt;BR /&gt;# mdadm /dev/md0 -a /dev/sda1&lt;BR /&gt;mdadm: cannot get array info for /dev/md0&lt;BR /&gt;&lt;BR /&gt;Please review the results of these commands.&lt;BR /&gt;&lt;BR /&gt;root@syslog /]#  fdisk -l /dev/sda&lt;BR /&gt;&lt;BR /&gt;Disk /dev/sda: 250.0 GB, 250059350016 bytes&lt;BR /&gt;255 heads, 63 sectors/track, 30401 cylinders&lt;BR /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;BR /&gt;&lt;BR /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;BR /&gt;/dev/sda1   *           1          13      104391   83  Linux&lt;BR /&gt;/dev/sda2              14       30401   244091610   8e  Linux LVM&lt;BR /&gt;[root@syslog /]# &lt;BR /&gt;[root@syslog /]# cat /proc/mounts&lt;BR /&gt;rootfs / rootfs rw 0 0&lt;BR /&gt;/dev/root / ext3 rw,data=ordered 0 0&lt;BR /&gt;/dev /dev tmpfs rw 0 0&lt;BR /&gt;/proc /proc proc rw 0 0&lt;BR /&gt;/sys /sys sysfs rw 0 0&lt;BR /&gt;none /selinux selinuxfs rw 0 0&lt;BR /&gt;/proc/bus/usb /proc/bus/usb usbfs rw 0 0&lt;BR /&gt;devpts /dev/pts devpts rw 0 0&lt;BR /&gt;/dev/vg00/lvol6 /var ext3 rw,data=ordered 0 0&lt;BR /&gt;/dev/vg00/lvol7 /opt ext3 rw,data=ordered 0 0&lt;BR /&gt;/dev/vg00/lvol3 /home ext3 rw,data=ordered 0 0&lt;BR /&gt;/dev/vg00/lvol4 /tmp ext3 rw,data=ordered 0 0&lt;BR /&gt;tmpfs /dev/shm tmpfs rw 0 0&lt;BR /&gt;/dev/vg00/lvol5 /usr ext3 rw,data=ordered 0 0&lt;BR /&gt;none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0&lt;BR /&gt;sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0&lt;BR /&gt;/etc/auto.misc /misc autofs rw,fd=7,pgrp=3128,timeout=300,minproto=5,maxproto=5,indirect 0 0&lt;BR /&gt;-hosts /net autofs rw,fd=13,pgrp=3128,timeout=300,minproto=5,maxproto=5,indirect 0 0&lt;BR /&gt;none /var/lib/xenstored tmpfs rw 0 0&lt;BR /&gt;/dev/sda1 /boot ext3 rw,data=ordered 0 0&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Sun, 26 Dec 2010 04:53:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mirror-the-root-disk/m-p/4729011#M43134</guid>
      <dc:creator>Mousa55</dc:creator>
      <dc:date>2010-12-26T04:53:19Z</dc:date>
    </item>
  </channel>
</rss>

