2

I have been working on hard drive performance and ran across this command

fio --filename=/dev/sda1 --direct=1 --rw=randwrite --bs=1m --size=5G --numjobs=64 --runtime=300 --group_reporting --name=file1

So the first problem was that after running the command it maxed out the hard drive and wouldn't let me delete anything giving me a message 'Read-only file system'. I figured the file I was looking for would be called file1, but can't find it so not sure where all the data is that filled up the hard drive.

After trying to solve my problem, I ran across this page:

https://askubuntu.com/questions/197459/how-to-fix-sudo-unable-to-open-read-only-file-system

Which told me to run: mount -o remount /

After doing this, I got an error and couldn't run ANY commands. I decided to reboot, but now it can't boot. The filesystem was on /dev/mapper/ubuntu--vg-root, but when I boot off the installation cd and try to repair it, I get the message: an error occurred while mounting the device you entered for your root

So to recap, I filled up the HD, broke something, maybe the mount point, and can't boot. This is on our dev server, while I have backups of most all the data, the database backup is a little old, so I would love to get it back up and running.

It has a hardware RAID and was getting an error when trying to mount the filesystem manually from recovery prompt.

Here was the results from df from a saved remote session:

Filesystem              1K-blocks     Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root  52403200 52403180        20 100% /
devtmpfs                 49407992        0  49407992   0% /dev
tmpfs                    49414352        0  49414352   0% /dev/shm
tmpfs                    49414352   271040  49143312   1% /run
tmpfs                    49414352        0  49414352   0% /sys/fs/cgroup
/dev/sda1                  508588    97840    410748  20% /boot
/dev/mapper/centos-home 204970204    32944 204937260   1% /home

closed as off-topic by John, fukawi2, HBruijn, TheCleaner, voretaq7 Jan 22 '15 at 3:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – fukawi2, HBruijn, TheCleaner, voretaq7
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Are you writing this to help out your replacement? Because, by all rights, you should have been fired on the spot. – Hyppy Jan 20 '15 at 20:35
  • 2
    You have written random (garbled) data to the block device of your hard-drive, instead of writing it to a filename. Just give up. Reinstall and restore from backups. Never ever run commands you "find on the net" without fully understanding what they do. – pauska Jan 20 '15 at 20:40
  • 2
    @pauska :(){ :|: & };: – Wesley Jan 20 '15 at 20:43
  • 3
    I've might been a little quick there.. looks like you only nuked /dev/sda1, and it's mounted directly as /boot. Try a rescue from the ubuntu live CD. – pauska Jan 20 '15 at 20:47
  • 1
    Thanks Hyppy, unfortunately I can't be fired since I own the company. We all make mistakes, and luckily this one was recoverable with only half a day lost. I ended up just pulling the old hard drives out and upgrading them to larger ones and reinstalling. – Alan Jan 20 '15 at 22:59
2

It appears that you overwrote whatever you had in /dev/sda1. I'm not sure about your LVM/RAID/etc setup, but I'm assuming that /dev/sda1 was at least involved in your storage scheme.

  • If /dev/sda1 was where your data was, then your data is no more.
  • If you put your data in a LUN that was presented to Ubuntu as /dev/sda1, then your data is no more.
  • If your RAID controller presented you with /dev/sda1 and you put your data there, then your data is no more.
  • If your data was striped across /dev/sda1 using LVM, then your data is no more.

Edit: I see that you've modified your question to show that /dev/sda1 was your /boot partition. You just need to recreate your boot partition, for which a guide is available in the Ubuntu Community Wiki for a manual process or over here in the Wiki for an automatic process.

The automatic process is basically to boot off a LiveCD, install boot-repair from ppa:yannubuntu/boot-repair, and run it.

  • I just added the info from df above, I think that sda1 was only the /home directory but could always be wrong. when I ran the command mount -o remount / did I maybe clear the settings for which type of file system I was using? – Alan Jan 20 '15 at 20:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.