Posts

Showing posts with the label zfs

Tips on Recovering from Out of Disk Space (Linux Server)

Background When multiple VM is being used for application infrastructure,  sooner or later a system administrator will face out of disk space condition. This post will show a few selected approach to resolve such condition. First Step : Identify The Disk Configuration Some commands to determine disk mounting configuration : determine disk usage and mount points : df -h detailed mount point and options : mount | column -t physical volumes for LVM : pvs logical volumes for LVM : lvs volume group for LVM : vgs block devices list : lsblk Some VM might use ZFS on Linux, to examine pool configurations use : zfs list zpool list zfs list -t snapshot Second step : Determine which directory are using most space From the df -h command, we found out which partition or mount point is at out of disk space condition or nearing it. Better way to determine which directory are the largest is using ncdu tool, but if you didn't have it installed you could always use du -hs /<path>/*. For example...

Find out Lock Path in ZFS

Scenario A linux server that using ZFS storage, exports the directory in the storage using NFS. There is a need to confirm that some files are still locked or not.  1. Determine Inode The ls command has -i option to show inode id for each directory/files. [root@pv1 mysql]# ls -il total 200867 41506 -rw-rw-r--+ 1 1000070000 nfsnobody         0 Aug 15   2017 debian-5.5.flag 41509 -rw-rw----+ 1 1000070000 nfsnobody 195035136 Apr   5 12:02 ibdata1 41507 -rw-rw----+ 1 1000070000 nfsnobody   5242880 Apr   5 12:02 ib_logfile0 41508 -rw-rw----+ 1 1000070000 nfsnobody   5242880 Mar 26 19:33 ib_logfile1 41376 drwx------+ 2 1000070000 nfsnobody       119 Jul 30   2018 jwdb 41511 drwxr-x---+ 2 1000070000 nfsnobody         74 Aug 15   2017 mysql 41510 -rw-------+ 1 1000070000 nfsnobody         6 Aug 15   2017 mysql_upgrade_info 41487 drwx---...