Posts

Showing posts from April, 2012

Managing LVM

Create Logical Volume Firstly check the free space in your HDD: [root@sunny ~]# parted GNU Parted 2.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free                                                        Model: Virtio Block Device (virtblk) Disk /dev/vda: 16.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number  Start   End     Size    Type      File system     Flags         32.3kB  1049kB  1016kB            Free Space  1      1049kB  538MB   537MB   primary   ext4            boot  2      538MB   4732MB  4194MB  primary   ext4  3      4732MB  8402MB  3670MB  primary   ext4  4      8402MB  16.1GB  7704MB  extended  5      8404MB  9453MB  1049MB  logical   linux-swap(v1)  6      9454MB  10.5GB  1049MB  logical   ext4  7      10.5GB  11.6GB  1049MB  logical   ext4  8      11.6GB  12.6GB  1049MB  logical   ext4         12.6GB  16.1GB  3504MB            Free Space It will show you

Creating a SWAP partiton in Standard HDD layout.

Creating and activating a SWAP partition Check for any free space that is available in your HDD. [root@sunny ~]# parted GNU Parted 2.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free                                                       Model: Virtio Block Device (virtblk) Disk /dev/vda: 21.5GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number  Start   End     Size    Type      File system     Flags         32.3kB  1049kB  1016kB            Free Space  1      1049kB  525MB   524MB   primary   ext4            boot  2      525MB   4720MB  4194MB  primary   ext4  3      4720MB  8914MB  4194MB  primary   ext4  4      8914MB  21.5GB  12.6GB  extended  5      8916MB  11.0GB  2097MB  logical   ext4         11.0GB  11.0GB  456kB             Free Space  6      11.0GB  12.1GB  1049MB  logical   ext4  7      12.1GB  13.1GB  1049MB  logical   ext4  8      13.1GB  14.0GB  839MB   logical   ext4

Managing Partitions

Harddisk : It is a storage device which is used to store any kind of data, Currently there are two types of HDD available in market: SATA (Serial Advanced Technology Attachment). PATA (Parallel Advanced Technology Attachment). So the basic command to check your file system structure is fdisk -l, it will show you list of your harddisk's partition table. For more information on this you can see its man page by firing a command as man fdisk. Usually when a hard disk is inserted in a machine it acts like a file and is stored in /dev partition. So suppose that there are 3 hard disk in your machine then there naming convention would be /dev/sda (for the first HDD), /dev/sdb (for the second HDD), /dev/sdc (for the third HDD). parted : Stands for GNU Parted - a partition manipulation program, it is  a  disk  partitioning  and  partition resizing program.  It allows you to create, destroy, resize, move and copy ext2,  linux-swap,FAT,  FAT32,  and reiserfs partitions.  It can c

LVM ?

LVM is a logical volume manager for the Linux kernel, it manages disk drives and similar mass-storage devices. The term "volume" refers to a disk drive or partitions. LVM is suitable for: Managing large hard disk farms by letting you add disks, replace disks, copy and share contents from one disk to another without disrupting service (hot swapping). On small systems (like a desktop at home), instead of having to estimate at installation time how big a partition might need to be in the future, LVM allows you to resize your disk partitions easily as needed. Making backups by taking "snapshots." Creating single logical volumes of multiple physical volumes or entire hard disks, allowing for dynamic volume resizing. One can think of LVM as a thin software layer on top of the hard disks and partitions, which creates an illusion of continuity and ease-of-use for managing hard-drive replacement, repartitioning, and backup. Features of LVM: Resize