Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
JFS - Read-only file system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
zhuying311
n00b
n00b


Joined: 30 Aug 2013
Posts: 6

PostPosted: Fri Aug 30, 2013 6:56 pm    Post subject: JFS - Read-only file system Reply with quote

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
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Fri Aug 30, 2013 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 669

PostPosted: Sat Aug 31, 2013 9:18 am    Post subject: Reply with quote

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
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 538

PostPosted: Sat Aug 31, 2013 12:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Sat Aug 31, 2013 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 538

PostPosted: Sat Aug 31, 2013 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
zhuying311
n00b
n00b


Joined: 30 Aug 2013
Posts: 6

PostPosted: Tue Sep 03, 2013 7:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
zhuying311
n00b
n00b


Joined: 30 Aug 2013
Posts: 6

PostPosted: Tue Sep 03, 2013 7:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
zhuying311
n00b
n00b


Joined: 30 Aug 2013
Posts: 6

PostPosted: Tue Sep 03, 2013 7:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
zhuying311
n00b
n00b


Joined: 30 Aug 2013
Posts: 6

PostPosted: Tue Sep 03, 2013 7:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 508
Location: North~Sea~Coa~s~~t~~~

PostPosted: Tue Sep 03, 2013 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 669

PostPosted: Wed Sep 04, 2013 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message
zhuying311
n00b
n00b


Joined: 30 Aug 2013
Posts: 6

PostPosted: Wed Sep 04, 2013 1:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Thu Sep 05, 2013 2:18 am    Post subject: Reply with quote

generic but gentoo biased: http://swift.siphos.be/linux_sea/
Gentoo: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?style=printable&full=1
_________________
Defund the FCC.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Fri Dec 13, 2013 6:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
jpc22
Apprentice
Apprentice


Joined: 29 Jan 2012
Posts: 195

PostPosted: Mon Dec 30, 2013 4:32 am    Post subject: Reply with quote

You need to have the argument ''ro'' in your bootloader with jfs.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Mon Dec 30, 2013 5:22 am    Post subject: Reply with quote

the answer is bootmisc and swap need root.... i posted the fix to the bug tracker.

https://bugs.gentoo.org/show_bug.cgi?id=495284
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum