Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

"cannot create directory" error

Posted on 2011-09-19
5
Medium Priority
?
609 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
[X]
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
5 Comments
 
LVL 23

Accepted Solution

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

Assisted Solution

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

What is the output of the below:

$ cd /mnt/
$ lsattr
0
 
LVL 3

Assisted Solution

by:dbauermann
dbauermann earned 200 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 600 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

598 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