5. Harddisk support

In the explanation below, we use hdc as the harddrive, replace this with the devicename your harddisk is using.

In order to enable harddisk support for Devil-Linux, you have to install the LVM Tools.

5.1. Create Partition

Create one partition on the harddisk you want to use using the command fdisk. The result of fdisk -l should look like this:

Disk /dev/hdc: 16 heads, 63 sectors, 8126 cylinders
Units = cylinders of 1008 * 512 bytes 
Device Boot Start End Blocks Id System 
/dev/hdc1 1 8126 4095472+ 8e Linux LVM 

5.2. Create Physical Volume

Create a physical volume (PV) from the partiton created in step above.

pvcreate <device>

Example:

pvcreate /dev/md/0

5.3. Create Volume Group

Create a volume group (VG) named devil-linux using the PV /dev/md/0

vgcreate -s 8M devil-linux /dev/md/0

[Note] Note

Increase the PhysicalExtentSize of 8M to make use of more than 512GB

You need to use the long devfs name for devices, i.e. /dev/scsi/host0/bus0/target0/lun0/part1

5.4. Logical Volumes

Now we are going to create the "partitions" (=logical volumes). Each of the Logical Volumes is optional, so just create the ones you need. Also adjust the size of the LVs to fit your needs

5.4.1. Create Logical Volumes

Create the LV using the following commands:

lvcreate -L <size> -n <LV name> devil-linux

mkfs.reiserfs /dev/devil-linux/<LV name>

Example:

lvcreate -L 512M -n log devil-linux

mkfs.reiserfs /dev/devil-linux/log

[Note] Note

of course you can use other formats, like JFS (mkfs.jfs)

Table 1.5. List of supported LVs

LV name mount point comment
swap none use mkswap to format this partition. Add "-C y" to the lvcreate command to have a continous swap space.
log /var/log  
spool /var/spool  
imap /var/imap  
squid /var/squid  
data /var/data  
opt /opt This is a good place to install programs, which need to be on the harddisk.
home /home  

5.5. Finalizing

Save your configuration (so you have a least one lvmbackupfile)

vgscan

save-config

Now reboot to test if all logical volumes get mounted correctly.