Debian
所有磁碟都在哪裡使用?
問這個問題幾乎有點尷尬,但我自己真的無法弄清楚這一點。我試圖找出我機器的磁碟在哪裡使用,以及它們是否真的被使用過。
如果我在我的 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
你也可以試試:
sudo pvscan
這將顯示邏輯捲管理器是否正在使用任何磁碟。您還可以使用 fdisk 來確定每個物理驅動器對應的設備:
sudo fdisk -l /dev/sda sudo fdisk -l /dev/sdb sudo fdisk -l /dev/sbc sudo fdisk -l /dev/sdd
lsblk
將向您顯示磁碟的掛載點。