Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-29-2008, 09:15 PM
|
#1
|
LQ Newbie
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25
Rep:
|
RAID1 array down to one disk with bad blocks, clone to good disk with dd noerror?
Hello,
I have a server which I tried to set up a software RAID1 (mdadm) array on. I was succesful, sort of. There are 3 logical partitions (/boot, swap, and /), which were to be mirrored between two 500GB WD hard drives, sda and sdb. Installation of Debian Lenny went without a hitch. The /boot and swap partitions would sync on the array from sda to sdb just fine, but the large / partition would not sync. It would get to about 65% and then restart the sync from scratch. I have determined that there are bad blocks on both sda and sdb, and this was causing the sync to restart. However, I haven't filled up the / partition to anywhere near that capacity yet, so I don't think there is anything important on those bad blocks.
I removed sdb from the array, so, in short, I now have a working Debian installation living on the good part of a bad disk in a RAID1 array of, well, only 1 disk.
My question is this: If I use dd with the noerror switch, and clone sda to some working replacement drive, will the ext3 filesystem be corrupt due to the null spaces that dd swapped for the bad blocks?
I.E. does the ext3 filesystem put any important information in areas of the disk that haven't been used yet? Or are those blocks essentially full of zeroes until the filesystem places some files or directories on them?
I appreciate any advice. Sure, I don't want to reinstall and reconfigure my software, but for the most part, I am curious.
Thank you!
Last edited by ewolf; 04-29-2008 at 09:24 PM.
Reason: grammar
|
|
|
05-10-2008, 12:40 AM
|
#3
|
LQ Newbie
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25
Original Poster
Rep:
|
Thanks for the links, they were helpful.
I just copied the drive over with
dd if=/dev/sdX of=/dev/sdY bs=512 conv=noerror,sync
and everything went smoothly. When I use dd to make backup images, I usually use a much larger block size to make things go faster, but since bad blocks are overwritten with zeroes when the noerror,sync flags are set, I think that using the 512 byte block size is important in this scenario.
In addition, the second replacement drive arrived from WD and the initial RAID1 sync seems to have gone without a hitch.
Cheers,
Elijah
|
|
|
All times are GMT -5. The time now is 08:07 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|