Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
(solved) Forcing Debian 9 to make automatic full LVM disk sc
-
- Posts: 18
- Joined: 2018-08-19 16:26
(solved) Forcing Debian 9 to make automatic full LVM disk sc
How to force Debian 9 Linux to make forced automatic LVM disc scan with automatic LVM disk repair on boot?
Last edited by vitaliok78 on 2018-08-20 16:46, edited 2 times in total.
Re: Forcing Debian 9 to make automatic full LVM disk scan
are you asking about this?
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
Yes, but I want the Debian to execute fsck -p -y -v /dev/sda* on every boot.milomak wrote:are you asking about this?
Re: Forcing Debian 9 to make automatic full LVM disk scan
what is it that you think is not happening?
for instance this happens - /etc/init.d/checkfs.sh
post your /etc/fstab as well
for instance this happens - /etc/init.d/checkfs.sh
post your /etc/fstab as well
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
Actually my Debian 9 Linux does not automatically repair the filesystem, it just scan without any fix of the filesystem.milomak wrote:what is it that you think is not happening?
for instance this happens - /etc/init.d/checkfs.sh
post your /etc/fstab as well
What exact command I do need to write in /etc/init.d/checkfs.sh? I meant: fsck -p -y -v /dev/sda*
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Forcing Debian 9 to make automatic full LVM disk scan
According to the manual page there is no -p option:
https://manpages.debian.org/stretch/uti ... .8.en.html
There is a -P (upper case) option, but are you sure you want that ? It requires
the -A option as well.
Also, maybe read: https://manpages.debian.org/stretch/sys ... .8.en.html
====== edited====
If you happen to be using 'e2fsck' :
https://manpages.debian.org/stretch/e2f ... .8.en.html
It does have a -p option, but should not be used with the -n or -y options,..
https://manpages.debian.org/stretch/uti ... .8.en.html
There is a -P (upper case) option, but are you sure you want that ? It requires
the -A option as well.
-P
When the -A flag is set, check the root filesystem in parallel with the other filesystems. This is not the safest thing in the world to do, since if the root filesystem is in doubt things like the e2fsck(8) executable might be corrupted! This option is mainly provided for those sysadmins who don't want to repartition the root filesystem to be small and compact (which is really the right solution).
I am not sure on this, because it is not clear to me what you are trying to do,What exact command I do need to write in /etc/init.d/checkfs.sh? I meant: fsck -p -y -v /dev/sda*
What makes you think there is something that needs fixing ?Actually my Debian 9 Linux does not automatically repair the filesystem, it just scan without any fix of the filesystem.
Also, maybe read: https://manpages.debian.org/stretch/sys ... .8.en.html
KERNEL COMMAND LINE¶
systemd-fsck understands one kernel command line parameter:
fsck.mode=
One of "auto", "force", "skip". Controls the mode of operation. The default is "auto", and ensures that file system checks are done when the file system checker deems them necessary. "force" unconditionally results in full file system checks. "skip" skips any file system checks.
fsck.repair=
One of "preen", "yes", "no". Controls the mode of operation. The default is " preen", and will automatically repair problems that can be safely fixed. "yes " will answer yes to all questions by fsck and "no" will answer no to all questions.
Please do this, as requested,..by milomak » post your /etc/fstab as well
====== edited====
If you happen to be using 'e2fsck' :
https://manpages.debian.org/stretch/e2f ... .8.en.html
It does have a -p option, but should not be used with the -n or -y options,..
-p
Automatically repair ("preen") the file system. This option will cause e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code. (See the EXIT CODE section.) This option is normally used by the system's boot scripts. It may not be specified at the same time as the -n or -y options.
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
Yes! I do want e2fsck to automatically repair the file-system ( /boot, /, /home/ /var/ on without any prompt from my side on Debian 9 Linux boot!GarryRicketson wrote:According to the manual page there is no -p option:
https://manpages.debian.org/stretch/uti ... .8.en.html
There is a -P (upper case) option, but are you sure you want that ? It requires
the -A option as well.-P
When the -A flag is set, check the root filesystem in parallel with the other filesystems. This is not the safest thing in the world to do, since if the root filesystem is in doubt things like the e2fsck(8) executable might be corrupted! This option is mainly provided for those sysadmins who don't want to repartition the root filesystem to be small and compact (which is really the right solution).I am not sure on this, because it is not clear to me what you are trying to do,What exact command I do need to write in /etc/init.d/checkfs.sh? I meant: fsck -p -y -v /dev/sda*What makes you think there is something that needs fixing ?Actually my Debian 9 Linux does not automatically repair the filesystem, it just scan without any fix of the filesystem.
Also, maybe read: https://manpages.debian.org/stretch/sys ... .8.en.htmlKERNEL COMMAND LINE¶
systemd-fsck understands one kernel command line parameter:
fsck.mode=
One of "auto", "force", "skip". Controls the mode of operation. The default is "auto", and ensures that file system checks are done when the file system checker deems them necessary. "force" unconditionally results in full file system checks. "skip" skips any file system checks.
fsck.repair=
One of "preen", "yes", "no". Controls the mode of operation. The default is " preen", and will automatically repair problems that can be safely fixed. "yes " will answer yes to all questions by fsck and "no" will answer no to all questions.Please do this, as requested,..by milomak » post your /etc/fstab as well
====== edited====
If you happen to be using 'e2fsck' :
https://manpages.debian.org/stretch/e2f ... .8.en.html
It does have a -p option, but should not be used with the -n or -y options,..-p
Automatically repair ("preen") the file system. This option will cause e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code. (See the EXIT CODE section.) This option is normally used by the system's boot scripts. It may not be specified at the same time as the -n or -y options.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Forcing Debian 9 to make automatic full LVM disk scan
This has nothing to do with LVM disk scan. Please correct the subject.vitaliok78 wrote:I want the Debian to execute fsck -p -y -v /dev/sda* on every boot.
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
I installed the Debian 9 Linux with LVM ( separated /boot /home /var /tmp.)p.H wrote:This has nothing to do with LVM disk scan. Please correct the subject.vitaliok78 wrote:I want the Debian to execute fsck -p -y -v /dev/sda* on every boot.
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
Then where exactly and what exactly should I execute ( input or print ) in order e2fsck to make full automatic entire all disk repair on boot without my hand intervention?p.H wrote:Irrelevant. fsck does not care.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Forcing Debian 9 to make automatic full LVM disk scan
====From=https://www.cyberciti.biz/faq/linux-for ... -sequence/
A note about systemd based systems
The above mentioned solution only works with the old SysVinit and early versions of Upstart. It won’t work with systemd. systemd-fsck understands one kernel command line parameter:
fsck.mode=
One of “auto”, “force”, “skip”. Controls the mode of operation. The default is “auto”, and ensures that file system checks are done when the file system checker deems them necessary. “force” unconditionally results in full file system checks. “skip” skips any file system checks.
fsck.repair=
One of “preen”, “yes”, “no”. Controls the mode of operation. The default is ” preen”, and will automatically repair problems that can be safely fixed. “yes ” will answer yes to all questions by fsck and “no” will answer no to all questions.
Important : https://www.freedesktop.org/software/sy ... rvice.html
I can not help much, because I am not using any systemd system, how ever on both of my systems, Debian 7 and OpenBsd, this is all done automatically,..The default is "preen", and will automatically repair problems that can be safely fixed. "yes" will answer yes to all questions by fsck and "no" will answer no to all questions.
Something to keep in mind: will automatically repair problems that can be safely fixed.
This does not mean that everything will definitely be fixed or repaired, some times there may be files it is not able to repair, in which case you would still need to run fsck manually, and try to repair the specific files.
2 times now , we have asked you to show your:These services are started at boot if passno in /etc/fstab for the file system is set to a value greater than zero.
Code: Select all
/etc/fstab
and then I asked again .by milomak » post your /etc/fstab as well
Your refusal to do this, leads me to believe it is pointless to even try to help any further,... the value should be 1, if you want it to do this on every boot.
On both of my systems, the default runs a check every boot, I am not sure on debian 9 with systemd, but reading the manuals gives me the impression the same, it is all ready set by default to run the checks, and try to repair any files it can. So , unless you have been messing around, and changing the defaults,
it should be checking and repairing any files it can. If you have made changes to the defaults, then you need to show us exactly what you have done, and show us the files requested,..
Which file system specifically ? Again, what makes you think this file system is even broken or "dirty", it may be it can not repair it, so you would have to try manually, and if you are unable to do it manually, replace the file system with a new, clean file system.Actually my Debian 9 Linux does not automatically repair the filesystem
Do you have a specific file system that is broken and needs repair ?
If nothing is broken, then there is nothing to do, e2fsck, or fsck, nor anything else will repair something that is not broken.
==== edited ====
One last note, if you do have broken file system/systems, the repairs should not be done "automatically" on a mounted drive, more details here:
https://www.cyberciti.biz/faq/can-i-run ... s-mounted/
Please take the time to read all of it, I only quoted part. Sometimes there are things that can only be done manually, and must be done manually. Sorry to say that, but it is reality.No. Do not run fsck on a live or mounted file system. fsck is used to check and optionally repair one or more Linux file systems. Running fsck on a mounted filesystem can usually result in disk / data corruption. So please do not do it. You have two choices
(a) Take down system to single user mode and unmout system
(b) Boot from the installation CD into rescue mode
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
I tried those solutions below:milomak wrote:what is it that you think is not happening?
for instance this happens - /etc/init.d/checkfs.sh
post your /etc/fstab as well
1) apt-get install initscripts
2) Changed FSCFIX from No to Yes in the /etc/init.d/checkfs.sh
3) ./shutdown -r now
4) Errors fixed.
5) My Debian 9 Linux boots normally without any errors and speeded up the booting process.
My CONGRATULATIONS for myself!
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Forcing Debian 9 to make automatic full LVM disk scan
Thank you milomak for pointing this out earlier in the thread.
example:
Well congratulations, you figured it out, please take the time to edit your first post, add the word solved to the subject line:milomak wrote:what is it that you think is not happening?
for instance this happens - /etc/init.d/checkfs.sh
post your /etc/fstab as well
example:
Code: Select all
(soleved)Forcing Debian 9 to make automatic full LVM disk scan
Last edited by GarryRicketson on 2018-08-20 17:09, edited 1 time in total.
-
- Posts: 18
- Joined: 2018-08-19 16:26
Re: Forcing Debian 9 to make automatic full LVM disk scan
My further offered two solutions for other Debian Linux users who struggles with repairing the Linux filesystem and wants automatic repair of the Linux filesystem are bellow:GarryRicketson wrote:Well congratulations, you figured it out, please take the time to edit your first post, add the word solved to the subject line:milomak wrote:what is it that you think is not happening?
for instance this happens - /etc/init.d/checkfs.sh
post your /etc/fstab as well
example:Code: Select all
(soleved)Forcing Debian 9 to make automatic full LVM disk scan
1) sudo apt-get install initscripts
2) Change the FSCKFIX option from No to Yes in /etc/init.d/checkfs.ch
3) sudo shutdown -r now
4) The filesystem is being automatically repaired while booting the Debian Linux.
5) The Debian Linux will boot correctly ( if a service fails to run, check that failed service error log, suppose the error log is located in the /var/log/).
6) Keep all important files in the /home and not /var directory!
7) Use /var for MySQL or other database type and emails ( if a Debian Linux server is deployed ).
Use incrimental backup of /home and /var ( if a Debian Linux server is deployed ) once a day somewhere else like USB Stick or on a USB HDD!
1) Boot from the Debian Linux installation CD and choose the Emergency Mode or Repair Mode.
2) Execute the command: e2fsck -p -f /dev/sdaX or e2fsck -p -f /dev/sdbX.
3) Reboot the Debian Linux from the HDD.
Note: X is the device number like: 1 or 2 or 5.
Enjoy your Debian Linux!