| | 43 | == Creating filesystems == |
| | 44 | |
| | 45 | If you are creating filesystems from a block device, these commands will do the trick (some modification will be needed to meet your needs): |
| | 46 | |
| | 47 | {{{ |
| | 48 | parted /dev/vda -- mklabel msdos |
| | 49 | parted /dev/vda -- unit s mkpart primary 2048 499711 |
| | 50 | parted /dev/vda -- unit s mkpart primary 499712 -1 |
| | 51 | |
| | 52 | pvcreate /dev/vda2 |
| | 53 | vgcreate vg_jones0 /dev/vda2 |
| | 54 | lvcreate --name root --size 5GB vg_jones0 |
| | 55 | lvcreate --name var --size 5GB vg_jones0 |
| | 56 | lvcreate --name var+lib+mysql --size 25GB vg_jones0 |
| | 57 | lvcreate --name tmp --size 3GB vg_jones0 |
| | 58 | lvcreate --name swap --size 1GB vg_jones0 |
| | 59 | lvcreate --name home --size 75GB vg_jones0 |
| | 60 | |
| | 61 | mkfs -t ext3 /dev/vda1 |
| | 62 | mkfs -t ext3 /dev/mapper/vg_jones0-root |
| | 63 | mkfs -t ext3 /dev/mapper/vg_jones0-var |
| | 64 | mkfs -t ext3 /dev/mapper/vg_jones0-var+lib+mysql |
| | 65 | mkfs -t ext3 /dev/mapper/vg_jones0-tmp |
| | 66 | mkfs -t ext3 /dev/mapper/vg_jones0-home |
| | 67 | |
| | 68 | mount /dev/mapper/vg_jones0-root /mnt |
| | 69 | mkdir -p /mnt/{boot,var,var,home,tmp,proc,sys,dev} |
| | 70 | }}} |
| | 71 | |