0

This is almost a little embarrassing to ask, but I just can not figure this one out myself really. I'm trying to find out where the disks of my machine are used and if they are actually used at all.

If I check my available disks in my debian, I can find 4 of them. This seems correct. There should be a 50GB one, a 120GB one and two 1.5TB disks. Here by uuid and by path.

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

But when I check my mount, I can not find all of those disks.

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)

If I check the disk usage, I can not identify any of the big 1.5TB disks

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

But I'm actually already lost here, I think I'm looking a the wrong thing. Can anyone point me at what I have to look for if I simply want to know how and where my hard drives are used in the debian OS? It's just that if the two 1.5TB are actually not used at all, I could take them out and use it for something else...

Thank you very much in advance for helping.

edit:

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

edit2:

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   ]

alright, now I'm totally confused... there are two volume groups called "temp_vslide" but they are not mounted anywhere?

edit in my continuous hunt for the usage of those two drives

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
  • Remember, you've probably got a swap partition, which does not show up in commands like ls, mount, and df, because it isn't a filesystem and it isn't attached to the filesystem tree. – Scott Apr 15 '15 at 4:52
  • Your system knows the disks are attached, but it seems they're not mounted, or am I missing something? – zer0rest Apr 15 '15 at 4:59
  • Can you post the output of cat /etc/fstab and fdisk -l ? – SHW Apr 15 '15 at 5:35
  • thanks for your replies! I added the outputs of cat /etc/fstab and fdisk -l. – Preexo Apr 15 '15 at 5:52
1

You could also try:

sudo pvscan

This will show you if any of the disks are in use by the logical volume manager. You can also use fdisk to determine which device corresponds to each physical drive:

sudo fdisk -l /dev/sda
sudo fdisk -l /dev/sdb
sudo fdisk -l /dev/sbc
sudo fdisk -l /dev/sdd
  • I added some outputs, including your suggestions to my question, thanks for your input! – Preexo Apr 15 '15 at 6:08
  • Now you can try lvscan to see if either of those temp_vslide disks are part of a volume. – Chad Smith Apr 15 '15 at 16:08
  • I added some more outputs to my question. By now I have the feeling that there is a volume group which has never been mounted. In that case I could either just mount it or also just remove it. I just don't understand why /mnt then contains a entry which looks like it belongs to that volume group. This is the most convoluted setup... Unfortunately is the person who set it up not available anymore. Any idea how I can be sure this is not somehow mysteriously used and I can safely delete the vg and then remove the disks? – Preexo Apr 16 '15 at 3:44
  • just managed to mount that vg and found 3TB old data rubbish... many year old backups of worthless data... oh dear. thanks for your help! – Preexo Apr 16 '15 at 4:17
  • Happy to help! :) – Chad Smith Apr 16 '15 at 4:34
1

lsblk will show you the mountpoint of your disks.

  • lsblk was apparently only added in version 2.19 of util-linx. I have util-linux 2.17.2-9. Any idea? Hanging on squeeze with that machine. – Preexo Apr 15 '15 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.