2016 re-picking Linux shards

Source: Internet
Author: User

1. Adding a new hard disk to a Linux server

A fdisk/dev/sdb or a pvcreate/dev/sdb.

M

N

P

1

T

82

W

Q

Two mkfs.ext3/dev/sdb1 or mkfs-t ext3/dev/sdb1 or mkfs-j/dev/sdb1

Three MKDIR/NEWFS

Mount/dev/sdb1/newfs

Add swap

1. Hard disk (primary partition, with logical partition can become switch partition, but logical partition logical partition need to restart machine)

A fdisk/dev/sdb

M

T

82

W

Q

Two MKSWAP/DEV/SDB1

Three activations: SWAPON/DEV/SDB1 or off SWAPOFF/DEV/SDB1

2. Documents

Touch/swapfile

DD If=/dev/zero of=/swapfile bs=1024 count=5000 (500*1024byte)

Mkswap/swapfile

Swapon/swapfile

About physical volume, physical disk volume, logical volume, logical disk volume, and logical disks management

PV: is a partition of a hard disk so understand

Pe:pe=lv,pe is a basic unit that makes up PV

LV:LV is composed of le ...

Le=pe

LVM: is a collection of LV.

Physics Volume

Physics extent

Logic Volume

Logic Extend

Logic Volume Manage

PVCREATE/DEV/SDB Create a partition or Fdisk/dev/sdb N p 1

Vgcreate MYVOLUME/DEV/SDB1/DEV/SDC1 #创建一个VG (consisting of SDB1,SDC1)

Vgextend Myvolume/dev/sde1 #sde1加到myvolume

Vgdisplay volgroup00

And then there's lvcreate.

Lvcreate-l (50*32m) myvolume-n mylgical

Mkfs-j/dev/myvolume/mylogical

Mount-t Ext3/dev/myvolume/mylogical/mnt/newvolume

Lvextend-l 2000m/dev/myvolume/mylogical # put the extra space in the Myvolume


This article is from the "samly" blog, make sure to keep this source http://323248.blog.51cto.com/313248/1813943

2016 re-picking Linux shards

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.