lvs 分割槽
[root@ecs-bigdata-cdh01-1021973 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 100G 0 disk
├─vda1 253:1 0 4G 0 part [SWAP]
└─vda2 253:2 0 96G 0 part /
vdb 253:16 0 1T 0 disk
[root@ecs-bigdata-cdh01-1021973 ~]# fdisk /dev/
Display all 151 possibilities? (y or n)
[root@ecs-bigdata-cdh01-1021973 ~]# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xc78f8ebc.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-2147483647, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2147483647, default 2147483647):
Using default value 2147483647
Partition 1 of type Linux and of size 1024 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@ecs-bigdata-cdh01-1021973 ~]#
Complete!
[root@ecs-bigdata-cdh01-1021973 ~]# pvcreate /dev/vdb1
Physical volume "/dev/vdb1" successfully created.
[root@ecs-bigdata-cdh01-1021973 ~]# vgc
vgcfgbackup vgcfgrestore vgchange vgck vgconvert vgcreate
[root@ecs-bigdata-cdh01-1021973 ~]# vgcreate VolGroup /dev/vdb1
Volume group "VolGroup" successfully created
[root@ecs-bigdata-cdh01-1021973 ~]#
[root@ecs-bigdata-cdh01-1021973 ~]#
[root@ecs-bigdata-cdh01-1021973 ~]# vgchange -a y VolGroup
0 logical volume(s) in volume group "VolGroup" now active
[root@ecs-bigdata-cdh01-1021973 ~]# lvcreate -L 900G -n lv_data VolGroup
Logical volume "lv_data" created.
[root@ecs-bigdata-cdh01-1021973 ~]# mkdir /data
[root@ecs-bigdata-cdh01-1021973 ~]# mkfs
mkfs mkfs.btrfs mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.minix mkfs.xfs
[root@ecs-bigdata-cdh01-1021973 ~]# mkfs.ext4 /dev/
Display all 154 possibilities? (y or n)
[root@ecs-bigdata-cdh01-1021973 ~]# mkfs.ext4 /dev/VolGroup/lv_data .
./ .bash_history .bash_profile .cshrc .tcshrc
../ .bash_logout .bashrc .ssh/
[root@ecs-bigdata-cdh01-1021973 ~]# mkfs.ext4 /dev/VolGroup/lv_data
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
58982400 inodes, 235929600 blocks
11796480 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2384461824
7200 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
[root@ecs-bigdata-cdh01-1021973 ~]# mount -t ext4 /dev/VolGroup/lv_data
mount: can't find /dev/VolGroup/lv_data in /etc/fstab
[root@ecs-bigdata-cdh01-1021973 ~]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/133735/viewspace-2919728/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux分割槽方案、分割槽建議Linux
- oracle分割槽表和分割槽表exchangeOracle
- PostgreSQL/LightDB 分割槽表之分割槽裁剪SQL
- Linux 分割槽擴容(根分割槽擴容,SWAP 分割槽擴容,掛載新分割槽為目錄)Linux
- Oracle分割槽表基礎運維-07增加分割槽(2 HASH分割槽)Oracle運維
- oracle分割槽表和非分割槽表exchangeOracle
- 非分割槽錶轉換成分割槽表
- [oracle] expdp 匯出分割槽表的分割槽Oracle
- Oracle分割槽表基礎運維-07增加分割槽(1範圍分割槽)Oracle運維
- 分割槽Partition
- openGauss 分割槽
- Kafka 分割槽Kafka
- mysql 分割槽MySql
- Linux 新增LVM分割槽及LVM分割槽擴容LinuxLVM
- MySql資料分割槽操作之新增分割槽操作MySql
- Hive的靜態分割槽與動態分割槽Hive
- Oracle分割槽表基礎運維-07增加分割槽(3列表分割槽)Oracle運維
- Oracle12c:建立主分割槽、子分割槽,實現自動分割槽插入效果Oracle
- PG的非分割槽表線上轉分割槽表
- 【Linux】MBR磁碟分割槽表只能有四個分割槽?Linux
- 建立sawp分割槽
- MySql建立分割槽MySql
- 【MYSQL】 分割槽表MySql
- 範圍分割槽
- 配置FLASH分割槽
- linux硬碟分割槽Linux硬碟
- 磁碟分割槽管理
- 理解MySQL分割槽MySql
- linux分割槽方案Linux
- 搞懂MySQL分割槽MySql
- Oracle分割槽表基礎運維-09刪除分割槽Oracle運維
- Oracle分割槽表基礎運維-05組合分割槽Oracle運維
- Oracle分割槽表基礎運維-02範圍分割槽Oracle運維
- Oracle分割槽表基礎運維-03HASH分割槽Oracle運維
- Hive中靜態分割槽和動態分割槽總結Hive
- oracle 分割槽表move和包含分割槽表的lob moveOracle
- 移動分割槽表和分割槽索引的表空間索引
- 分割槽表之自動增加分割槽(11G)