问这个问题几乎有点尴尬,但我自己真的无法弄清楚这个问题。我试图找出我的机器的磁盘在哪里使用以及它们是否确实被使用。
如果我在 Debian 中检查可用磁盘,我可以找到其中 4 个。这似乎是正确的。应该有一个 50GB 的磁盘、一个 120GB 的磁盘和两个 1.5TB 的磁盘。这里通过 uuid 和路径。
root@HK-MSA-DEB6-32-SHOP2:/dev/disk/by-uuid# ls -la
total 0
drwxr-xr-x 2 root root 140 Oct 22 20:19 .
drwxr-xr-x 5 root root 100 Oct 22 20:19 ..
lrwxrwxrwx 1 root root 10 Oct 22 20:19 18617f6c-d460-43ed-ac61-7f67c99fb710 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Oct 22 20:19 27aca453-55a3-42c9-b3d5-131b1e42b8c8 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Oct 22 20:19 90bef7ec-3cff-4bbb-980b-6552f67fe0c5 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Oct 22 20:19 90f63e9b-86ab-455c-b555-b8e28ecec13b -> ../../dm-3
lrwxrwxrwx 1 root root 10 Oct 22 20:19 f2d73f18-ebff-4a34-874b-1766c6ee7e20 -> ../../sda1
root@HK-MSA-DEB6-32-SHOP2:/dev/disk/by-path# ls -la
total 0
drwxr-xr-x 2 root root 260 Oct 22 20:19 .
drwxr-xr-x 5 root root 100 Oct 22 20:19 ..
lrwxrwxrwx 1 root root 9 Oct 22 20:19 pci-0000:00:07.1-scsi-1:0:0:0 -> ../../sr0
lrwxrwxrwx 1 root root 9 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:0:0-part5 -> ../../sda5
lrwxrwxrwx 1 root root 9 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:1:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:1:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:2:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:2:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:3:0 -> ../../sdd
lrwxrwxrwx 1 root root 10 Oct 22 20:19 pci-0000:00:10.0-scsi-0:0:3:0-part1 -> ../../sdd1
但是当我检查我的安装时,我找不到所有这些磁盘。
root@HK-MSA-DEB6-32-SHOP2:/dev/disk/by-id# mount
/dev/mapper/HK--MSA--DEB6--32--SHOP1-root on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw)
/dev/mapper/MSAdocuments-public on /var/MSAdocuments/public type ext4 (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.10.2:/var/local/share/webshop-backup on /mnt/msa-server2-backup type nfs (rw,sync,hard,intr,vers=4,addr=192.168.10.2,clientaddr=192.168.10.21)
nfsd on /proc/fs/nfsd type nfsd (rw)
如果我检查磁盘使用情况,我无法识别任何 1.5TB 的大磁盘
root@HK-MSA-DEB6-32-SHOP2:/dev/disk/by-id# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/HK--MSA--DEB6--32--SHOP1-root
48G 19G 27G 42% /
tmpfs 1.5G 0 1.5G 0% /lib/init/rw
udev 1.5G 124K 1.5G 1% /dev
tmpfs 1.5G 0 1.5G 0% /dev/shm
/dev/sda1 228M 28M 189M 13% /boot
/dev/mapper/MSAdocuments-public
119G 68G 45G 61% /var/MSAdocuments/public
192.168.10.2:/var/local/share/webshop-backup
926G 348G 579G 38% /mnt/msa-server2-backup
但实际上我已经迷失在这里了,我想我找错了地方。如果我只是想知道我的硬盘驱动器在 debian 操作系统中的使用方式和位置,谁能指出我必须寻找什么?只是如果这两个1.5TB实际上根本不用的话,我可以把它们拿出来用它做其他事情......
预先非常感谢您的帮助。
编辑:
root@HK-MSA-DEB6-32-SHOP2:/dev/disk/by-id# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/HK--MSA--DEB6--32--SHOP1-root / ext3 errors=remount-ro 0 1
# /boot was on /dev/xvda1 during installation
UUID=f2d73f18-ebff-4a34-874b-1766c6ee7e20 /boot ext2 defaults 0 2
/dev/mapper/HK--MSA--DEB6--32--SHOP1-swap_1 none swap sw 0 0 /dev/xvdd
#/media/cdrom0 udf,iso9660 user,noauto 0 0
UUID=90f63e9b-86ab-455c-b555-b8e28ecec13b /var/MSAdocuments/public ext4 defaults 0 2
#UUID=4975df26-0ee2-4ef9-838d-414d77e0f697 /var/MSAdocuments/private xfs defaults 0 2
192.168.10.2:/var/local/share/webshop-backup /mnt/msa-server2-backup nfs rw,sync,hard,intr 0 0
root@HK-MSA-DEB6-32-SHOP2:/dev/disk/by-id# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009ae9e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 32 248832 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 32 6527 52176897 5 Extended
/dev/sda5 32 6527 52176896 8e Linux LVM
Disk /dev/sdb: 128.8 GB, 128849018880 bytes
255 heads, 63 sectors/track, 15665 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 15665 125829081 8e Linux LVM
Disk /dev/sdc: 1649.3 GB, 1649267441664 bytes
255 heads, 63 sectors/track, 200512 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0bf85aa1
Device Boot Start End Blocks Id System
/dev/sdc1 1 200512 1610612608+ 8e Linux LVM
Disk /dev/sdd: 1649.3 GB, 1649267441664 bytes
255 heads, 63 sectors/track, 200512 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd19c2d7c
Device Boot Start End Blocks Id System
/dev/sdd1 1 200512 1610612608+ 8e Linux LVM
Disk /dev/dm-0: 51.4 GB, 51355058176 bytes
255 heads, 63 sectors/track, 6243 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 2071 MB, 2071986176 bytes
255 heads, 63 sectors/track, 251 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 3298.5 GB, 3298526494720 bytes
255 heads, 63 sectors/track, 401023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/dm-3: 128.8 GB, 128844824576 bytes
255 heads, 63 sectors/track, 15664 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/dm-3 doesn't contain a valid partition table
编辑2:
root@HK-MSA-DEB6-32-SHOP2:/# pvscan
PV /dev/sdc1 VG temp_vslide lvm2 [1.50 TiB / 0 free]
PV /dev/sdd1 VG temp_vslide lvm2 [1.50 TiB / 0 free]
PV /dev/sdb1 VG MSAdocuments lvm2 [120.00 GiB / 0 free]
PV /dev/sda5 VG HK-MSA-DEB6-32-SHOP1 lvm2 [49.76 GiB / 0 free]
Total: 4 [3.17 TiB] / in use: 4 [3.17 TiB] / in no VG: 0 [0 ]
好吧,现在我完全困惑了......有两个名为“temp_vslide”的卷组,但它们没有安装在任何地方?
编辑我不断寻找这两个驱动器的用法
root@HK-MSA-DEB6-32-SHOP2:/var/local/share/msa-server2-backup/mysql# pvscan
PV /dev/sdc1 VG temp_vslide lvm2 [1.50 TiB / 0 free]
PV /dev/sdd1 VG temp_vslide lvm2 [1.50 TiB / 0 free]
PV /dev/sdb1 VG MSAdocuments lvm2 [120.00 GiB / 0 free]
PV /dev/sda5 VG HK-MSA-DEB6-32-SHOP1 lvm2 [49.76 GiB / 0 free]
Total: 4 [3.17 TiB] / in use: 4 [3.17 TiB] / in no VG: 0 [0 ]
root@HK-MSA-DEB6-32-SHOP2:/var/local/share/msa-server2-backup/mysql# lvdisplay
--- Logical volume ---
LV Name /dev/temp_vslide/tsy
VG Name temp_vslide
LV UUID baAN28-RiLO-PfPj-mS6c-4Jef-zwnx-tS9vEA
LV Write Access read/write
LV Status available
# open 0
LV Size 3.00 TiB
Current LE 786430
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
root@HK-MSA-DEB6-32-SHOP2:/mnt/temp_vslide# dmsetup info
Name: temp_vslide-tsy
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 254, 2
Number of targets: 2
UUID: LVM-yWxHUf3aTDZJ3K0ya4PRl4oDujG0si4jbaAN28RiLOPfPjmS6c4JefzwnxtS9vEA
root@HK-MSA-DEB6-32-SHOP2:~# ls -la /mnt/temp_vslide/
total 8
drwxr-xr-x 2 root root 4096 Nov 14 2013 .
drwxr-xr-x 6 root root 4096 Nov 14 2013 ..
root@HK-MSA-DEB6-32-SHOP2:~# ls -la /dev/temp_vslide/tsy
lrwxrwxrwx 1 root root 7 Oct 22 20:19 /dev/temp_vslide/tsy -> ../dm-2
答案1
您还可以尝试:
sudo pvscan
这将显示逻辑卷管理器是否正在使用任何磁盘。您还可以使用 fdisk 确定每个物理驱动器对应哪个设备:
sudo fdisk -l /dev/sda
sudo fdisk -l /dev/sdb
sudo fdisk -l /dev/sbc
sudo fdisk -l /dev/sdd
答案2
lsblk
将显示磁盘的安装点。