e2fsck
Freshman Member
Hello!
dmesg offers e2fsck running: "EXT4-fs (dm-2): warning: mounting fs with errors, running e2fsck is recommended"
But dm-2 mounted. I tried:
~ # umount -f /dev/md2
umount: /i-data/9dba6a2b: target is busy
Well. Can I add this command to rc.shutdown file?
After this:
[quote]/bin/umount cat /proc/mounts|grep /dev/md|awk '{print $2}' 2>/dev/null
/bin/umount cat /proc/mounts|grep /dev/sd|awk '{print $2}' 2>/dev/null
/bin/umount cat /proc/mounts | grep "/dev/mapper/vg_" | awk '{print $2}' 2>/dev/null
/usr/sbin/vgchange -an
/bin/umount /etc/zyxel
mdadm -Ss[/quote]
All Replies
-
Yes, you can. But it's more convenient to add a telnet daemon, followed by some blocking function to stop the shutdown. This way you can open a shell and do the work, and more important, read the error messages. As dm-2 is a logical volume, you'd better inject this before 'vgchange', as that stops the logical volumes:
/bin/umount cat /proc/mounts | grep "/dev/mapper/vg_" | awk '{print $2}' 2>/dev/null/bin/telnetd/bin/sh/usr/sbin/vgchange -anCheck if telnetd is in /bin. Could also be /sbin. After a reboot the rc.shutdown is back to stock. It's in the initramfs.
0 -
Thanks. How I can continue shutdown after that I check hdd drives ?
0 -
Wow. Has e2fsck been running for 11 years?
Anyway, you can continue shutdown by killing the blocking shell. The command 'killall sh' should do. Problem is that it will also kill the shell you are using, and if that comes first, it will kill killall either. So you should redirect the pipes:
killall sh </dev/null >/dev/null 2>&1 &But as the filesystem are not mounted, you can also just cut the power.
0 -
well.. but my running telnet session where I enter "killall sh </dev/null >/dev/null 2>&1 &" will not interfere with shutdown ?
0 -
No. The shell will close. The telnet daemon will keep running, but that won't stop the kernel from switching off the power.
0 -
Thank you! All worked successfully!
0
Categories
- All Categories
- 439 Beta Program
- 2.8K Nebula
- 199 Nebula Ideas
- 125 Nebula Status and Incidents
- 6.3K Security
- 496 USG FLEX H Series
- 322 Security Ideas
- 1.6K Switch
- 83 Switch Ideas
- 1.3K Wireless
- 48 Wireless Ideas
- 6.8K Consumer Product
- 286 Service & License
- 457 News and Release
- 89 Security Advisories
- 31 Education Center
- 10 [Campaign] Zyxel Network Detective
- 4.3K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 95 Security Highlight
Guru Member