大容量磁盘(>2TB)挂载(基于lvm)
[root@dsgserver mapper]# fdisk -l
Disk /dev/mapper/mpathd: 10737.4 GB, 10737418240000 bytes
255 heads, 63 sectors/track, 1305416 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 524288 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/mpathe: 10737.4 GB, 10737418240000 bytes
255 heads, 63 sectors/track, 1305416 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 524288 bytes
Disk identifier: 0x00000000
[root@dsgserver mapper]# multipath -ll
mpathe (3600b342c404aa4ed67ced86e6d0000d1) dm-10 MacroSAN,LU
size=9.8T features=‘1 queue_if_no_path’ hwhandler=‘0’ wp=rw
|-± policy=‘round-robin 0’ prio=50 status=active
|
- 2:0:0:3 sdm 8:192 active ready running-± policy=‘round-robin 0’ prio=10 status=enabled
|- 1:0:0:3 sdk 8:160 active ready running
- 2:0:1:3 sdo 8:224 active ready running mpathd (3600b342fc141116d5d24dd8bcd0000d1) dm-9 MacroSAN,LU size=9.8T features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active |- 2:0:0:4 sdn 8:208 active ready running
-+- policy='round-robin 0' prio=10 status=enabled |- 1:0:0:4 sdl 8:176 active ready running- 2:0:1:4 sdp 8:240 active ready running
[root@dsgserver mapper]# parted /dev/mapper/mpathe
GNU Parted 2.1
Using /dev/mapper/mpathe
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt (parted) p
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/mpathe: 10.7TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart primary 0 10TB
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i
(parted) p
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/mpathe: 10.7TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 10.0TB 10000GB primary
(parted) q
Information: You may need to update /etc/fstab.
[root@dsgserver mapper]# fdisk -l
Disk /dev/mapper/mpathd: 10737.4 GB, 10737418240000 bytes
255 heads, 63 sectors/track, 1305416 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 524288 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mapper/mpathdp1 1 267350 2147483647+ ee GPT
WARNING: GPT (GUID Partition Table) detected on ‘/dev/mapper/mpathe’! The util fdisk doesn’t support GPT. Use GNU Parted.
Disk /dev/mapper/mpathe: 10737.4 GB, 10737418240000 bytes
255 heads, 63 sectors/track, 1305416 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 524288 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mapper/mpathep1 1 267350 2147483647+ ee GPT
[root@dsgserver mapper]# pvcreate /dev/mapper/mpathep1
Physical volume “/dev/mapper/mpathep1” successfully created
[root@dsgserver mapper]# vgcrete vg_dsg /dev/mapper/mpathdp1/dev/mapper/mpathep1
-bash: vgcrete: command not found
[root@dsgserver mapper]# vgcreate vg_dsg /dev/mapper/mpathdp1/dev/mapper/mpathep1
Volume group “vg_dsg” successfully created
[root@dsgserver mapper]# vgscan
Reading all physical volumes. This may take a while…
Found volume group “vg_dsg” using metadata type lvm2
Found volume group “vg_dsgserver” using metadata type lvm2
[root@dsgserver mapper]# vgdisplay
— Volume group —
VG Name vg_dsg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 18.19 TiB
PE Size 4.00 MiB
Total PE 4768370
Alloc PE / Size 0 / 0
Free PE / Size 4768370 / 18.19 TiB
VG UUID 4AaZbJ-Bx9F-w7if-Ygai-Bf5t-Bjjo-agqHJV
[root@dsgserver mapper]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_dsgserver-lv_root 50G 4.1G 43G 9% /
tmpfs 32G 0 32G 0% /dev/shm
/dev/sda1 485M 40M 420M 9% /boot
/dev/mapper/vg_dsgserver-lv_home 804G 9.3G 754G 2% /home
/dev/mapper/mpathap1 9.7T 5.8T 3.5T 63% /dsgbackup1
/dev/mapper/mpathbp1 9.7T 3.7T 5.5T 41% /dsgbackup2
/dev/mapper/mpathcp1 9.0T 168M 8.5T 1% /dsgbackup3
[root@dsgserver mapper]# mount
/dev/mapper/vg_dsgserver-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_dsgserver-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /sys/kernel/config type configfs (rw)
/dev/mapper/mpathap1 on /dsgbackup1 type ext3 (rw,_netdev)
/dev/mapper/mpathbp1 on /dsgbackup2 type ext3 (rw,_netdev)
/dev/mapper/mpathcp1 on /dsgbackup3 type ext3 (rw,_netdev)
[root@dsgserver mapper]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
[root@dsgserver mapper]# lvcreate -L +9T -n lv_name vg_name
Logical volume “lv_dsg1” created
[root@dsgserver mapper]# lvscan
ACTIVE ‘/dev/vg_dsg/lv_dsg1’ [9.00 TiB] inherit
ACTIVE ‘/dev/vg_dsgserver/lv_root’ [50.00 GiB] inherit
ACTIVE ‘/dev/vg_dsgserver/lv_swap’ [64.00 GiB] inherit
ACTIVE ‘/dev/vg_dsgserver/lv_home’ [815.90 GiB] inherit
[root@dsgserver mapper]# vgdisplay
— Volume group —
VG Name vg_dsg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 18.19 TiB
PE Size 4.00 MiB
Total PE 4768370
Alloc PE / Size 2359296 / 9.00 TiB
Free PE / Size 2409074 / 9.19 TiB
VG UUID 4AaZbJ-Bx9F-w7if-Ygai-Bf5t-Bjjo-agqHJV
— Volume group —
VG Name vg_dsgserver
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 929.90 GiB
PE Size 4.00 MiB
Total PE 238054
Alloc PE / Size 238054 / 929.90 GiB
Free PE / Size 0 / 0
VG UUID HEv5K4-hlzA-P3yl-ecO5-16y7-5SqH-uDH09r
[root@dsgserver mapper]# lvcreate -L +9T -n lv_name vg_name
Logical volume “lv_dsg2” created
[root@dsgserver mapper]# lvscan
ACTIVE ‘/dev/vg_dsg/lv_dsg1’ [9.00 TiB] inherit
ACTIVE ‘/dev/vg_dsg/lv_dsg2’ [9.00 TiB] inherit
ACTIVE ‘/dev/vg_dsgserver/lv_root’ [50.00 GiB] inherit
ACTIVE ‘/dev/vg_dsgserver/lv_swap’ [64.00 GiB] inherit
ACTIVE ‘/dev/vg_dsgserver/lv_home’ [815.90 GiB] inherit
[root@dsgserver mapper]# lvdisplay
— Logical volume —
LV Path /dev/vg_dsg/lv_dsg1
LV Name lv_dsg1
VG Name vg_dsg
LV UUID rQ3sYK-HqQe-nFGl-g7OE-N1qd-Dt4G-xADpsc
LV Write Access read/write
LV Creation host, time dsgserver, 2018-09-26 16:41:28 +0800
LV Status available
open 0
LV Size 9.00 TiB
Current LE 2359296
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:13
— Logical volume —
LV Path /dev/vg_dsg/lv_dsg2
LV Name lv_dsg2
VG Name vg_dsg
LV UUID C3gVQD-R8g3-0qR6-VMvp-asYD-KjoN-zdkAiQ
LV Write Access read/write
LV Creation host, time dsgserver, 2018-09-26 16:42:33 +0800
LV Status available
open 0
LV Size 9.00 TiB
Current LE 2359296
Segments 1
Allocation inherit
Read ahead sectors auto
-
currently set to 256
Block device 253:14[root@dsgserver mapper]# mkfs.ext3 /dev/vg_dsg/lv_dsg1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=128 blocks
603979776 inodes, 2415919104 blocks
120795955 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
73728 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, 512000000, 550731776, 644972544, 1934917632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@dsgserver mapper]# mkfs.ext3 /dev/vg_dsg/lv_dsg2
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=128 blocks
603979776 inodes, 2415919104 blocks
120795955 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
73728 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, 512000000, 550731776, 644972544, 1934917632
Writing inode tables: done
Creating journal (32768 blocks): done
格式化完成后,mount即可
- Linux两块磁盘挂载指向一个文件夹LVM磁盘管理(一)
- lvm讲解与磁盘挂载问题排除
- 磁盘管理之基于软RAID的LVM
- LVM讲解和磁盘挂载故障
- Linux两块磁盘挂载指向一个文件夹LVM磁盘管理(二)
- 关于liunx下,基于软raid5制作lvm逻辑卷(磁盘扩容与容错)
- linux下如何mount挂载lvm磁盘
- Linux磁盘挂载与RAID和LVM
- linux下如何mount挂载lvm磁盘
- Linux parted 大容量磁盘2t以上 分区及挂载
- LINUX 2TB 以上大容量硬盘 挂载分区
- Vmware centos 虚拟机根分区磁盘扩容(基于LVM)
- 掌握管理Linux磁盘和分区的方法 创建并挂载文件系统以及 创建并管理LVM
- Linux - 挂载磁盘 + 通过LVM动态实现磁盘的动态扩容
- Ubuntu挂载LVM磁盘
- Linux两块磁盘挂载指向一个文件夹LVM磁盘管理(三)
- Linux上把新磁盘扩展到已有分区中(基于LVM)
- LVM磁盘镜像同步备份
- linux服务器挂载新磁盘步骤
- 解决Linux下挂载LVM重名问题