Linux Disk Relationship Knowledge experience

Source: Internet
Author: User
Tags uuid

Before also more or less know Linux Disk Management, including hard disk, logic disk, LVM, but not system, but yesterday in the examination of the Linux database is still encountered a lot of problems and confusion, and by the way to review the relevant knowledge.
First look at the situation of the disk: Df-k
File system 1k-block already used% mount point available
/dev/mapper/vg_sspdb1-lv_root
51606140 2754580 46230120 6%/
Tmpfs 32984140 0 32984140 0%/dev/shm
/DEV/SDA1 495844 38042 432202 9%/boot
/dev/mapper/vg_sspdb1-lv_home
777577944 201368 737877824 1%/Home
/dev/mapper/ssp-data 1078031100 206080 1023064216 1%/opt/sspdata

See this after the sense of zoning is not very reasonable, and then looked at the disk situation: Fdisk-l
disk/dev/sda:897.0 GB, 896998047744 bytes
255 heads, Sectors/track, 109053 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x0007306b

Note: This disk is divided into two zones, one is a Linux partition, one is an LVM partition
Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 512000 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 109054 875461632 8e Linux LVM

Note: The following three partitions are Linux for the LV partition, which is the LV partition below the VG
disk/dev/mapper/vg_sspdb1-lv_root:53.7 GB, 53687091200 bytes
255 heads, Sectors/track, 6527 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

disk/dev/mapper/vg_sspdb1-lv_swap:33.8 GB, 33848033280 bytes
255 heads, Sectors/track, 4115 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

disk/dev/mapper/vg_sspdb1-lv_home:808.9 GB, 808934440960 bytes
255 heads, Sectors/track, 98347 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

disk/dev/sdb:1121.5 GB, 1121501315072 bytes
255 heads, Sectors/track, 136348 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

disk/dev/sdc:1121.5 GB, 1121501315072 bytes
255 heads, Sectors/track, 136348 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

This partition is very strange at that time seems to have been not understanding, look at the name is also very strange, not like a VG or LV partition, behind the understanding, will continue to explain later.
disk/dev/mapper/ssp-data:1121.5 GB, 1121501315072 bytes
255 heads, Sectors/track, 136348 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

First look at the PV information, you can know that the PV is the first hard disk consisting of the second disk: Pvdisplay
---physical volume---
PV Name/dev/sda2
VG Name VG_SSPDB1
PV Size 834.91 gib/not usable 3.00 MiB
Allocatable Yes (but full)
PE Size 4.00 MiB
Total PE 213735
Free PE 0
Allocated PE 213735
PV UUID Jiousx-hsbm-l1uj-roee-darr-bmrw-xfgerp

And then check the VG information: vgdisplay
---Volume Group---
VG Name VG_SSPDB1
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 834.90 GiB
PE Size 4.00 MiB
Total PE 213735
Alloc pe/size 213735/834.90 GiB
Free Pe/size 0/0
VG UUID 5fmsvl-1zfr-z01f-ktx0-qekg-rb97-wxk27c


Then query the LV verification above question: Lvdisplay
---Logical volume---
LV Path/dev/vg_sspdb1/lv_root
LV Name Lv_root
VG Name VG_SSPDB1
LV UUID Gxyyxj-kdqy-xivf-zfh8-et7h-gx5y-wjavak
LV Write Access Read/write
LV Creation Host, Time ssp-db-1, 2014-12-05 17:42:41 +0800
LV Status Available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead Sectors Auto
-Currently set to 256
Block Device 253:0

---Logical volume---
LV Path/dev/vg_sspdb1/lv_home
LV Name Lv_home
VG Name VG_SSPDB1
LV UUID NPRKVY-UC76-JJHF-OZO2-LXBR-NS59-IMA9VJ
LV Write Access Read/write
LV Creation Host, Time ssp-db-1, 2014-12-05 17:42:46 +0800
LV Status Available
# open 1
LV Size 753.38 GiB
Current LE 192865
Segments 1
Allocation inherit
Read ahead Sectors Auto
-Currently set to 256
Block Device 253:2

