lvm question

Les hlhowell at pacbell.net
Fri Apr 13 23:40:07 UTC 2007


On Thu, 2007-04-12 at 17:40 -0400, Gene Heskett wrote:
> On Thursday 12 April 2007, Ed Greshko wrote:
> >Gene,
> >
> >> So I started a dd if=/dev/hda of=/dev/hdd which cloned that 160GB drive to
> >> a 200GB drive.
> >
> >AFAIK, when you dd in that manner, you are cloning as you say.  In that way,
> >you are cloning everything.  By everything I mean you are cloning the disk
> >label, partition table, inodes and all bad bits.  In effect, you've made a
> >200GB drive into a 160GB drive.
> 
> Rant mode on here Ed.
> 
> Not permanently.  I was able to use fdisk and add a 4th partition to account 
> for the rest of the drive after I was done.  That's why I asked the question 
> about adding it to the LVM setup for real use, but no one has offered any how 
> to on that, not yet anyway.
> 
> What I didn't understand was why it (/dev/hda3, the lvm volume) fsck'd on the 
> first couple of boots after I'd made the the clone while I was fixing the 
> partition table and usage on /dev/hdd to more or less match what was 
> in /etc/fstab, since it dropped to a shell when it couldn't find the right 
> stuff on the right partition of /dev/hdd.  There is no reason in the world 
> that can explain why I couldn't edit /etc/fstab and comment that stuff out 
> until I had a chance to get the main install fixed.  I even went so far as to 
> edit the grub line from ro to rw and it made no difference at all.  But that 
> was on /dev/hda1, which mounted just fine as rw so it was editable.
> 
> In short, I lost some hair trying to get around that when the stuff on hdb and 
> hdd had absolutely NOTHING to do with a functioning, bootable system other 
> that I'd forgotten to clean them out of /etc/fstab before I unmounted hdd, 
> and cloned hda to it on a live system.
> 
> There was, and is, no valid excuse for that behaviour.  What was on /dev/hdd 
> was only partitioned out of order.  That was accessory stuff that could have 
> been fixed a hell of a lot easier from a booted, working system, but it 
> turned into a cast iron bitch trying to do all that from a Zod livedvd boot.  
> Even from the dvd boot, anything on /dev/hda3 was read-only without at that 
> point, any errors being reported on screen by e2fsck, none, nada, zip.  They 
> didn't show up until I got the partitions in a row on /dev/hdd and it booted 
> past that only to upchuck over the lvm on hda3.  Then, and only then did it 
> give me the correct command line to use to do an e2fsck on an lvm volume.  
> The manpages on the dvd were worthless in that regard.  The e2fsck took 
> around 5 hours, but I napped 2 of them maybe.  The real fix should have taken 
> maybe 5 minutes, to correct /etc/fstab, but on a readonly disk, how the heck 
> are you gonna do that?
> 
> FWIW, and probably a different reason, even though the livedvd had not mounted 
> anything from /dev/hda, it still refused me write perms to do anything to it.  
> Not parted, not fdisk, nothing.  Everything claimed the disk was busy.  To 
> say that it was frustrating is an understatement of classic proportions.  
> That is what forced me to run fdisk against a live, in use, drive.  But I 
> didn't touch the existing partitions, only added another, 4th primary to 
> account for the unused 40GB of that drive.
> 
> That should not have had any effect on the first 3 partitions, and in fact I 
> have done exactly that previously, on a 30GB drive in an amiga.  I cloned a 
> 1GB seacrate to it, rebooted to it, and then added the other partitions I 
> wanted.  The amiga, FWIW, did NOT limit the number of partitions per drive by 
> any means other than running out of system memory since each mount took about 
> 64k to hold all the tables.  There was a reserved area of about 32k that 
> could be expanded up to half a meg on an amiga-os formatted hard drive that 
> could be used for all sorts of stuff, like a partition table with 10 or more 
> entries, security passwords, custom boot files etc, and anything in there was 
> invisible and not normally modifiable without getting out the disk tools.  
> That was, IMO, one thing they did do right.
> 
> -- 
> Cheers, Gene
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> The Marines:
> 	The few, the proud, the not very bright.
> 
I have to agree with your rant about fixing things.  I had really
clobbered this disk with some "fixes" that I did that got out of control
during the "yum remove" exercise, when a bunch of dependencies were
removed along with the one file I wanted removed.... GRRRRR!  

<rant2>
	But the last line above about the Marines is not quite right, if you
have seen the new gear these lads here in Pendleton drive and manage.  I
know a few that have thought about taking their vehicles to Mr. Kerry's
house ;-) over his version of this very comment.   Also don't forget
that these young lads will do their very best to protect our soft
behinds, up to and all too often including the ultimate act.   Would you
do the same for them?
 
</rant2>




More information about the users mailing list