[KLUG Members] Moving a HDD

Adam Tauno Williams awilliam at whitemice.org
Fri Aug 13 15:38:46 EDT 2004


> > > Is there some automagical way to tell your average Linux distro to clean
> > > out it's configured devices and whatnot.
> > > If there isn't a common linux method to do this, how about a
> > > distro-specific one.  His install is Suse 9.0.
> > Did he use LVM?  If not, no.
> Thanks for the response.
> To quote my youngest son:  "Why?"
> I'd like to get SOME understanding as to the how-why's of this.  Could you 
> describe a view from... oh, about 5,000 ft., please?

There is..
ftp://ftp.kalamazoolinux.org/pub/pdf/DiskMan1.pdf

But the short of it is that mass-storage devices (disk drives,
whatever...) are just dumb store-block/get-block things.  And partitions
are just lines in the sand, they don't contain any real meta-data
describing what they contain, who created them, when, why....  It is not
possible to do anything 'intelligent' with them.  One can make a guess
and give it a whirl (which the Linux mount command does my examining a
partition to try to guess what is in it: an ext2 filesystem, a FAT
filesystem, maybe a raw device....).

LVM virtualizes all that garbage, and adds to the physical volume and
volume group all the information needed to reconstruct the content.  It
breaks the link between /dev/sda2 (for instance) and whatever the
content is.  Because the association between /dev/??? and whatever is
only waiting to get broken even if the drive remains in the same system
but another drive is added or removed, or another controller is added,
etc...  'Real' UN*Xs and other OSs like MVS have used LVM (maybe calling
it something else) forever.  And you've had it in Windows since Windows
2000 (and the pre-cursors in NT4).

Just 'vgscan' on an LVM system and you know all kinds of things about
the storage subsystem.  Detach a drive cabinet from one system, plug it
into another, vgscan again, and there is all the information - the fact
that these drives are logically all related (volume group) what logical
volume (usually filesystems) exist, how big they are, what their names
are, etc...  And the fact that hdb is now hdd doesn't matter - the LVM
metadata reconstructs all those associations - we can still mount our
/var (or whatever) even though the disks have moved around.



More information about the Members mailing list