---Logical volume---
LV Path/dev/vg_sspdb1/lv_swap
LV Name Lv_swap
VG Name VG_SSPDB1
LV UUID Hd9hx9-eons-rpbh-qiv0-s4ky-pexv-z6rang
LV Write Access Read/write
LV Creation Host, Time ssp-db-1, 2014-12-05 17:43:52 +0800
LV Status Available
# open 1
LV Size 31.52 GiB
Current LE 8070
Segments 1
Allocation inherit
Read ahead Sectors Auto
-Currently set to 256
Block Device 253:1

Through the above query know, probably understand, the inside of the relationship, but there is a problem is/dev/mapper/ssp-data, this disk information has never know where to come from:
Then look at the hard disk information, this information can be used to know the relationship between LV and DM Block device 253:1 and the following major minor has a relationship: cat/proc/partitions
Major Minor #blocks name
8 0 875974656 SDA
8 1 512000 sda1
8 2 875461632 Sda2
253 0 52428800 dm-0
253 1 33054720 dm-1
253 2 789975040 Dm-2
8 1095216128 SDB
8 1095216128 SDC
253 3 1095216128 dm-3

Then query/dev/mapper/details, see this above name and fdisk-l name very much like it, the following is the LV name and hard disk correspondence, so we see from the df-k is vg_sspdb1-lv_home this name, is actually a shortcut link: ll/dev/mapper/
Total dosage 0
CRW-RW----. 1 root root 10, 58 December 11:35 Control
lrwxrwxrwx. 1 root root 7 December 11:45 ssp-data. /dm-3
lrwxrwxrwx. 1 root root 7 December 11:35 vg_sspdb1-lv_home. /dm-2
lrwxrwxrwx. 1 root root 7 December 11:35 vg_sspdb1-lv_root. /dm-0
lrwxrwxrwx. 1 root root 7 December 11:35 Vg_sspdb1-lv_swap. /dm-1

But I don't know where Ssp-data came from.
Then look at the storage device and its file system information: Cat/etc/fstab
/DEV/MAPPER/VG_SSPDB1-LV_ROOT/EXT4 Defaults 1 1
Uuid=1f705c1d-fc2c-43ee-87af-4900830a3ec0/boot EXT4 Defaults 1 2
/dev/mapper/vg_sspdb1-lv_home/home EXT4 Defaults 1 2
/dev/mapper/vg_sspdb1-lv_swap swap swap defaults 0 0
TMPFS/DEV/SHM TMPFS Defaults 0 0
Devpts/dev/pts devpts gid=5,mode=620 0 0
Sysfs/sys Sysfs Defaults 0 0
PROC/PROC proc Defaults 0 0
/dev/mapper/ssp-data/opt/sspdata ext4 _netdev 0 0
From the above analysis found an inconsistency, that is, the type of Ssp-data is _netdev, from the name is up to see is related to the network. We are continuing to inquire.

Look at iSCSI storage, which means that storage is enabled for this period.
Ps-ef|grep iSCSI
Root 2074 1972 14:24 pts/0 00:00:00 grep iSCSI
[[email protected] packages]# chkconfig--list|grep iSCSI
iSCSI 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Iscsid 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Take a look at iSCSI information
More/etc/iscsi/initiatorname.iscsi
Initiatorname=iqn.1994-05.com.redhat:4ef28aa338b5

Display disk array: iscsiadm-m node
10.11.102.2:3260,9 iqn.2000-09.com.fujitsu:storage-system.eternus-dx400:00c0c1p0
View file information: ls/var/lib/iscsi/nodes/
Iqn.2000-09.com.fujitsu:storage-system.eternus-dx400:00c0c1p0

The query then indicates that there are multiple paths to start: Ps-ef|grep MULTIPATHD
Root 2726 1 0 2014? 00:01:50/sbin/multipathd

Root 10379 10358 0 11:26 pts/1 00:00:00 grep multipathd


Then view: Multipath-ll
Ssp-data (3600000e00d10000000100846001f0000) dm-3 fujitsu,eternus_dx400
size=1.0t features= ' 1 queue_if_no_path ' hwhandler= ' 0 ' WP=RW
|-+-policy= ' round-robin 0 ' prio=130 status=active
| '-14:0:0:0 SDB 8:16 active ready Running
'-+-policy= ' round-robin 0 ' prio=10 status=enabled
'-13:0:0:0 SDC 8:32 Active ready Running

Then the name corresponds to the name in the Fdisk-l.

Linux Disk Relationship Knowledge experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.