LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 09-12-2009, 03:00 AM   #1
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Rep: Reputation: 31
need clarification on `fsck` under single-user mode


I know that fsck should not be run on the mounted file system. But what i don't understand is that when we do ok `boot -s` under sparc's ok prompt, isn't it mount the / as single user?

So, if we were to fix any error on / , shouldn't we use ok `boot cdrom -s` instead (where / isn't mounted )?
 
Old 09-12-2009, 08:35 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Yes, or "boot -F failsafe" if you are using a recent Solaris update (on SPARC).

On older Solaris 10, you can also use "boot -m milestone=none", that would mount / readonly so you could still run fsck on it.

Last edited by jlliagre; 09-12-2009 at 08:39 AM.
 
Old 09-12-2009, 04:06 PM   #3
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
so the following concept is wrong (quoted from "bill calkins" book, solaris system admin):

Quote:
Never run the fsck command on a mounted file system. This could leave the file system in an unstable
state and could result in the loss of data. Because the / (root), /usr, and /var file systems cannot be
unmounted, these file systems should only have fsck run on them while in single-user mode.
Reboot the system immediately after running the fsck on these mounted file systems.

## pg.100
So what it really saying is the 'single user mode' boot from CD-ROM ?? not other type of single user mode (eg. `boot -s` under ok prompt)??

Last edited by taiwf; 09-12-2009 at 04:08 PM.
 
Old 09-12-2009, 04:22 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
The concept isn't wrong but highly risky and might lead to a kernel panic if fsck find inconsistencies and fix them, as documented.

Better to switch to zfs and forget about fsck oddities.
 
Old 09-12-2009, 07:21 PM   #5
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
i am happy to do the zfs but at the moment i am studying for scsa exam. So I just want to get clear the concept.

if it was ok to do fsck on '/' under `boot -s` type of single user mode, what does multi-user mode stop us from running fsck? Is it the extra user that might be accessing '/' file system? Or sth else? I mean 'boot -s' mount my / file system anyway...
 
Old 09-13-2009, 01:52 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
It is not OK to fsck '/' in whatever mode, it is just less risky in single user mode. What really matters is whether the filesystem is modified by some user processes or not while fsck is running. When you are running in single user mode, as no daemons or graphic environment are running, the risk to have the OS panicking is lower.
In any case, it is a bad practice and fsck should be done with the filesystem to check unmounted.
 
Old 09-15-2009, 02:16 AM   #7
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
i see. thank for the clarification
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
single user mode under vxfs mode enabled. UltraSoul Solaris / OpenSolaris 1 06-27-2009 09:48 PM
single user mode? sdcc619 Fedora 4 03-27-2009 08:02 PM
Single User mode isolvesystems Linux - Newbie 5 10-03-2007 08:05 PM
single user mode... navaladi Mandriva 2 12-26-2004 02:41 AM
single user mode ? wr3ck3d Slackware 5 03-29-2003 09:52 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 07:09 AM.

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