Tuesday, January 28, 2020

CentOS / RHEL 7,8 : unable to start vsftpd service



While starting or restarting the vsftpd service you might get below error on an RHEL 7 system.


# systemctl restart vsftpd.service 
 
Job for vsftpd.service failed. See 'systemctl status vsftpd.service' and 'journalctl -xn' for details.
If it is the first time you are starting vsftpd you might have to update few parameters in the configuration file /etc/vsftpd/vsftpd.conf for it to work. Follow the steps below to get the vsftpd service working.

1. Update below parameters in /etc/vsftpd/vsftpd.conf file. By default the parameter listen has a value “NO” assigned to it and parameter listen_ipv6 is uncommented.

listen=YES              # default is NO
#listen_ipv6=YES  # default is uncommented

2. Restart vsftpd service once you have made the above changes.

# systemctl restart vsftpd.service

3. Make sure there no syntax error in the vsftpd configuration file – etc/vsftpd/vsftpd.conf. Run the vsftpd command and verify the functionality.

# vsftpd

Wednesday, January 8, 2020

Extending CentOS 7 File System after Resizing the Volume ( Root without Reboot) - LVM

increase disk size of the VM (VMware AWS and Azure provide visual interface to do this task)

scan the disk to see the new disk size, run the following command for the kernel to learn the new disk size

echo 1 > /sys/block/sda/device/rescan

then install the cloud-utils-growpart script:

yum install cloud-utils-growpart
Next, use it to grow the logical partition to extend to all the available space:
growpart /dev/sda 2
pvresize /dev/sda2
Extend and Resize filesystem
lvextend -l+100%FREE -r /dev/centos/root