Todd Cole said on Tue, Aug 12, 2003 at 10:58:06AM -0400: > > I have a Debian machine that is only accessible remotely via SSH (no > keyboard or monitor attached). In order to perform filesystem maintenance > with e2fsck, I believe I need to put the machine into single-user mode, but > with SSH running. (Currently when I try to run e2fsck in run level 2 I > receive messages that the "device is busy.") You're getting "device is busy" because the filesystem is mounted rw.
You don't have to put the machine into single-user mode necessarily; you can fake it: Shut down all services except for sshd. Remount your partition as ro (man mount for details). Run fsck on your partition. Pray. When done, just shutdown -r now the machine (it's always a good idea to verify that a machine will reboot properly after maintanence). > Can someone give me a hand and tell me what they are doing that accomplishes > this safely? Well, I don't do this, but I'm not running ext2, so I don't have to fsck. Journals and backups for me! M
pgp00000.pgp
Description: PGP signature