0
我正在嘗試在大號上找到大小。各種FS安排的不同的Linux機器。 1.純JBOD設置(我可以解析sfdisk -s) 2.硬件raid設置(再次解析fdisk -s) 3.軟件raid設置(看起來fdisk給出了總大小的錯誤,它將邏輯設備和RAID設備)在主機混合設置的主機上正確查找磁盤大小
其他分離sw-raid與真正的邏輯驅動器的方式是通過'blkid':但獲得正確的磁盤大小變得越來越複雜,即。得到'linux_raid_member'省略sfdisk列表並將它們分別添加到單獨的列表中
基本上,我在主機上有以下內容,並且希望獲得更簡單的解決方案(如果它存在並且我不知道它)。
[[email protected] ~]# blkid
/dev/sdb1: UUID="7f729082-186f-f46d-8fe8-84d260bef9d4" UUID_SUB="6fa3dc8a-31ad-fcf2-d0b2-81c18952d4d5" LABEL="blg90083.rain.yvm.yahoo.com:0" TYPE="linux_raid_member"
/dev/sdb2: UUID="7b14fafb-5312-12a2-54e9-eedb578bac65" UUID_SUB="93826b2c-eaf3-b75f-b239-a179f87d0964" LABEL="blg90083.rain.yvm.yahoo.com:1" TYPE="linux_raid_member"
/dev/sdb3: UUID="1dd82b73-ee85-6887-6f2f-9eba7cd6bdf4" UUID_SUB="78bae867-ae23-62fa-fb2b-7d32c66418d3" LABEL="blg90083.rain.yvm.yahoo.com:2" TYPE="linux_raid_member"
/dev/sdb4: LABEL="vm1" UUID="6f04ae19-0359-44f5-9772-a3d166d47ff2" TYPE="ext4"
/dev/sdc1: UUID="fac06467-eb52-53e7-c1a8-7620cfe729c2" UUID_SUB="62e39030-5031-c022- ffff-942b43e40fc5" LABEL="blg90083.rain.yvm.yahoo.com:3" TYPE="linux_raid_member"
/dev/sdc2: LABEL="vm2" UUID="ca99d725-88e9-44db-ba32-232b59901719" TYPE="ext4"
/dev/sdd1: UUID="fac06467-eb52-53e7-c1a8-7620cfe729c2" UUID_SUB="b202e3dc-d3d4-5789-f636-cb72f9ea7438" LABEL="blg90083.rain.yvm.yahoo.com:3" TYPE="linux_raid_member"
/dev/sdd2: LABEL="vm3" UUID="ee4e29f0-6128-4bbd-a896-536b42831e7c" TYPE="ext4"
/dev/sda1: UUID="7f729082-186f-f46d-8fe8-84d260bef9d4" UUID_SUB="3c84576a-21a0-6202-514a-a9a525bf96a7" LABEL="blg90083.rain.yvm.yahoo.com:0" TYPE="linux_raid_member"
/dev/sda2: UUID="7b14fafb-5312-12a2-54e9-eedb578bac65" UUID_SUB="50a6c707-2ddb-45ec-aa35-009bbb2b2e8c" LABEL="blg90083.rain.yvm.yahoo.com:1" TYPE="linux_raid_member"
/dev/sda3: UUID="1dd82b73-ee85-6887-6f2f-9eba7cd6bdf4" UUID_SUB="2b3a23f7-52cc-ed4f-4a74-3ec6202e15b8" LABEL="blg90083.rain.yvm.yahoo.com:2" TYPE="linux_raid_member"
/dev/sda4: LABEL="vm0" UUID="cfd97d8a-b970-431b-851d-0b9bbd192906" TYPE="ext4"
/dev/md0: UUID="1b9ebdab-069c-4a05-938c-6e789e896fc4" TYPE="ext3"
/dev/md1: UUID="856064eb-e631-42be-a6c3-454cbe968534" TYPE="ext4"
/dev/md2: UUID="2cd6b9b2-e043-4337-af14-1166ec770021" TYPE="ext4"
/dev/md3: UUID="b9fc9734-baf5-4f05-8bcc-8c4bbf70e0f2" TYPE="swap"
[[email protected] ~]# sfdisk -s | egrep 'md[0123]'
/dev/sdb: 1953514584
/dev/sdc: 1953514584
/dev/sdd: 1953514584
/dev/sde: 1953514584
/dev/sdf: 1953514584
/dev/sda: 1953514584
/dev/md0: 124988
/dev/md1: 7998452
/dev/md2: 63998904
/dev/md3: 15998904
total: 11809208752 blocks
[[email protected] ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/md1 7.6G 3.6G 3.9G 49%/
tmpfs 12G 0 12G 0% /dev/shm
/dev/md0 119M 55M 63M 47% /boot
/dev/sda4 1.8T 204M 1.8T 1% /vm/0
/dev/sdb4 1.8T 196M 1.8T 1% /vm/1
/dev/sdc2 1.9T 196M 1.8T 1% /vm/2
/dev/sdd2 1.9T 196M 1.8T 1% /vm/3
/dev/md2 61G 182M 60G 1% /home
在我的主機中,它看起來像這樣: – Sanjay