Repair Linux filesystem in rescue mode

Attach CentOS ISO image with virtual media of server and boot from virtual cdrom. When the boot screen appears type Linux rescue or selects the Linux rescue option if available. Select rescue installed system. Select relevant option when language and keyboard selection appears on the screen. Select no for enabling network devices like eth0 or …

Read more

Find if pNFS is enabled on NFS client

On the NFS client, execute the following command and in output check, if pnfs=not configured is present. egrep "nfs(v)?4" /proc/self/mountstats device NFS-Server-IP:/mnt/path-shared mounted on /mnt/point with fstype nfs4 statvers=1.2 nfsv4: bm0=0xfdfbbbff,bm1=0x40f9bui3e,bm2=0x906,acl=0x3,sessions,pnfs=not configured

Read more

Disable or Enable Journaling On ext4 Filesystem

You can only use the ordered journaling method on a Linux Server. First check if the journal feature is enabled on ext3/ext4 filesystem with the following command: tune2fs -l /disk-path Check the output of the above command for has_journal which indicates the journaling is enabled on the filesystem. Filesystem features: has_journal ext_attr resize_inode dir_index filetype …

Read more

Backup old files before overwriting in rsync

By default, rsync overrides old files in the destination server/folder. To resolve this use the –backup flag in rsync. rsync -a –backup –backup-dir=”/src-old-files” /usr/src/ root@85.17.219.154:/src-backup/ The above rsync command will copy files from local server /usr/src to root@85.17.219.154:/src-backup/. If some files are overwritten in root@85.17.219.154:/src-backup/, these will be backed up in root@85.17.219.154:/src-old-files first before they …

Read more

How to check progress of the rsync job

You can add the progress option with rsync command: rsync -a --progress /media/backup-folder/ sending incremental file list created directory backup or you can add the -P flag in rsync command as below: rsync -a -P /media/backup-folder/ sending incremental file list created directory backup Note that the -P option includes both –partial and –progress rsync options.

Read more