Page 1 of 1
Check disk working but wrong partition
Posted: Wed Nov 16, 2016 11:19 am
by 9acca9
HI
I have this strange issue.
Have this
Code: Select all
sda sda 502M root disk brw-rw----
└─sda1 xfs 00d3ba7f-d020-4dee-8131-7bf7fe031d0f /boot └─sda1 500M root disk brw-rw----
sdb sdb 49,5G root disk brw-rw----
└─sdb1 LVM2_member UDkkvc-hvHu-XWM2-iesN-rZYa-PVCf-BGhjv8 └─sdb1 49,5G root disk brw-rw----
├─centos-root xfs 9886fee8-0d3d-4c33-9b5a-b2157e6c9514 / ├─centos-root 47,5G root disk brw-rw----
└─centos-swap swap c48a22b7-2433-43ef-ab9b-d08929ac8974 [SWAP] └─centos-swap 2G root disk brw-rw----
sr0 sr0 1024M root cdrom brw-rw----
I want to check the sdb1 partition.
i try this on the client machine
Code: Select all
/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sdb1
DISK OK - free space: /dev 895 MB (100% inode=99%);| /dev=0MB;716;805;0;895
¿?
Some help please.
(i dont speak english)
Re: Check disk working but wrong partition
Posted: Wed Nov 16, 2016 11:42 am
by dwhitfield
Could you provide the output of fdisk -l?
It's no problem to use Google Translate or whatever, BUT, please do *not* translate the commands and outputs. Apologies if that seems obvious, but we've had some people do that, and it makes it impossible to help. Thanks!
Re: Check disk working but wrong partition
Posted: Thu Nov 17, 2016 7:47 am
by 9acca9
Hi, thanks
Code: Select all
Disk /dev/sdb: 53.1 GB, 53118763008 bytes, 103747584 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Identificador del disco: 0x4d5c014b
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/sdb1 128 103743615 51871744 8e Linux LVM
Disk /dev/sda: 526 MB, 526385152 bytes, 1028096 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Identificador del disco: 0x19ac9e08
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/sda1 * 128 1024127 512000 83 Linux
Disk /dev/mapper/centos-root: 51.0 GB, 50964987904 bytes, 99540992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
its like the check disk just "check" "/dev", for example look this:
Code: Select all
[root@squid ~]# /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/disk/by-uuid/00d3ba7f-d020-4dee-8131-7bf7fe031d0f
DISK OK - free space: /dev 895 MB (100% inode=99%);| /dev=0MB;716;805;0;895
[root@squid ~]# /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/disk/by-uuid/c48a22b7-2433-43ef-ab9b-d08929ac8974
DISK OK - free space: /dev 895 MB (100% inode=99%);| /dev=0MB;716;805;0;895
[root@squid ~]# /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/disk/by-uuid/9886fee8-0d3d-4c33-9b5a-b2157e6c9514
DISK OK - free space: /dev 895 MB (100% inode=99%);| /dev=0MB;716;805;0;895
different uuid, same result. and just "/dev"...
Re: Check disk working but wrong partition
Posted: Thu Nov 17, 2016 12:03 pm
by avandemore
/dev/disk/by-uuid/00d3ba7f-d020-4dee-8131-7bf7fe031d0f is a symlink to the real block device. Specify the real block device in your command.
Code: Select all
# ll /dev/disk/by-uuid/f415dfc2-c131-472f-ad0d-6174a5c91d93
lrwxrwxrwx 1 root root 10 Nov 16 15:55 /dev/disk/by-uuid/f415dfc2-c131-472f-ad0d-6174a5c91d93 -> ../../sda1
# /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1
DISK OK - free space: /boot 292 MB (58% inode=99%);| /boot=204MB;396;446;0;496
Re: Check disk working but wrong partition
Posted: Fri Nov 18, 2016 8:18 am
by 9acca9
Ok, but, the same.
Code: Select all
ll /dev/disk/by-uuid/9886fee8-0d3d-4c33-9b5a-b2157e6c9514
lrwxrwxrwx 1 root root 10 nov 14 13:54 /dev/disk/by-uuid/9886fee8-0d3d-4c33-9b5a-b2157e6c9514 -> ../../dm-0
/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/dm-0
DISK OK - free space: /dev 895 MB (100% inode=99%);| /dev=0MB;716;805;0;895
Anyway, i try this:
Code: Select all
blkid
/dev/sdb1: UUID="UDkkvc-hvHu-XWM2-iesN-rZYa-PVCf-BGhjv8" TYPE="LVM2_member"
/dev/sda1: UUID="00d3ba7f-d020-4dee-8131-7bf7fe031d0f" TYPE="xfs"
/dev/mapper/centos-root: UUID="9886fee8-0d3d-4c33-9b5a-b2157e6c9514" TYPE="xfs"
/dev/mapper/centos-swap: UUID="c48a22b7-2433-43ef-ab9b-d08929ac8974" TYPE="swap"
/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/centos-root
DISK OK - free space: / 45234 MB (93% inode=99%);| /=3345MB;38864;43722;0;48580
that's ok. but just for knowlegde... it's ok put that?, i mean "/dev/mapper/centos-root"
Thanks for your help.
Re: Check disk working but wrong partition
Posted: Fri Nov 18, 2016 10:49 am
by dwhitfield
9acca9 wrote: it's ok put that?, i mean "/dev/mapper/centos-root"
Could you clarify your question? Are you asking if the mapping will change? Are you asking if it is a security concern? Are you asking if it reports correctly?
Thanks!