Add a new SATA disk 4Glinux-0k5g:~ # fdisk-lDISK/DEV/SDA:8589 MB, 8589934592 bytes255 heads, $ sectors/track, 1044 cylindersunits = cylinders of 16065 * = 8225280 Bytesdisk i dentifier:0x0002ba94 Device Boot Start End Blocks Id system/dev/sda1 1 194 1558273+ Swap/solaris/dev/sda2 * 195 847 5245222+ 84 8 1044 1582402+ LinuxDisk/dev/sdb: 4294 MB, 4294967296 bytes255 heads, $ sectors/track, 522 cylindersunits = cylinders of 16065 * = 8225280 Bytesdisk Identifier:0x00000000disk/dev/sdb doesn ' t contain a valid partition tableafter the partition is finishedDevice Boot Start End Blocks Id system/dev/sdb1 1 1004031 linux/d EV/SDB2 126 1004062+ LINUX/DEV/SDB3 251 522 2184840 5 Extende 251 313 506016 D/DEV/SDB5 LINUX/DEV/SDB6 314 376 506016 X/DEV/SDB7 377 522 1172713+-Up LinuxCreate PV (missing modified partition ID is 8e)linux-0k5g:~ # LVM pvcreate/dev/sdb{2,5,6,7}Physical volume "/DEV/SDB2" Successfully created physical volume "/DEV/SDB5" Successfully created physical volume "/dev/ SDB6 "Successfully created physical volume"/DEV/SDB7 "successfully createdlinux-0k5g:~ # LVM PvscanPV/DEV/SDB2 lvm2 [980.53 MB] PV/DEV/SDB5 lvm2 [494.16 MB] PV/DEV/SDB6 lvm2 [494.16 MB] pv/d EV/SDB7 lvm2 [1.12 GB] total:4 [3.04 GB]/in use:0 [0]/in no vg:4 [3.04 GB]Create VGlinux-0k5g:~ # LVM vgcreate-s 16M vg_srsy/dev/sdb{2,5,6,7} Volume Group "Vg_srsy" successfully createdlinux-0k5g:~ # LVM PvscanPV/DEV/SDB2 VG vg_srsy lvm2 [976.00 mb/976.00 MB Free]# The capacity becomes smaller because Vgda information is added to each PVPV/DEV/SDB5 VG Vg_srsy lvm2 [480.00 mb/480.00 MB free] pv/dev/sdb6 VG vg_srsy lvm2 [480.00 mb/480.00 MB fre E] pv/dev/sdb7 VG vg_srsy lvm2 [1.11 gb/1.11 GB Free] total:4 [3.00 GB]/inch Use:4 [3.00 GB]/in no vg:0 [0 ] linux-0k5g:~ # LVM vgdisplay---Volume group---VG Name vg_srsy System ID Format LVM2 Metadata Areas 4 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 4 Act PV 4 VG Size 3.00 GBPE Size 16.00 MB Total PE 192# A total of 192 PEAlloc pe/size 0/0 free pe/size 192/3.00 GB VG UUID MBL8KI-MP2W-QZKB-5EBE-KT2K-TYFD -5lpdi1now logically create a "large disk", the following "large disk" partition, that is, create two LV
linux-0k5g:~ # LVM lvcreate-l 96-n lv1_srsy vg_srsylinux-0k5g:~ # LVM lvcreate-l 96-n lv2_srsy Vg_srs Y linux-0k5g:~ # LVM Lvscan(or Lvdisplay) ACTIVE '/dev/vg_srsy/lv1_srsy ' [1.50 GB] Inherit# Note The LV full name is this ohACTIVE '/dev/vg_srsy/lv2_srsy ' [1.50 GB] Inheritcreate file system for LV1 (format)
linux-0k5g:~ # Mkfs.ext3/dev/vg_srsy/lv1_srsyMount linux-0k5g:~ # mkdir/mnt/lvmlv1linux-0k5g:~ # mount/dev/vg_srsy/lv1_srsy/mnt/lvmlv1 linux-0k5g:~ # DFFilesystem 1k-blocks used Available use% mounted on/dev/sda2 5162828 2414952 2485616 50% /udev 387404 387272 1%/dev/dev/sda3 1557496 247504 1230872 17%/Home /dev/mapper/vg_srsy-lv1_srsy# The location of the logical volume is here!!! 1548144 35112 1434392 3%/mnt/lvmlv1View partition StatusLinux-0k5g:/dev # fdisk-ldisk/dev/sda:8589 MB, 8589934592 bytes255 heads, sectors/track, 1044 cylindersunits = cylinders of 16065 * = 8225280 Bytesdisk IdentiFi er:0x0002ba94 Device Boot Start End Blocks Id system/dev/sda1 1 194 1558 273+ Swap/solaris/dev/sda2 * 195 847 5245222+ 848 1044 1582402+ Linuxdisk/dev/sdb:4294 MB, 4294967296 bytes255 heads, sectors/track, 522 cylindersunits = cylinders of 16065 * = 8225280 Bytesdisk identifie r:0xb9091808 Device Boot Start End Blocks Id system/dev/sdb1 1 125 10040 LINUX/DEV/SDB2 126 1004062+ LINUX/DEV/SDB3 251 522 21848 5 EXTENDED/DEV/SDB5 251 313 506016 LINUX/DEV/SDB6 314 376 5 06016 LINUX/DEV/SDB7 377 522 1172713+ Linuxdisk/dev/dm-0:1610 MB,1610612736 bytes255 heads, sectors/track, 195 cylindersunits = cylinders of 16065 * = 8225280 bytesdisk identifier: 0x00000000disk/dev/dm-0 doesn ' t contain a valid partition table# What does this mean? disk/dev/dm-1:1610 MB,1610612736 bytes255 heads, sectors/track, 195 cylindersunits = cylinders of 16065 * = 8225280 bytesdisk identifier: 0x00000000disk/dev/dm-1 doesn ' t contain a valid partition table# with LVM lvdisplay view found two LV is block device 253:0 and block device 253:1
Dev/mapper/vg_srsy-lv1_srsy and Vg_srsy-lv2_srsy with Ls-al view are also 253:0 253:1, in addition dm-0 and Dm-1 is also
brw-r-----1 root disk 253,0 Jul 11:56 dm-0
brw-r-----1 root disk 253,1 Ju1 11:57 dm-1
this piece doesn't quite understand ...