Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

"cannot create directory" error

Posted on 2011-09-19
5
551 Views
Last Modified: 2013-12-16
Hi there,

I got an old linux box running Redhat 9 I believe.  Now I cannot
create a new directory on a drive (under both root and regular
account) which is under /mnt/space.

Please see below for more info.  What can I have to fix the problem?

Any oopinion is appreciated.



 [user_name@linux1 user_name]$ pwd
/mnt/space/user_name

[user_name@linux1 user_name]$ su
Password:
[root@linux1 user_name]# mkdir ttt
mkdir: cannot create directory `ttt': Input/output error
[root@linux1 reggie]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             34265764  30536492   1988632   94% /
/dev/hda1                31079     17295     12180             59% /boot
none                   2063332         0   2063332                  0% /dev/shm
/dev/hdb1             38480404  33180376   3345324  91% /mnt/space
[root@linux1 user_name]#
[root@linux1 user_name]# uname -a
Linux linux1.zonatech.com 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i68
6 i686 i386 GNU/Linux
[root@linux1 reggie]# date
Mon Sep 19 16:52:55 MDT 2011
[root@linux1 user_name]# exit
exit
[user_name@linux1 user_name]$ mkdir yyy
mkdir: cannot create directory `yyy': Input/output error
0
Comment
Question by:asugri
5 Comments
 
LVL 23

Accepted Solution

by:
Kamaraj Subramanian earned 150 total points
ID: 36564515
0
 
LVL 2

Assisted Solution

by:alien8tive
alien8tive earned 150 total points
ID: 36566437
Hi

What is the output of the below:

$ cd /mnt/
$ lsattr
0
 
LVL 3

Assisted Solution

by:dbauermann
dbauermann earned 50 total points
ID: 36567052
What is the output the command

# mount

???

Maybe your partion is mount only as read-only (ro)...
0
 
LVL 19

Assisted Solution

by:xterm
xterm earned 150 total points
ID: 36574179
grep hdb /var/log/messages

What almost certainly happened is that you got some kind of ext2 (or perhaps journal if RH9 was new enough for ext3) error, and the kernel marked the file system read-only.  It may be as simple as rebooting (which will run an e2fsck on the drive) but in my experience, I'd say you should plan to replace the drive.  A reboot will likely make it writable for a short while, but the same thing will happen again eventually.

At this point the drive is still readable, so if you have another one the same size and a spare machine that can hold both drives, you can clone it using a rescue CD.  Download systemrescuecd, put both drives in the system, boot up off the disk, login root and do "dd if=/dev/hda of=/dev/hdb BS=512" (this can take a while for a big drive.)  Remember, the "if" field is the SOURCE (your old dying drive) and the "of" field is the DESTINATION (your new empty drive).

Good luck.

PS.  I noticed / is at 94% utilization which means at some point soon, only root will be able to write to the filesystem, so you want to resolve that too.
0
 

Author Closing Comment

by:asugri
ID: 36584746
After I freed up some space in / directory, I was able to create new directories under /mnt/space.

Thanks a lot for the help.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question