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