View previous topic :: View next topic |
Author |
Message |
zhuying311 n00b

Joined: 30 Aug 2013 Posts: 6
|
Posted: Fri Aug 30, 2013 6:56 pm Post subject: JFS - Read-only file system |
|
|
Hi, I installed Gentoo 3.8.13 and using JFS now. The funny thing is system always prompts "Read-only file system", and the only fix is do "mount -o rw,remount /" on every reboot.
Any idea how I can fix it permanently? thx. |
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Fri Aug 30, 2013 9:45 pm Post subject: |
|
|
fix your fstab file?
Code: | /dev/sda1 /boot jfs noauto,noatime 1 2
/dev/sda3 / jfs noatime 0 1
|
jfs is read only, replays logs from fsck.jfs... then mounts rw...
let me rephrase that, post your /etc/fstab file.... |
|
Back to top |
|
 |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2218
|
Posted: Sat Aug 31, 2013 9:18 am Post subject: |
|
|
Have you got the "root" service in the "boot" runlevel? That's supposed to remount the rootfs R/W to handle this situation. _________________ Greybeard |
|
Back to top |
|
 |
mrbassie l33t


Joined: 31 May 2013 Posts: 838 Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.
|
Posted: Sat Aug 31, 2013 12:12 pm Post subject: |
|
|
Have you emerged sys-fs/jfsutils? You need that for fsck.jfs. If your system isn't shut down cleanly and can't fsck it will mount read only.
check your rc.log |
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Sat Aug 31, 2013 4:45 pm Post subject: |
|
|
mrbassie wrote: | If your system isn't shut down cleanly and can't fsck it will mount read only. |
doesn't matter if it was shutdown correct or not with jfs. jfs requires fsck.jfs every boot. |
|
Back to top |
|
 |
mrbassie l33t


Joined: 31 May 2013 Posts: 838 Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.
|
Posted: Sat Aug 31, 2013 5:46 pm Post subject: |
|
|
I was just suggesting something from my own experience.
I was able to boot rw without fsck.jfs on my install if it was shutdown, if the laptop battery ran out or it was turned off with the power button, ro at next boot. I emerged jfsutils and the problem went away. |
|
Back to top |
|
 |
zhuying311 n00b

Joined: 30 Aug 2013 Posts: 6
|
Posted: Tue Sep 03, 2013 7:23 pm Post subject: |
|
|
666threesixes666 wrote: | fix your fstab file?
Code: | /dev/sda1 /boot jfs noauto,noatime 1 2
/dev/sda3 / jfs noatime 0 1
|
jfs is read only, replays logs from fsck.jfs... then mounts rw...
let me rephrase that, post your /etc/fstab file.... |
sorry for the late reply, here's my fstab
/dev/BOOT /boot ext2 defaults, noatime 1 2
/dev/ROOT / jfs noatime 0 1
/dev/SWAP none swap sw 0 0 |
|
Back to top |
|
 |
zhuying311 n00b

Joined: 30 Aug 2013 Posts: 6
|
Posted: Tue Sep 03, 2013 7:31 pm Post subject: |
|
|
Goverp wrote: | Have you got the "root" service in the "boot" runlevel? That's supposed to remount the rootfs R/W to handle this situation. |
yes, it shows "root | boot" when I type rc-update |
|
Back to top |
|
 |
zhuying311 n00b

Joined: 30 Aug 2013 Posts: 6
|
Posted: Tue Sep 03, 2013 7:39 pm Post subject: |
|
|
mrbassie wrote: | Have you emerged sys-fs/jfsutils? You need that for fsck.jfs. If your system isn't shut down cleanly and can't fsck it will mount read only.
check your rc.log |
I can run fsck.jfs and it shows no error. |
|
Back to top |
|
 |
zhuying311 n00b

Joined: 30 Aug 2013 Posts: 6
|
Posted: Tue Sep 03, 2013 7:46 pm Post subject: |
|
|
Not sure if it's relevant, but I configured following parameters in /boot/grub/grub.conf according to installation guide.
kernel /boot/kernel-3.3.8-gentoo root=/dev/ram0 real_root=/dev/sda3 ro video=uvesafb:mtrr:3,ywrap,1680x1050-32@85
initrd /boot/initramfs-genkernel-x86-3.8.13-gentoo |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue Sep 03, 2013 8:15 pm Post subject: |
|
|
OT, but here's some good reading about JFS for anyone. Defragmenting cut my startup time in half recently, after 2 years of use!
- JFS Filesystem
JFS is fast, but slow on huge small files directory structures (/usr/portage, /usr/src/linux, /var/db...). The squashmount ebuild really speeds up emerge lookups and sync.
- TIP: Compressing portage using squashfs: initscript method
- mv user overlay
- vaeth/squashmount
Last edited by lost+found on Sun Oct 20, 2013 9:03 pm; edited 1 time in total |
|
Back to top |
|
 |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2218
