Server :: Shutdown's F Switch - What E2fsck Switches Does That Equate To
Apr 18, 2011
If I do a "shutdown -rF now" on a server, it will force all volumes to be checked as it reboots.
My question is, which i can't figure out from reading the man pages for e2fsck and shutdown, is what switches does it use when it automatically runs an e2fsck on each volume? i'm assuming a -y since it never prompts, but what else? is it physically checking the entire disk for bad blocks, etc etc?
If I issue a shutdown -rF now, it will force e2fsck's on all the volumes when it reboots. But once the checks automatically finish, does it restart normally? I want to run e2fsck's on all my volumes, but dont want to stay the probably 5 hours it will run, so hoping someone knows for sure what happens.
I have built a Centos 5.3 server for a friend of mine that is being used as a NAS server. The server has 4 1TB drives in a RAID 5 configuration and a dedicated non raid system drive for the OS. My friend isnt very Linux literate so I need this bow to be relatively simple. I have worked most of it out but have a question with regards to remote reboot.
I need to be able to shut this device down through the power switch without human intervention (at the moment when the power switch is pushed the server asks to confirm shutdown) the server wont have a Monitor connected so this isn't practical. Is it possible to use the power switch to do an clean, immediate shutdown?
The other option is shutdown through a web page is this something that has been done before? I know he can do it through terminal by issuing a shutdown now command but as I said this guy wants something simple. I don't really want to explain everytime he needs to shut the Server down how to do it if he can just do it via a website or even with the power button.
I'm using an hp pavilion dv2000. i turned the wifi switch off by mistake, the LED turned orange and the wifi got disconnected. and now when i turn the switch on, it remains orange and the wifi still isn't functional. this happened before; i found a fix that worked searching google. it was done via terminal commands and i didn't have to download anything but i can't find the solution anymore!
wlan0 shows up when i use:
more results:
It's still hard blocked! even though the switch is turned on; gives the same result eitherways
I have a volume on my server that according to tune2fs is "clean with errors", so i'm assuming I either need to unmount the volume and e2fsck it, or reboot and drop into maintenance mode and do itThere aren't any live samba shares off that volume, so i'm thinking I could do it without taking the server down, as this server is only for samba shares, which are on a different volume.Could someone tell me if I'm taking the right approach? I've never done unmounting and mounting before, but I've read it can be done manually without affecting how the volumes are mounted when a server starts. i'll have to look up the commands.
I have a computer with Fedora 12 installed on it. Previous I had Fedora 8. After shutting down the Fedora 8 it also switched off the computer. With the new Fedora 12 it get stuck on telling me the system has halted. I have to switch off the computer manually. How do I get the Fedora 12 to also switch off the computer?
We had to reboot a server in the middle of a production day due to 99% iowait (lots of processes in deep sleep waiting for disk iops). That's never happened to us before. It had been 363 days since the last fsck, so it started automatically on reboot. It hung at 4.8% on a 2TB LVM2 volume for about an hour. I killed the fsck and rebooted the server. The second time, it went past that point and is currently at about 62%. First, what causes e2fsck to hang like that? Second, is there any danger in killing e2fsck, rebooting, and starting it again?
I have installed a cluster computer with 10 nodes . The manufacturer is HP . All nodes and the master node have redhat enterprise linux installed in them . When I shutdown the nodes from the master terminal using "shutdown -h now" they get shutdown . But they dont get completely turned off . This issue bothers me when the power supply is given , all nodes boot up simultaneously generating a huge heat .
Thing to note : When we shutdown our PC they get completely turned off . When the power supply is given , a press on the Power On button is required to boot the system. But , why does it not happpen in the case of cluster? Is there any other way of completely turning off the nodes from the master terminal ?
I have a dell PE1750 server which would not boot up after a power failure. I am thrown to a shell for maintenance after showing an error in file system check. The server was running - Red Hat Enterprise Linux AS release 3 (Taroon). Please let me know if I can try to recover from this error by booting from the 1st CD of a higher version of linux like RHEL5. I ask this because I do not have the old media with which the system was setup. Can the use of latest OS CD cause any problem?
On our server we have a certain directory, say /storage, that contains many large files. They are all compressed (gzip). Many of our users are not computer-savvy, and so when one of these files is needed, they will copy it to their own directory. Consequently, we have multiple terabytes of duplicate data. I'd like to enforce an alias whereby if someone tries to use cp on a file from /storage, they will instead create a symbolic link. My idea was something like:
alias cp='cp.storage' File cp.storage:#!/bin/sh truePath=$(readlink -f "$1")
[code]....
The conditional checks whether the file being copied begins with "/storage". The problem with this is that if someone wanted to use cp with any options on a file not in /storage, those options would be obliterated. Can someone guide me as to a good way to accomplish this? Either a way to get the options from cp into cp.storage, or another approach not using alias this way. Everyone will be using bash.
I have a 14TB raid, file system is read-only and I am trying to run e2fsck -B -p -C -v -y /dev/sdb1, it goes through, but fails and says bad block/inode or fails to transfer, something like that.Is there a way I can get this to run successful, this is a production storage server, its critical.
Other than when there are errors in the messages log or when you have file system problems, when should you e2fsck volumes? I have a lot of volumes that have 500GB to 1TB of data on them, and it takes quite a while to e2fsck them, so wondering if its something that should be done regularly, or only when there are actually problems.
Why does an e2fsck restart itself after a while, does it get to a certain number of errors than has to start over from the beginning? are there any tweaks or switches you can use to make it run more efficiently?
I have Squeeze (2.6.32-5-686) installed on sda and have an additional disk sdb.For some reason 'dmesg' gives me always this message for sda1 (after a reboot):
Feb 14 12:29:03 arkiv-x kernel: [ 448.349949] EXT3 FS on sda1, internal journal Feb 14 12:29:03 arkiv-x kernel: [ 448.470411] loop: module loaded Feb 14 12:29:03 arkiv-x kernel: [ 448.653327] kjournald starting. Commit interval 5 seconds
I have two volumes, both with 800GB total used on them. lets call them /vol1 and /vol2. /vol2 is just a cron'd rsync'd copy of a folder on /vol1 which is a live share for many users.If I temporarily suspend the cronjob doing the rsync's from /vol1 to /vol2, is it safe to unmount and e2fsck /vol2, then remount it somehow?
Both /vol1 and /vol2 say the filesystem state is not clean when i do a tune2fs -l on them both. According to tune2fs both will check themselves upon restart, but if I can do /vol2 since it isn't the live data beforehand, that will cut my downtime in half the next time i restart the server.But I also wonder that if I can do this, then i remount /vol2, will the "not clean"-ness of /vol1 just be rsync'd back over to /vol2 the next time the rsync runs?
I know if I do a shutdown -rF now, it will perform an e2fsck on all my volumes with the -y switch. But if I just want to check one of the volumes rather than all of them, and have it use the -y switch so it will automatically answer yes to everything, how can I do that?I'm using RHEL, and have a huge volume I need to run a check on, and I dont want to sit there for the next 24 hours hitting the Y key every time it finds a problem ;-)
If I umount both of them, can I run an e2fsck on each at the same time through 2 putty sessions, or will that not really gain me anything from doing them one after another?
I have a debian machine with an apache2 webserver. I am able to start the machine from the internet (power plug board with webinterface) but I don't know how to shutdown the server automatically if nobody uses the website anymore. It is a homeserver which should only run if needed.
Unfortunately I don't know much about Linux, apache, php, cgi-scripts, cronjobs and other things that might be useful. But I googled a lot and have now an idea how it could work. It seems complicated to me and so I want to ask you guys what you think about it and if perhaps you could give me a hint.
The idea: A cronjob starts every ten minutes a php script that checks when the index.html of the welcome-page was opened the last time (fileatime()). Lets say it was opened last time at 3pm. Then the php script adds for example 60 minutes to that time (=4pm) and calculates how much time is left to 4pm. This time is saved in the variable $timeleft. Now the php script compares if $timeleft is less then 10 minutes (=600 seconds). If it is, the php script starts a cgi script that will shutdown the server. The cgi script will login as root (I think that can be done with the "expect"-command url and then enter the command "shutdown -h now"
Is all this realizable? Isn't there a better and/or easier way to do?
I have a heavily used file server that I want to restart, then if it requires e2fsck's on any volume to run them after it restarts. The only problem is that the server is rarely rebooted, and they said it might kernel panic because its been so long. I've heard there's a way to have it go past the kernel panic if it does happen, but I'm not sure how to do that or the other stuff.If it was a Windows server, I would schedule a shutdown with the force switch, and have the chkdsk's already scheduled for each volume on reboot. But for RHEL, I really don't know.I'm hoping this can be done, so that way I can have it kick off at say 7am, then when I get in at 8am it will probably be near the end of the e2fsck's so I can see what's going on.
I want to perform an e2fsck with the y switch (so I dont have to answer yes to every question) on two volumes on a server the next time I restart it. I don't want to do a shutdown -rF because 1) I dont want to check the other volumes and 2) it seems when I do that, the e2fsck doesn't keep restarting itself over and over to fix all the problems. Seems like it runs once, then if it fails it drops you to the repair console in single user mode. I'd rather just have it start the check that will keep repeating over and over right away, because I know it'll take more than one pass.
Can the fibre channel switch in the centOS5.3 cluster edition be switched for a regular router or hub? If so how would one do this? If not why does the switch have to be fibre channel?
Evening, had a switch outage today, what a PITA. ok, that's behind me, my next project is to have the least amount of single point of failures.
So the current scenario is the following; ISP -> linux firewall -> 3 network subnets. 1. load balanced network 2. public servers (ftp, etc.) 3. management network
I would like to change it to be more like; ISP -> switch, 2 patch cords to 2 seperate firewalls (right now using a basic linux box with iptables, works great), might go the endian or other route with failover. But, each server has a public IP and private 192.x ip, most server have 2 adapters 2 interfaces each, so I do have 4 ports already. I would like to send 1nic with public/private to switch1, the other to switch 2 but either keep them down, or better the same IP. So I guess, is this possible? I would say the word bonding, not sure if it can be used in this term. The webserver are running Ubuntu 9.10 64bit, DB's etc are mostly CentOS 5.4 box's.
We have all dell hardware, switches, etc. but I don't know in my years, can you have 2 seperate adapters share an IP for fault tollerance, or would I have to down/up each of the nic's in the event of a switch failure.
My son's netbook with 10.10 netbook remix failed to boot. Using the Live install CD and Gparted I couldn't repair the EXT4 filesytem. The error reported was:
e2fsck : Device or resource busy while trying to open ...
After trying many solutions and web searching I decided to try a different live CD and tried Knoppix 6.4.4
Using the command interface I typed e2fsck -v -f -y /dev/xxxx (xxxx = your device). This worked first time and the machine rebooted without hesitation.
We have an old server running, and I decided to run fsck.ext3 -n on the disk to check it (while it was running). Turns out it reports lots of errors - not a good thing.
The weird thing is that when booting up a rescue cd and running fsck.ext3 on it, it says there are no problems with it. The filesystem is marked clean. Forcing a check with -f turns up nothing.
Now, when booting it from disk, fsck complains about an unclean file system that has not been checked for like 50000 days (obviously an error). Running e2fsck -n /dev/sda2 turns up errors again - not necessarily the same ones as the last time.
This makes me wonder: Can running e2fsck on a mounted file system cause errors? I ran with -n which is not supposed to do anything, just doing a read-only check. On the other hand, I heard checking a live file system might throw erros since the files being checked might change while bign checked, thus causing false positives.
Can the old version of e2fstools (1.38, approx 2005) mean non-existing errors are shown? Both the rescue cd and the system use this version.
In any case - why would the file system report errors on boot-up when the rescue cd just said it was ok? It should have been marked clean by now.
For laughs, I shut down the system and booted Knoppix which has a quite recent version (1.41.12, May 2010) of e2fstools. It showed no errors on the file system.
What do you think - are there errors or not on the file system?
The system is actually running Suse, but this is not about Suse specific things - just general Linux tools. And I use Ubuntu personally.
In this case what is the return value of mount. I want to run e2fsck only when either mount fails or mount succeeded but with errors . Is there some way to detect this situatin "mounting fs with errors" in code/script .
We've been using a Wiki server at the office for years. It was originally configured to use MySQL and finally after 8+ years we're moving the Wiki to a new platform of hardware. My question is the Wiki software (MediaWiki) is the only thing still tied to and using MySQL which we want to decommission but we've been using it for years so I'm worried we will lose the data. I've done some Google'ing to find out how can I change the MySQL database dump and successfully export it into my new PostgreSQL database however I don't know how practical or recommended this process is. I found sites like the following:
[URL]
I don't mean the exact link above but just in general taking a database from MySQL and successfully migrating it for PostgreSQL use?From what I can see in the MySQL database, there appears to be 43 tables with lots of column data and who knows what else: