Posts

Showing posts from July, 2013

LVM

###Logical Volume Management (LVM)###  Features:   1. Ability to create volume sets and stripe sets   2. LVM masks the underlying physical technology (ATA,ATAPI,IDE,SCSI,SATA,PATA,etc.)   3. LVM represents storage using a hierarchy:    a. Volume groups     a1. Physical volumes (/dev/sda2, /dev/sdb2, etc.)    b. Logical Volumes     b1. File systems   3. LVM physical volumes can be of various sizes   4. Ability to resize volumes on the fly Note: Volume groups join: physical volumes (PVs) and Logical Volumes (LVs) Steps to setup LVM:  1. Create LVM partitions via fdisk or parted   a. fdisk /dev/sda, /dev/sdb, /dev/sdc   b. n   c. p   d. +10G   e. t - change to type '8e' (LVM)   f. w   g. partprobe /dev/sda  2. Create Physical Volumes using 'pvcreate'   ...

Block devices and block sizes

Block Device:    A  block device  is a device you can read blocks from. For example hard disks, cdrom drives and floppies are block devices, but not the keyboard. You can receive data from the keyboard and regard them as blocks, but you cannot seek on the keyboard. You can tell a hard disk "give me block 5433", then block 7707, then block 1807 and you cannot do this with a keyboard, so, a keyboard is no block device. Block Sizes: Disk block sizes Typically, a hard disk cannot read less than 512 bytes, if you want to read less, read 512 bytes and discard the rest. This is why dd reads one block à 512 bytes in the following example: dd if=/dev/sda1 of=/dev/null count=1 1+0 records in 1+0 records out 512 bytes (512 B) copied, 1.8977e-05 s, 27.0 MB/s   File System block sizes Every file system needs to split up a partition into bloc...