[RndTbl] drive partitioning for Linux install

John Lange john.lange at open-it.ca
Thu Sep 29 21:32:20 CDT 2005


There was a lot of detail there but I think if I understand your problem
correctly you are trying to occationally replicate data between 2
partitions?

The linux command "dd" is typically used for these kinds of
applications. I think someone mentioned it in a previous email on this
topic?

dd does not care what data is on the drive, if its mounted or in use, or
about partitions or anything of the sort. The only time dd will fail is
when it encounters an error while trying to read or write.

So, a brief example would be:

# dd if=/dev/hda2 of=/dev/hdb2 bs=1M

This will move all data from the device /dev/hda2 (second partition of
the first drive) to the device /dev/hdb2 (second partition of the second
drive) using a block sizes of 1M (bs=1M is optional but it will speed up
the process since I believe the default is to read 1 byte at a time).

As mentioned, dd does not care about partitions so it can also be used
to replicate the entire drive (assuming the destination is at least as
big as the source drive)

# dd if=/dev/hda of=/dev/hdb bs=1M

As mentioned, dd will only fail if dd encounters an error which
typically would be one of:

1) device /dev/hda2 has a read error
2) device /dev/hdb2 has a write error
3) device /dev/hdb2 is smaller than /dev/hda2

As a side note, dd can be very useful for testing the media on a device.
For example:

read test:

# dd if=/dev/hda2 of=/dev/null bs=1M

write test (CAUTION! WIPES ALL DATA!):

# dd if=/dev/zero of=/dev/hda2 bs=1M

NOTE: little known fact: a failure on a read test really doesn't mean
anything. From time to time drives will develop bad sectors and the
drive itself will re-allocate those bad sectors to other places on the
disk automatically BUT it only does this on a WRITE operation! Therefore
a drive may repeatedly fail a read test but will successfully pass a
write test and from then on will pass read tests as the bad sector has
now been remapped after the write operation and the drive will work
perfectly fine for years to come.

If you are concerned about a drive failing you should use SMARTMON tools
to actually read the hardware status of the drive and notify you of
impending drive failure. These tools are actually very accurate at
detecting failing drives before they fail though you often only get less
than 24 hours notice to get your data off.

-- 
John Lange
OpenIT ltd. www.Open-IT.ca (204) 885 0872
VoIP, Web services, Linux Consulting, Server Co-Location

On Thu, 2005-09-29 at 21:02 -0500, Dan Martin wrote:
> Thanks to all for the advice re setting up my Linux system.  I'm going 
> to forget the idea of Linux distros sharing apps, and the idea of 
> migrating between different kinds of hardware.  I'm going to make 
> partitions for DOS/Win, /boot, swap, and root (/).  Once up and running, 
> I will export /home and have other PCs mount it under their /home 
> directories.  I'm going to try sharing Mozilla files between Windows 
> machines and Linux machines - I think I did this with Netscape once in 
> the past.  Eventually I will set up IMAP.
> 
> The problem now is partition hell.  I planned on using my DOS DriveStar 
> program to copy partitions from one drive to the other.  The advantage 
> is that I can run it from a floppy, and treat the contents of both hard 
> drives as data, copying from one to the other.  This eliminates any 
> potential problem of data inconsistency from copying from a drive which 
> is running the system.
> 
> I can set up partitions under Linux or using Partition Magic 7.0 (PM7) 
> under Windows 2000.  In either case, DOS based programs such as my Drive 
> Star or PM7 under DOS detect partition errors and refuse to do anything 
> - I can't even destroy the partitions under PM7. 
> 
> After many hours of getting nowhere, I destroyed the partitions using 
> fdisk under DOS, and set them up under PM7 running under DOS.  
> Everything looks fine at that point.  When I exit PM7, I am warned that 
> the system will reboot.  After rebooting straight back to DOS and again 
> running PM7, it gives a partition table error and refuses to do anything 
> to that drive - this from the program that apparently wrote the tables!
> 
> The error indicates inconsistency between how DOS reads the partition 
> info and how other OSs (including Windows) reads it - the result is 2 
> different hard drive geometries being reported.  I don't know how to fix 
> this - I would have thought creating the partitions under DOS in PM7 in 
> the first place would solve the problem - but it has still retained an 
> alternate description of drive geometry.  I can create 3 primary 
> partitions without a problem, but if I add an extended partition that 
> takes up the rest of the drive, I get the error. 
> 
> Does the "c" command in Linux fdisk have anything to do with this?  I 
> can't see that it actually does anything.
> 
> I may have to forget Drive Star, and copy from a drive running Linux as 
> discussed before, or have a second Linux system on the same drive that I 
> can boot to copy the first.
> 
> Suggestions?
> 
> 
> Bill Reid wrote:
> 
> > Trevor Cordes wrote:
> >
> >> On 24 Sep, Bill Reid wrote:
> >>
> >>>> Almost definitely not possible for numerous reasons.
> >>>
> >>>
> >>> I think this is very possible. I have shared Mozilla mailboxes 
> >>> between Linux and Windows in the past. I saw a couple of references 
> >>> that sharing of Thunderbird profiles is also possible.
> >>
> >>
> >>
> >> If you shared the mbox file, wouldn't locking get all wacky?  Say you
> >> were reading your email on Windows while your linux box was POPing some
> >> new mail into it.
> >>
> >
> > I would think Samba would handle these situations.
> >
> >> And sharing profiles/bookmarks, not to mention cache directories, would
> >> have similar problems, if attempted at the file level.  I think the
> >> safest bet would be to do like Adam suggested and use IMAP and maybe
> >> throw in LDAP for address books or (if Mozilla/TB support it)
> >> application layer roaming capabilities.
> >>
> >
> > IMAP is of course the best solution but as you say not that simple to 
> > set up.
> >
> > The problem with LDAP is that Mozilla/TB does not support updating the 
> > LDAP entries. Reading no problem.
> >
> > -- Bill
> > _______________________________________________
> > Roundtable mailing list
> > Roundtable at muug.mb.ca
> > http://www.muug.mb.ca/mailman/listinfo/roundtable
> >
> 
> 




More information about the Roundtable mailing list