Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I administer a remote server via SSH that runs CentOS 5.5. I have been unsuccessful in all my attempts to write to two different external USB hard drives with a single ext3 partition when logged in as root.
When attempting to create a "test" directory I get one of two messages:
Quote:
[root@neon usb]# mkdir test
mkdir: cannot create directory `test': Input/output error
[root@neon usb]# mkdir test
mkdir: cannot create directory `test': Read-only file system
Both drives *appear* to have filesystem issues. When I run an fsck on either drive, I get:
Quote:
[root@neon /]# e2fsck /dev/sda1
e2fsck 1.39 (29-May-2006)
/dev/sda1: recovering journal
/dev/sda1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Keep in mind this is a newly-formatted, empty drive.
Not putting stock in the odds that I've had two hard drives (different sizes and brands) with the exact same hardware problem, I'm going to assume this is a software issue, although maybe it isn't. Hence, my post in "Linux - General". I've heard talk elsewhere of controller (chipset) issues coming into play. Is this valid?
Okay, here's the information you'll need to make a diagnosis....
[root@neon usb]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/md0 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda1 on /mnt/usb type ext3 (rw)
Here's the output of fdisk on the device in question:
Quote:
[root@neon /]# fdisk /dev/sda
The number of cylinders for this disk is set to 48641.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 48641 390708801 83 Linux
I've got someone with access to the box if necessary. But it might take days to implement solutions since this isn't his full-time job. Remote solutions are, therefore, preferable.
Since you have two devices with the same error I don't think that your USB-disks themselves are faulty, I think that an other device is faulty. I would check at least this:
1. Are they connected with the same cable? If so, change it and give it another try.
2. Are the drives always connected to the same USB-port? If so change it and give it another try.
3. Check the drives on a different machine, to be sure that they are not the culprit.
4. Try a different device on this machine.
Since you have two devices with the same error I don't think that your USB-disks themselves are faulty, I think that an other device is faulty. I would check at least this:
1. Are they connected with the same cable? If so, change it and give it another try.
2. Are the drives always connected to the same USB-port? If so change it and give it another try.
3. Check the drives on a different machine, to be sure that they are not the culprit.
4. Try a different device on this machine.
Answers:
1. Only one drive is in use at this time. Unsure if a different cable was used.
2. Uncertain if a different port was used each time.
3. They were previously in use as Windows drives. They've been reformatted (using CentOS) and only now are they having issues.
4. I have a 3rd drive but do you really think it's 2 bad drives?
As I said, I'm 400 miles away from this server. I can have someone attempt the above solutions but it will take time.
I'm on my 2nd hard drive. The first hard drive I partitioned myself using fdisk utility. No go. The 2nd time around a colleague partitioned it and I'm not sure exactly how he went about it. Is there some kind of advantage to using mkfs? Do you have a command suggestion? If so, I can pretty easily repartition the drive.
For 1+2, you have to make that sure. For 3, frankbell's question is a good one. For 4, such coincidences happen very seldom, but it is the simplest way to use a known-good device on that machine to make sure that the drives are not the culprit.
Without using mkfs there will be no filesystem on the disks, if you didn't use a partitioning tool like GParted that formats automatically. The command should look like this:
Code:
mkfs -t ext3 /dev/sda1
Assuming that sda1 is the partition on the external disk.
I apologize for the confusion. I thought frankbell was only asking about how it was partitioned, not how it was formatted. I missed that part. It is formatted ext3 and an "ls -la" command produces the following:
Quote:
[root@neon usb]# ls -la
total 28
drwxr-xr-x 3 root root 4096 Mar 12 12:21 .
drwxr-xr-x 3 root root 4096 Feb 12 15:19 ..
drwx------ 2 root root 16384 Mar 12 12:21 lost+found
Full disclosure: I'm a web admin and not accustomed to formatting hard drives since I don't have access to any servers. Usually that is done by others. As is adding hard drives or other hardware. So please bear with me if I miss some obvious questions. In this particular instance, the client is running a backup server (the computer in question) in their office. There is a tech who moonlights for them who can swap hardware when he gets a chance but otherwise, this is all on me.
Okay, I've asked the tech who is local to the server to try TobiSGD's suggestions. I'll report back with results once I have them.
Okay, here's the report from my man on the ground:
Quote:
Hi John,
The drives have used different cables. One that was for the LaCie drives previously connected, and a seperate cable for the WD Passport 400G currently connected. The WD passport has been in use by me for several months. I reformated it after copying anything pertinent off the drive I still needed.
We can ask Jim to connect the WD Passport to a different USB port on the linux system. We should umount before of course.
I just spent a few minutes reformatting to vfat and trying some dir and file creates & deletes (as root). No problems. Last messages in /var/log/messages were 20+ minutes ago when the drive was formatted ext3.
So it appears he can write to the drive in FAT but not EXT3.
A quick update from my tech who was at the server this morning.... Apparently, if you disable the ehci_hcd module, which disables USB 2 in favor of 1.1, the drive is writeable under ext3. This suggests that something like the bug involving nForce2 chipsets (nVidia motherboard) applies. However, I'm awaiting confirmation of which motherboard chipset the server uses.
Because this is a backup server that transfers multiple gigabytes of data in a single script execution I can't fall back on USB 1.1 permanently. The workaround seems limited to the current session only which is also unacceptable. Perhaps I'm misunderstanding the workaround or someone knows of a more elegant, permanent software solution?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.