Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

"cannot create directory" error

Posted on 2011-09-19
5
Medium Priority
?
656 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 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

577 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