Forum Moderators: bakedjake

Message Too Old, No Replies

Mounting multiple drives to one big path

         

Nutter

1:17 pm on Feb 23, 2006 (gmt 0)

10+ Year Member



I am setting up a server with 3 hard drives to be offsite storage, and I'd like to have one big folder to store everything in. Is there a way to mount all three so they appear to be one folder? Ex: /dev/hda6, /dev/hdb1, and /dev/hdc1 all mounted to /home

SeanW

1:28 pm on Feb 23, 2006 (gmt 0)

10+ Year Member



Yes, look into LVM (man lvm). You can do it by hand, or when installing. When you've got an LVM installed, you can also do cool things like snapshots, which are great for backing up live volumes.

example from them man page:


We have disk partitions /dev/sda3, /dev/sdb1 and /dev/hda2 free for use
and want to create a volume group named "test_vg". Steps required:

1. Change partition type for these 3 partitions to 0x8e with fdisk.
(see pvcreate(8): 0x8e identifies LVM partitions)

2. pvcreate /dev/sda3 /dev/sdb1 /dev/hda2

3. vgcreate test_vg /dev/sda3 /dev/sdb1 /dev/hda2

With our volume group "test_vg" now online, we can create logical vol-
umes. For example a logical volume with a size of 100MB and standard
name (/dev/test_vg/lvol1) and another one named "my_test_lv" with size
200MB striped (RAID0) across all the three physical volumes.

Steps required:

1. lvcreate -L 100 test_vg

2. lvcreate -L 200 -n my_test_lv -i 3 test_vg

Now let's rock and roll. For example create a file system with "mkfs
-t ext2 /dev/test_vg/my_test_lv" and mount it with "mount
/dev/test_vg/my_test_lv /usr1"


Sean

wheel

3:36 pm on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alternative 2: Use software Raid 0 which is how I do this.

Nutter

4:20 pm on Feb 27, 2006 (gmt 0)

10+ Year Member



Thank y'all both. Once I knew the right acronyms to look for (LVM) it was right there in the installation program to allow me to set up the partitions just like I wanted.