Q. I’m using CentOS Linux. I’m getting an error - Cannot Preserve Ownership, when I try to copy files from Linux ext3 to FAT32 or files moved to an NFS NAS server mount point. How do I fix this error and copy / move files?
A. Generally you use command like cp or my to copy file. While copying a file these command try to copy file attributes such as ACL information or group access information etc. FAT32 and NFS mount mount cannot support all sort of attributes and these commands cannot differentiate between a filesystem that doesn't support ACL and Linux file system permission.
All your files will be copied or moved without ACL and permissions. You can ignore this error and files should be copied / moved successfully.
Q. I’m new to Linux and how do I examine filesystem and identify regular files or directories?
A. Both Linux and UNIX comes with ls command for examining the filesystem. You can use ls command to look at the filesystem. ls command can display:
=> Character devices
=> Regular files
=> Sym links (symbolic links)
=> Block devices
ls command examples
Display /etc directory files, enter:
$ ls /etc
When invoked without any arguments, ls lists the files in the current working directory:
Use -l (long option) to lists filenames, sizes, permissions, type and all other information:
$ ls /etc/passwd
-rw-r--r-- 1 root root 2453 Jul 17 16:25 /etc/passwd
See Linux / UNIX file permissions for more information
A directory is marked with a d as the first letter of the permissions field:
ls -ld /etc
drwxr-xr-x 88 root root 12288 Aug 5 23:46 /etc
A symbolic link is marked with an l (lower case L) as the first letter of the permissions string:
ls -l /bin/nisdomainname
lrwxrwxrwx 1 root root 8 Jul 10 08:50 /bin/nisdomainname -> hostname
- A named pipe is marked with a p as the first letter of the permissions string.
- A socket is marked with a s as the first letter of the permissions string.
- A character device is marked with a c as the first letter of the permissions strings. (ls -l /dev/console)
- A block device is marked with a b (ls -l /dev/sdb1).
Q. I am getting an error that read as follows:
MySQL: got error 28 from server handler
How do I fix this problem?
A. This error means no space left on hard disk. According to official MySQL docs, "If you get his error, you need to check all filesystems where MySQL operates. It may be single filesystem or as we recommend you can have datadir, tmpdir and log files split into dedicated filesystems."
a) Stop mysql server
# /etc/init.d/mysql stop
# /etc/init.d/mysqld stop
b) Check filesystem and /tmp directories:
$ df -h
$ cd /tmp
$ df -h /tmp
c) Remove files from /tmp to free up space:
# cd /tmp
# rm -rf *
d) Look into /var/log directory and remove or compress logs file.
e) Use myisamchk command to check and repair of ISAM table:
# cd /var/lib/mysql
f) Increase disk space (add new hard disk or remove unwanted software(s) )
g) Start the mysql server:
# /etc/init.d/mysql start
# /etc/init.d/mysqld start
Q. I am using Linux on HP server and I am getting error that read as follows:
Linux Kernel panic: VFS: Unable to mount root fs
How do I solve this problem?
A. Most modern distributions including Debian uses loadable kernel module for ext3 file system. So to read ext3/ext2 file system kernel must load ext3 kernel module (ext3.ko).
This module is included in an initrd image. If an initrd image is missing or that image does not include suitable kernel modules to access the ext3 filesystem on the partition, an error message (Linux Kernel panic: VFS: Unable to mount root fs) will be displayed to you.
To solve this problem you need to use mkinitrd script that constructs a directory structure that can serve as an initrd root file system.
The instructions for creating initrd images are here on our site.
ow do I delete a file under Linux / UNIX / BSD / AIX / HP-UX operating system using command line options? [click to continue…]