[systemd-devel] how disable fsck on swap+lvm

Lennart Poettering lennart at poettering.net
Thu Feb 17 07:36:34 PST 2011


On Thu, 17.02.11 18:25, Alexey Shabalin (a.shabalin at gmail.com) wrote:

> 
> On Wed, Feb 16, 2011 at 8:57 PM, Lennart Poettering  wrote:
> > On Wed, 16.02.11 17:37, Alexey Shabalin wrote:
> >
> >> You can see in log:
> >> Feb 16 16:04:51 host-29 kernel: [   11.636564] Adding 524284k swap on
> >> /dev/mapper/VG1-Swap.  Priority:-1 extents:1 across:524284k
> >> Feb 16 16:04:51 host-29 kernel: [   11.669141] clock[1954]: Setting
> >> system clock (localtime): succeeded
> >> Feb 16 16:04:51 host-29 kernel: [   11.770936] clock[1965]: Today's
> >> date: Wed Feb 16 16:03:48 MSK 2011 succeeded
> >> Feb 16 16:04:51 host-29 kernel: [   68.503001] systemd[1]: Job
> >> dev-disk-by\x2duuid-bf5d2d3e\x2d174c\x2d44ea\x2dbf89\x2dcd6ecead5f81.device/start
> >> timed out.
> >>
> >> swap on lvm(VG1-Swap), and systemd run fsck on this partition.
> >
> > This does not show anything related to fsck?
> >
> > Also, systemd will invoke hwclock for you anyway. You need no additional
> > clock utilities.
> hwclock - very easy and cann't read config /etc/sysconfig/clock:
> HWCLOCK_SET_TIME_AT_START=true
> HWCLOCK_SET_AT_HALT=true
> HWCLOCK_ADJUST=true
> UTC=true
> ZONE="Europe/Moscow" (that /etc/localtime is a copy of)

Well, the fact whether the RTC is in UTC is stored in line 3 of
/etc/adjtime, and that should be the only place to configure it. There
is no point in duplicating this information in a non-standard way
elsewhere.

And the zone is stored in /etc/localtime and something similar applies
too.

And I am not sure it really makes sense to make it configurable whether
the RTC should be set on shutdown or not. It should be. Full stop. If
somebody really wants to disable it, he should just mask the service by
doing this:

# ln -sf /dev/null /etc/systemd/system/hwclock-save.service

That's much nicer and simpler, and cross-distro.


> >> I know that swap on lvm no good practics, but need foolproof.
> >
> > If you use LVM make sure to use a new version that properly installs its
> > udev rules.
> I used lvm-2.02.84. I don't see udev rules that run "vgchange -a y".

Well, ensure you have /lib/udev/rules.d/11-dm-lvm.rules installed.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list