玩会儿LVM2

首先新建几个分区,再调个格式。

Command (m for help): t
Partition number (1-9): 8
Hex code (type L to list codes): 8e
Changed system type of partition 8 to 8e (Linux LVM)

Command (m for help): t
Partition number (1-9): 9
Hex code (type L to list codes): 8e
Changed system type of partition 9 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

同步一下
[root@sctest 桌面]# partx -a /dev/sda
BLKPG: Device or resource busy
error adding partition 1
BLKPG: Device or resource busy
error adding partition 2
BLKPG: Device or resource busy
error adding partition 3
BLKPG: Device or resource busy
error adding partition 4
BLKPG: Device or resource busy
error adding partition 5
BLKPG: Device or resource busy
error adding partition 6
BLKPG: Device or resource busy
error adding partition 7
BLKPG: Device or resource busy
error adding partition 8
BLKPG: Device or resource busy
error adding partition 9
[root@sctest 桌面]# partx -a /dev/sda
BLKPG: Device or resource busy
error adding partition 1
BLKPG: Device or resource busy
error adding partition 2
BLKPG: Device or resource busy
error adding partition 3
BLKPG: Device or resource busy
error adding partition 4
BLKPG: Device or resource busy
error adding partition 5
BLKPG: Device or resource busy
error adding partition 6
BLKPG: Device or resource busy
error adding partition 7
BLKPG: Device or resource busy
error adding partition 8
BLKPG: Device or resource busy
error adding partition 9
[root@sctest 桌面]# pv
bash: pv: command not found
[root@sctest 桌面]# pv
pvchange   pvck       pvcreate   pvdisplay  pvmove     pvremove   pvresize   pvs        pvscan     pv.sh      
[root@sctest 桌面]# blkid
/dev/sda2: UUID="a52d371b-98b3-4760-9bae-ffa65741c29f" TYPE="ext4" 
/dev/sda3: UUID="98401299-31a2-4d31-a7f5-02d37b0cf894" TYPE="swap" 
/dev/sda5: UUID="e9d20116-d021-49c6-9352-9a601f3e8aa3" TYPE="ext4" 
/dev/sda1: UUID="28def929-d957-4af2-9ff5-b39fdc0e9fd5" TYPE="ext4" 
/dev/sda6: UUID="e6805083-14b0-4d65-bc7c-7f466a698a7c" TYPE="ext4" 
[root@sctest 桌面]# fdisk /dev/sda

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0009ecf4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       51057   409600000   83  Linux
/dev/sda3           51057       53224    17408000   82  Linux swap / Solaris
/dev/sda4           53224      121601   549239008+   5  Extended
/dev/sda5           53225       66280   104864288   83  Linux
/dev/sda6           66281       66935     5253256   8e  Linux LVM
/dev/sda7           66936       67980     8393960+  8e  Linux LVM
Partition 7 does not start on physical sector boundary.
/dev/sda8           67981       69287    10490416+  8e  Linux LVM
Partition 8 does not start on physical sector boundary.
/dev/sda9           69288       71899    20980888+  8e  Linux LVM
Partition 9 does not start on physical sector boundary.

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@sctest 桌面]# pvs
[root@sctest 桌面]# pvmove /dev/sda6
  Failed to find physical volume "/dev/sda6".
  Run `pvmove --help' for more information.

将6789分区创建为PV
[root@sctest 桌面]# pvcreate -v /dev/sda6
    Wiping cache of LVM-capable devices
    Set up physical volume for "/de

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值