|
Posted: Wed Sep 04, 2013 8:29 am Post subject: |
|
|
zhuying311 wrote: | ...
sorry for the late reply, here's my fstab
/dev/BOOT /boot ext2 defaults, noatime 1 2
/dev/ROOT / jfs noatime 0 1
/dev/SWAP none swap sw 0 0[ |
Oops, that looks like a template fstab. You're supposed to replace /dev/BOOT, /dev/ROOT and /dev/SWAP with real device ids, typically /dev/sda1, /dev/sda3 or whatever, depending on your partition layout. Or if you're using RAID, they'll be /dev/md128 or similar. Depends on your setup. I'm surprised remount works at all!
Out of interest, GRUB will boot JFS partitions; it's not essential to use an ext2 boot partition. But it's no problem to mix and match as your fstab is setup now.
Also out of interest, there's less need for "noatime" these days; the default is now "relatime", which only updates file read-access timestamps once a day. Using relatime instead of noatime can help you find unused files. _________________ Greybeard |
|
Back to top |
|
 |
zhuying311 n00b

Joined: 30 Aug 2013 Posts: 6
|
Posted: Wed Sep 04, 2013 1:15 pm Post subject: |
|
|
Goverp wrote: | zhuying311 wrote: | ...
sorry for the late reply, here's my fstab
/dev/BOOT /boot ext2 defaults, noatime 1 2
/dev/ROOT / jfs noatime 0 1
/dev/SWAP none swap sw 0 0[ |
Oops, that looks like a template fstab. You're supposed to replace /dev/BOOT, /dev/ROOT and /dev/SWAP with real device ids, typically /dev/sda1, /dev/sda3 or whatever, depending on your partition layout. Or if you're using RAID, they'll be /dev/md128 or similar. Depends on your setup. I'm surprised remount works at all!
Out of interest, GRUB will boot JFS partitions; it's not essential to use an ext2 boot partition. But it's no problem to mix and match as your fstab is setup now.
Also out of interest, there's less need for "noatime" these days; the default is now "relatime", which only updates file read-access timestamps once a day. Using relatime instead of noatime can help you find unused files. |
Highly appreciate for your help. Would you mind to introduce any linux book for newbie, so I wont ask such stupid questions again  |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Fri Dec 13, 2013 6:08 pm Post subject: |
|
|
im running into this problem now. installed yesterday & was booting fine and everything, then it stopped creating tempfs or something the messages move too fast. something that cascades into ro only file system. root|boot check, jfsutils check.... same kernel that booted fine, is now not booting fine and i get (none) for hostname. fsck.jfs comes back clean... 1 partition, / swap is a file /swap
removing recursively /tmp resolved this. im just wondering why stale files were left there. |
|
Back to top |
|
 |
jpc22 Apprentice

Joined: 29 Jan 2012 Posts: 195
|
Posted: Mon Dec 30, 2013 4:32 am Post subject: |
|
|
You need to have the argument ''ro'' in your bootloader with jfs. |
|
Back to top |
|
 |
666threesixes666 Veteran


Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
|
Back to top |
|
 |
Moze n00b


Joined: 04 Aug 2004 Posts: 15
|
Posted: Wed Nov 06, 2019 11:05 am Post subject: keep on rebooting... |
|
|
From the time of my posting it's clear that most of what is written above didn't apply to my case. All versions are different and the bug-fix has long been integrated.
But I stumbled over this post because my system suddenly booted with my /-jfs in ro-mode.
In the process of figuring out what of this might apply to my case, I had to reboot several times. Each time with a tidious long fsck.jfs. On the 5th or 6th reboot the problem was suddenly gone.
Might well be the same when running fsck.jfs manualy multiple times...
Hope that heps someone... _________________ while (!asleep) sheep++; |
|
Back to top |
|
 |
|