이 질문을 하는 것은 거의 부끄러운 일이지만, 나 스스로는 그것을 정말로 이해할 수 없습니다. 내 컴퓨터의 디스크가 어디에 사용되고 있는지, 실제로 사용되고 있는지 알아보려고 합니다.
데비안에서 사용 가능한 디스크를 확인하면 그 중 4개를 찾을 수 있습니다. 이것이 맞는 것 같습니다. 50GB 디스크 1개, 120GB 디스크 1개, 1.5TB 디스크 2개가 있어야 합니다. 여기에 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
하지만 실제로 저는 여기서 길을 잃었습니다. 제가 잘못된 곳을 찾고 있는 것 같습니다. 데비안 OS에서 내 하드 드라이브가 어디에 어떻게 사용되는지 알고 싶다면, 내가 무엇을 찾아야 하는지 알려줄 수 있는 사람이 있나요? 다만 저 1.5TB 2개는 실제로 전혀 사용하지 않는다면 꺼내서 다른 일을 할 수도 있을 것 같은데...
귀하의 도움에 미리 감사드립니다.
편집하다:
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
디스크의 마운트 지점이 표시됩니다.