[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-svn
Subject:    [Ipcop-svn] SF.net SVN: ipcop:[5495]
From:       owes () users ! sourceforge ! net
Date:       2011-02-23 19:26:55
Message-ID: E1PsKMR-0005Ow-QF () sfp-svn-3 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 5495
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5495&view=rev
Author:   owes
Date:     2011-02-23 19:26:55 +0000 (Wed, 23 Feb 2011)

Log Message:
-----------
Add some extra erase code to help when installing on a drive which has old RAID \
information

Modified Paths:
--------------
    ipcop/trunk/src/scripts/disk-partition.sh

Modified: ipcop/trunk/src/scripts/disk-partition.sh
===================================================================
--- ipcop/trunk/src/scripts/disk-partition.sh	2011-02-23 19:15:13 UTC (rev 5494)
+++ ipcop/trunk/src/scripts/disk-partition.sh	2011-02-23 19:26:55 UTC (rev 5495)
@@ -29,6 +29,20 @@
 
 erase_partition()
 {
+    local device
+
+    # Try to remove old raid(s).
+    # Stop raid on all /dev/md[0..9]? devices
+    for device in $(ls /dev/md?*); do
+        echo "Stopping raid on $device"
+        /sbin/mdadm --stop $device
+    done
+    # Remove raid superblocks on $dev, no problem as we will overwrite the disk \
anyway +    for device in $(ls ${dev}*); do
+        echo "Erasing raid superblock on $device"
+        /sbin/mdadm --zero-superblock $device
+    done
+
     # OWES: ped_device_get fails after this on some CF card/adapter.
     # Using nodma install parameter helps. */
     if ( ! /bin/dd if=/dev/zero of=$dev bs=512 count=1 ); then


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic