Dale writes:

> Quick question about LVM.  I have a 750Gb drive that has miscellaneous
> stuff on it.  Stuff likes videos, music, pictures, ISO files and a few
> other things.  It's not full yet but it is working on it.  I have my OS
> on sda.  The large drive is on sdc.  If I buy another drive it should be
> sdd.  I think this is possible from what I have read but want to make
> sure.  Could I put sdc and sdd on LVM but the OS remain as it is with
> LVM not involved at all?  Basically, my OS stays just like it is and is
> not touched my LVM at all but the two larger drives are managed by LVM.
> 
> I want to do it this way because I don't trust LVM enough to put my OS
> on.  Just my personal opinion on LVM.

# create some partitions, or a single one. I prefer to have multiple ones, 
just in case I want to put other stuff there, like another OS.
cfdisk /dev/sdd

# create physical volumes (assuming you have /dev/sdd5 to /dev/sdd8)
pvcreate /dev/sdd[5678]

# create volume group 'stuff', using all those partitions
vgcreate stuff /dev/sdd[5678]

# create logical volumes. You probably will only have a single one, but 
here's how you would do this if you want three.
lvcreate -L 300G -n music    stuff
lvcreate -L 100G -n pictures stuff
lvcreate -L 100G -n other    stuff

# create file systems
for fs in music pictures other
do
        mke2fs -j -m 1 -L $fs /dev/stuff/$fs
done

> If there is a better solution to link two large drives, I'm open to
> those ideas as well.  LVM is all I can think of is why I mention it.

RAID would be another solution.
Beware, when one drive fails, all data can be lost.

# mount the filesystems, and move stuff from sdc to them

# call cfdisk and partition sdc (if you like)

# create physical volumes:
pvcreate /dev/sdc*

# extend volume group
vgextend stuff /dev/sdc*

# want to enlarge file systems?
lvresize -L 1000G /dev/stuff/other
resize2fs /dev/stuff/other

Use pvscan, lvscan and vgscan to check what physical/logical volumes and 
volume groups you have. {pv,lv,vg}dispklay  give more verbose information.

You might want to have more than one volume group. Maybe one for not so 
important data, that spans over two disks, and one or two that reside on a 
single drive only. So in case one drive fails, you do not lose too much 
data. What about a volume group that stores backups of each file system on 
sda?

        Wonko

Reply via email to