e2fsck

MickleSong
MickleSong Posts: 2  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

  • Mijzelf
    Mijzelf Posts: 2,903  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    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 -an

    Check if telnetd is in /bin. Could also be /sbin. After a reboot the rc.shutdown is back to stock. It's in the initramfs.

Consumer Product Help Center