Post by Clark Smith
I am about to embark on a project consisting of getting two
hard drives to appear under Linux as a single hard drive, with a
total storage roughly corresponding to the sum of both. I understand
that the way to do is either by means of LVM or else RAID. For my
very modest needs, LVM seems to be appropriate.
Both RAID and LVM2 (it is LVM2 that is in current Linux kernels) will
do this, however LVM2 will give you the ability to slice that net
double space virtual drive into multiple other drives for use, RAID
will just give you "one big disk". Which is an advantage in favor of
Do note however that this mode of usage means that you will be at
higher risk of drive failure (any one disk fails, all the data on the
"sum" disk is gone). So having a backup stragety is important if this
drive will contain anything you wish to survive over a disk failure.
Post by Clark Smith
The thing is, there are lots of LVM howtos online. Maybe too
many, which makes it time-consuming to separate the wheat from the
chaff. With this in mind, what I am asking from this forum is for
recommendations on what LVM howto(s) to peruse, especially with a
view to doing the deed in Slackware.
I don't have a particular howto suggestion, but there is something you
can do ahead of time. You can practice with a set of virtual disk
files and see which howto makes the most sense to you.
You'll need to be root to do step 2:
1) Use dd to create two empty files 1G files:
dd if=/dev/zero of=/tmp/rawdisk1 bs=1024 count=1 seek=1M
dd if=/dev/zero of=/tmp/rawdisk2 bs=1024 count=1 seek=1M
2) Next, use the loopback feature of the kernel to attach a device to
losetup -f --show /tmp/rawdisk1
losetup -f --show /tmp/rawdisk2
Each losetup above will output a device name (something that will look
like '/dev/loop0'). Keep track of those device names. You can now use
these device names to experiment with LVM2 as if those devices were
real disks. So you can tryout a howto you find online, and see if it
works for you to follow it.
When you are done, shutdown any experimental LVM2 using the loopback
devices. Then undo the loopback devices first (below I assume you
received /dev/loop0 and /dev/loop1 from #2 above, adjust to match what
you actually got in #2):
losetup -d /dev/loop0
losetup -d /dev/loop1
Then you can delete the two temp files.
If you forget which 'loop#' device is which, you can run 'losetup -a'
and it will list out the loop# devices and to which file they are
The advantage of the above is you can experiment, and learn, until you
feel comfortable, without worrying about breaking anything in the
process (or if you do break something, you can just undo/redo the
creation and start again).