<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Help me ext2 Software RAID experts</title>
	<atom:link href="http://thomas.apestaart.org/log/?p=599&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://thomas.apestaart.org/log/?p=599</link>
	<description>Present Perfect</description>
	<lastBuildDate>Sun, 19 May 2013 11:17:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: thomas.apestaart.org &#187; Nerd Night part 2</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-20303</link>
		<dc:creator>thomas.apestaart.org &#187; Nerd Night part 2</dc:creator>
		<pubDate>Fri, 23 May 2008 16:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-20303</guid>
		<description>[...] you ask ? Well, Remember my previous problem. I never followed up on that post, because it was just too embarassing. Here&#8217;s what happened [...]</description>
		<content:encoded><![CDATA[<p>[...] you ask ? Well, Remember my previous problem. I never followed up on that post, because it was just too embarassing. Here&#8217;s what happened [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Stewart</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18630</link>
		<dc:creator>Thomas Stewart</dc:creator>
		<pubDate>Fri, 18 Apr 2008 12:51:39 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18630</guid>
		<description>Make a new 400G partition of type fd (linux raid auto) on the 500G drive, make sure it will be the same size or smaller at the largest possible partition on the 400G drive. Something like 1000 blocks shorter that the total size of the unpartitioned block device.

Then make a new raid1 mirror device using the new 400G partition on the new 500G drive.
Tell mdadm that the other half of the mirror is missing. Make a filesystem on it and copy the data from the original raid1 md device to the new one.

Once you are certain the data is copied, stop the original md device and make a new partition on the 400G disk covering the entire disk. Add a partition on the 400G drive covering the entire drive. Then just add that partition to the new md device, and let is sync.</description>
		<content:encoded><![CDATA[<p>Make a new 400G partition of type fd (linux raid auto) on the 500G drive, make sure it will be the same size or smaller at the largest possible partition on the 400G drive. Something like 1000 blocks shorter that the total size of the unpartitioned block device.</p>
<p>Then make a new raid1 mirror device using the new 400G partition on the new 500G drive.<br />
Tell mdadm that the other half of the mirror is missing. Make a filesystem on it and copy the data from the original raid1 md device to the new one.</p>
<p>Once you are certain the data is copied, stop the original md device and make a new partition on the 400G disk covering the entire disk. Add a partition on the 400G drive covering the entire drive. Then just add that partition to the new md device, and let is sync.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18628</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 18 Apr 2008 12:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18628</guid>
		<description>Create a new Raid-1 with one disk on the new 500G disk to the amount of the old disk, partition it, mount it, copy files over, remove 400G from old Raid, add it to new Raid, let it sync and be done.</description>
		<content:encoded><![CDATA[<p>Create a new Raid-1 with one disk on the new 500G disk to the amount of the old disk, partition it, mount it, copy files over, remove 400G from old Raid, add it to new Raid, let it sync and be done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C.Lee Taylor</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18612</link>
		<dc:creator>C.Lee Taylor</dc:creator>
		<pubDate>Fri, 18 Apr 2008 07:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18612</guid>
		<description>Just my R0.02 worth of noise ...

Not sure how much space one saves by not partitioning a drive, but I use it as a minor security feature ... If somebody loans/steals a drive that is part of one of my raids, they will not have an idea that it&#039;s part of my raid by the partition table ... But that is just me ... (Greetings Dag!)

You should be able mount the drive without the partition table, something like mount /dev/hdd /mnt/tmp -o ro ... Or even do an e2fsck -n /dev/hdd for read-only to see if the filesystem is intact ...

You could also check if the raid member is also recognized with something like mdamd -E /dev/hdd ... If so,. I would then start an md with mdadm -A /dev/md1 --force and then add then new member to the array, using something like mdamd /dev/md1 -a /dev/hdc1 ... 

These are just guide lines and your mileage might vary ...

Best of luck!

Mailed
LeeT</description>
		<content:encoded><![CDATA[<p>Just my R0.02 worth of noise &#8230;</p>
<p>Not sure how much space one saves by not partitioning a drive, but I use it as a minor security feature &#8230; If somebody loans/steals a drive that is part of one of my raids, they will not have an idea that it&#8217;s part of my raid by the partition table &#8230; But that is just me &#8230; (Greetings Dag!)</p>
<p>You should be able mount the drive without the partition table, something like mount /dev/hdd /mnt/tmp -o ro &#8230; Or even do an e2fsck -n /dev/hdd for read-only to see if the filesystem is intact &#8230;</p>
<p>You could also check if the raid member is also recognized with something like mdamd -E /dev/hdd &#8230; If so,. I would then start an md with mdadm -A /dev/md1 &#8211;force and then add then new member to the array, using something like mdamd /dev/md1 -a /dev/hdc1 &#8230; </p>
<p>These are just guide lines and your mileage might vary &#8230;</p>
<p>Best of luck!</p>
<p>Mailed<br />
LeeT</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter Verhelst</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18603</link>
		<dc:creator>Wouter Verhelst</dc:creator>
		<pubDate>Fri, 18 Apr 2008 02:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18603</guid>
		<description>You can&#039;t. the Linux Software RAID subsystem doesn&#039;t support shrinking devices, which would be required for your setup. However, the subsystem *does* support having two mirrors of a RAID-1 array being completely strange and different things. You can have a partition on one disk, and the full disk on the other. You can run NBD for one mirror, and a local disk for the other. I guess if you&#039;re creative with losetup, you probably could use a local file as a mirror, too (would have to check that).

Given all of that, the RAID system has to support two mirrors that are not equally sized. Just create a partition on the 500G disk that is slightly larger than the 400G disk; Linux will use the space it needs, and ignore the leftover.</description>
		<content:encoded><![CDATA[<p>You can&#8217;t. the Linux Software RAID subsystem doesn&#8217;t support shrinking devices, which would be required for your setup. However, the subsystem *does* support having two mirrors of a RAID-1 array being completely strange and different things. You can have a partition on one disk, and the full disk on the other. You can run NBD for one mirror, and a local disk for the other. I guess if you&#8217;re creative with losetup, you probably could use a local file as a mirror, too (would have to check that).</p>
<p>Given all of that, the RAID system has to support two mirrors that are not equally sized. Just create a partition on the 500G disk that is slightly larger than the 400G disk; Linux will use the space it needs, and ignore the leftover.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dag Wieers</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18586</link>
		<dc:creator>Dag Wieers</dc:creator>
		<pubDate>Fri, 18 Apr 2008 00:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18586</guid>
		<description>You may also want to look at testdisk, which is a much more mature product than gpart. Although I hope you never need it :-)

You discovered exactly why I always tell companies to partition their disks, even if it is just to use the disk as a physical volume or a RAW device. At least the partition type can give information to what the disk is being used for. Without it your future colleagues are at a loss.</description>
		<content:encoded><![CDATA[<p>You may also want to look at testdisk, which is a much more mature product than gpart. Although I hope you never need it :-)</p>
<p>You discovered exactly why I always tell companies to partition their disks, even if it is just to use the disk as a physical volume or a RAW device. At least the partition type can give information to what the disk is being used for. Without it your future colleagues are at a loss.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18585</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 18 Apr 2008 00:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18585</guid>
		<description>You should be able to do this, the DOS style partition table only lives in a single sector (inside the MBR) and even if the partition table is empty, that sector probably still lives outside of the filesystem. Notice it found the ext2 magic in sector 2...what is in sector 0 and sector 1? I suggest:

dd if=/dev/hdd bs=512 count=2 &#124; hexdump -c

Read up on the MBR (http://en.wikipedia.org/wiki/Master_boot_record) and see if what you have there is an empty one, that can be safely changed with gparted, if so, creating a primary partition across the span of the filesystem and you&#039;re rolling.</description>
		<content:encoded><![CDATA[<p>You should be able to do this, the DOS style partition table only lives in a single sector (inside the MBR) and even if the partition table is empty, that sector probably still lives outside of the filesystem. Notice it found the ext2 magic in sector 2&#8230;what is in sector 0 and sector 1? I suggest:</p>
<p>dd if=/dev/hdd bs=512 count=2 | hexdump -c</p>
<p>Read up on the MBR (<a href="http://en.wikipedia.org/wiki/Master_boot_record" rel="nofollow">http://en.wikipedia.org/wiki/Master_boot_record</a>) and see if what you have there is an empty one, that can be safely changed with gparted, if so, creating a primary partition across the span of the filesystem and you&#8217;re rolling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Kofler</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18581</link>
		<dc:creator>Kevin Kofler</dc:creator>
		<pubDate>Thu, 17 Apr 2008 23:16:36 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18581</guid>
		<description>Maybe you can partition only the 500 GB disk, set up a partition exactly as large as the entire 400 GB /dev/hdd disk and then use /dev/hdc1 and /dev/hdd for your RAID?</description>
		<content:encoded><![CDATA[<p>Maybe you can partition only the 500 GB disk, set up a partition exactly as large as the entire 400 GB /dev/hdd disk and then use /dev/hdc1 and /dev/hdd for your RAID?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tuXXX</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18580</link>
		<dc:creator>tuXXX</dc:creator>
		<pubDate>Thu, 17 Apr 2008 22:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18580</guid>
		<description>I&#039;d say :
Partition the 500G with two partitions : one of 400GB (a little more than the size of the full 400G disk), and one of the remaining capacity.
Now you have, /dev/hdd (the 400G) and /dev/hdc1 + /dev/hdc2 (the partitionned 500G).
Now let&#039;s copy the data with &quot;dd if=/dev/hdd of=/dev/hdc1&quot;
And that&#039;s it!

Now if you want to partition hdd into hdd1, I think that you&#039;ll have to use resize2fs, do the above procedure, and then partition /dev/hdd, and use dd the other way (&quot;dd if=/dev/hdc1 of=/dev/hdd1&quot;), but I don&#039;t really know if this is really useful :p.</description>
		<content:encoded><![CDATA[<p>I&#8217;d say :<br />
Partition the 500G with two partitions : one of 400GB (a little more than the size of the full 400G disk), and one of the remaining capacity.<br />
Now you have, /dev/hdd (the 400G) and /dev/hdc1 + /dev/hdc2 (the partitionned 500G).<br />
Now let&#8217;s copy the data with &#8220;dd if=/dev/hdd of=/dev/hdc1&#8243;<br />
And that&#8217;s it!</p>
<p>Now if you want to partition hdd into hdd1, I think that you&#8217;ll have to use resize2fs, do the above procedure, and then partition /dev/hdd, and use dd the other way (&#8220;dd if=/dev/hdc1 of=/dev/hdd1&#8243;), but I don&#8217;t really know if this is really useful :p.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike McGrath</title>
		<link>http://thomas.apestaart.org/log/?p=599&#038;cpage=1#comment-18574</link>
		<dc:creator>Mike McGrath</dc:creator>
		<pubDate>Thu, 17 Apr 2008 21:28:37 +0000</pubDate>
		<guid isPermaLink="false">http://thomas.apestaart.org/log/?p=599#comment-18574</guid>
		<description>Can&#039;t do it.  The old 400G drive is using all of its space for the md0 array.  By creating a partition table of any kind on it, you&#039;re going to end up with usable space smaller then the original drive.  So even if you add the 500G drive to the mix and disable the old 400G drive.  When you create the partition on it you&#039;ll be unable to add it properly because you won&#039;t have enough space to mirror to it.

I don&#039;t think there&#039;s any way to grow / shrink raid arrays at the RAID level as far as partiton size goes (you can always add / remove drives though)  So here&#039;s what I think your best bet is...  MAKE A BACKUP.


Boot via rescue disk.

Shrink the filesystem using resize2fs on your 400G drive.  Just a few M would be fine.

create a /dev/hdc1 thats less then 400G on your 500G drive.

# hdd = 400G  hdc = 500G  hdc1 = &lt;400G
dd if=/dev/hdd of=/dev/hdc1

This will fail but, in theory, the parts that fail you don&#039;t need because you resized below it.

Then run a chkfs on /dev/hdc1.

Next fdisk /dev/hdd and create a new partition of the same size that you created for the hdc1 partition.

Then re-assemble the array with just the hdc1 partition (hdc == the new drive)

mount /dev/md0 and make sure everything&#039;s there.

Then add /dev/hdd1

monitor /proc/mdstat make sure it comes back up.

alter your /etc/mdstat.conf

reboot.

Alternatively you can use the old 400G /dev/hdd and just create a 400G /dev/hdc1 and add it.

I&#039;m not totally sure if this will actually work or not, it&#039;d be an interesting lab though, I might try it tonight when I go home.</description>
		<content:encoded><![CDATA[<p>Can&#8217;t do it.  The old 400G drive is using all of its space for the md0 array.  By creating a partition table of any kind on it, you&#8217;re going to end up with usable space smaller then the original drive.  So even if you add the 500G drive to the mix and disable the old 400G drive.  When you create the partition on it you&#8217;ll be unable to add it properly because you won&#8217;t have enough space to mirror to it.</p>
<p>I don&#8217;t think there&#8217;s any way to grow / shrink raid arrays at the RAID level as far as partiton size goes (you can always add / remove drives though)  So here&#8217;s what I think your best bet is&#8230;  MAKE A BACKUP.</p>
<p>Boot via rescue disk.</p>
<p>Shrink the filesystem using resize2fs on your 400G drive.  Just a few M would be fine.</p>
<p>create a /dev/hdc1 thats less then 400G on your 500G drive.</p>
<p># hdd = 400G  hdc = 500G  hdc1 = &lt;400G<br />
dd if=/dev/hdd of=/dev/hdc1</p>
<p>This will fail but, in theory, the parts that fail you don&#8217;t need because you resized below it.</p>
<p>Then run a chkfs on /dev/hdc1.</p>
<p>Next fdisk /dev/hdd and create a new partition of the same size that you created for the hdc1 partition.</p>
<p>Then re-assemble the array with just the hdc1 partition (hdc == the new drive)</p>
<p>mount /dev/md0 and make sure everything&#8217;s there.</p>
<p>Then add /dev/hdd1</p>
<p>monitor /proc/mdstat make sure it comes back up.</p>
<p>alter your /etc/mdstat.conf</p>
<p>reboot.</p>
<p>Alternatively you can use the old 400G /dev/hdd and just create a 400G /dev/hdc1 and add it.</p>
<p>I&#8217;m not totally sure if this will actually work or not, it&#8217;d be an interesting lab though, I might try it tonight when I go home.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
