LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-01-2015, 01:12 PM   #1
GreenNebie
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Rep: Reputation: Disabled
Unable to write to temp_path ('/tmp') - Read-only file system


I am very new to linux; I have a server running Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-72-generic-pae i686)

I mistakenly plugged in a MSA 500 (Data Storage box) to this linux server and then subsequently unplugged it, and now anything I try todo I get Read Only errors.

I believe the system has remounted my partition as ro and I need to un-mount and run fsck, but I am unsure how todo this exactly. Also do I need to use a Live CD to boot into?

I will paste the results of what I have found below. I have found:


/dev/mapper/pontus-root / ext4 ro,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0


Complete Output


root@pontus:/etc# cat fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/pontus-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/cciss/c0d0p1 during installation
UUID=c6a58b59-56d8-4a02-ae5f-f2e8b322c8d9 /boot ext2 defaults 0 2
/dev/mapper/pontus-swap_1 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
root@pontus:/etc# cat /proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=2963296k,nr_inodes=202678,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=594412k,mode=755 0 0
/dev/mapper/pontus-root / ext4 ro,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
/dev/cciss/c0d0p1 /boot ext2 rw,relatime,errors=continue 0 0
//venus/E$/Icinga_Backups /mnt cifs rw,relatime,sec=ntlmi,unc=\\venus\E$,username=administrator,uid=0,noforceuid,gid=0,noforcegid,addr=1 0.1.1.42,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=16580,actimeo=1 0 0


root@pontus:/etc/icinga/objects# fsck
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
/dev/mapper/pontus-root: recovering journal
fsck.ext4: Bad magic number in super-block while trying to re-open /dev/mapper/pontus-root
Signal (11) SIGSEGV si_code=SEGV_MAPERR fault addr=0x61
fsck.ext4[0x806fdc6]
[0x54d40c]
/lib/i386-linux-gnu/libext2fs.so.2(ext2fs_mmp_stop+0x27)[0x7b9c37]
fsck.ext4(fatal_error+0x4f)[0x80672af]
fsck.ext4(e2fsck_run_ext3_journal+0x27e)[0x80667de]
fsck.ext4(main+0x6ac)[0x804f21c]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x2ae4d3]
fsck.ext4[0x80515ed]

Thank you for any help/ ideas
 
Old 04-01-2015, 03:59 PM   #2
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
Could you post the output of "mount" so I can see what is currently mounted?

You can remount a partition like this,
Code:
sudo mount -o remount,rw /partition/identifier /mount/point
However, if it is your root partition, you may just have to reboot, You cannot unmount your root partition while the system is running. I don't believe you can remount either, but I've never tried. If you need to run fsck on a partition it will need to be unmounted. If this is your root partition you will have to do this from a boot disk.
 
1 members found this post helpful.
Old 04-01-2015, 04:08 PM   #3
GreenNebie
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the help.

I am suppose to leave for vacation tomo and if I can't get this fixed that is out!

I see your cmd, on mount, but honestly I am not sure what the /partition/identifier /mount/point exactly means

Thanks again, info u requested below


root@pontus:/home/ezine# mount
/dev/mapper/pontus-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/cciss/c0d0p1 on /boot type ext2 (rw)
//venus/E$/Icinga_Backups on /mnt type cifs (rw)

mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
It's possible that information reported by mount(8) is not
up to date. For actual information about system mount points
check the /proc/mounts file.
 
Old 04-02-2015, 05:54 AM   #4
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
You can comment out the existing line with a #
Code:
# tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=594412k,mode=755 0 0
and reboot with no tmpfs line in /etc/fstab (in that case it will use the default mount at /dev/shm )
or you can mount the tmpfs in ram instead, with this line:
Code:
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777 0 0
This quote from https://wiki.archlinux.org/index.php/Tmpfs
might be useful for your server...
Quote:
Here is a more advanced example showing how to add tmpfs mounts for users. This is useful for websites, mysql tmp files, ~/.vim/, and more. It's important to try and get the ideal mount options for what you are trying to accomplish. The goal is to have as secure settings as possible to prevent abuse. Limiting the size, and specifying uid and gid + mode is very secure. For more information on this subject, follow the links listed in the #See also section.
Code:
tmpfs   /www/cache    tmpfs  rw,size=1G,nr_inodes=5k,noexec,nodev,nosuid,uid=648,gid=648,mode=1700   0  0
 
Old 04-02-2015, 06:03 AM   #5
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
post deleted

Last edited by TxLonghorn; 04-02-2015 at 06:07 AM. Reason: may not be accurate
 
Old 04-02-2015, 07:09 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
The /tmp reference is a symptom, not the real problem. As /tmp is not specifically mounted elsewhere, it is still a sub directory to the root filesystem - which is mounted ro (the fstab option is why).
fsck on the root is best done from a liveCD. Note that fsck ensures the integrity of the filesystem - not necessarily the individual files. I'm guessing you don't have a recent backup you can restore.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file system permission is set to to read and write only Gflames Linux - Security 4 12-23-2013 06:31 PM
Can't empty the /tmp directory Read-only file system warning roctaiwan Linux - Newbie 8 03-04-2010 06:24 AM
Read Write for NTFS file system geeedeee Linux - Laptop and Netbook 8 06-05-2006 07:41 PM
creating a read/write file system with kickstart triley Linux - General 1 12-29-2005 02:36 AM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration