On 2013-06-30 06:26, arvidjaar wrote:
>
> I cannot reproduce it.
> Code:
> --------------------
> bor@opensuse:~> cat /etc/crypttab
> cr_test /dev/disk/by-id/usb-USB2.0_Flash_Disk_F77DEE41-0:0 none noauto
> bor@opensuse:~> grep cr_test /etc/fstab
> /dev/mapper/cr_test /mnt ext2 noauto,nofail 0 0
> bor@opensuse:~> systemctl --full -a | fgrep usb\x2dUSB
> --------------------
>
> Plug in USB stick
>
> Code:
> --------------------
> bor@opensuse:~> systemctl --full -a | fgrep usb\x2dUSB
> dev-disk-by\x2did-usb\x2dUSB2.0_Flash_Disk_F77DEE41\x2d0:0.device loaded active plugged Flash_Disk
>
> bor@opensuse:~> sudo systemctl start mnt.mount
> root’s password:
> Please enter passphrase for disk Flash_Disk (cr_test) on /mnt! ****
> bor@opensuse:~> LC_ALL=C df /mnt
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/mapper/cr_test 1888808 2832 1790028 1% /mnt
>
> --------------------
Ah, but there is a difference: you are using “mnt.mount”, whereas I use
“systemd-cryptsetup@crmm_Min-Rimmon”, in your case
“systemd-cryptsetup@cr_test” Let me try your way.
> Telcontar:~ # systemctl start[TAB][TAB]
> alsa-restore.service local_fs.target sys-kernel-config.mount systemd-fsck@dev-disk-by\x2dlabel-d_storage.service
> alsa-store.service localfs.service syslog-ng.service systemd-fsck@dev-disk-by\x2dlabel-raid5.service
> autofs.service lvm.service syslogd.service systemd-fsck@dev-mapper-cr_Datum.service
> basic.service mail-transfer-agent.target systemd-ask-password-wall.path systemd-fsck@dev-mapper-cr_cripta.service
> capisuite.service multipath.service systemd-ask-password-wall.service systemd-fsck@dev-mapper-cr_other.service
> cifs.service network-remotefs.service systemd-binfmt.service systemd-hibernate.service
> cyrus.service nmb.service systemd-fsck-root.service systemd-initctl.service
> device-mapper.service nss-user-lookup.target systemd-fsck@dev-disk-by\x2dlabel-Jazz1.service systemd-journal-flush.service
> dmraid.service openibd.service systemd-fsck@dev-disk-by\x2dlabel-a_boot_1.service systemd-random-seed-load.service
> earlysyslog.service openslp.service systemd-fsck@dev-disk-by\x2dlabel-a_boot_2.service systemd-random-seed-save.service
> earlyxdm.service plymouth-quit-wait.service systemd-fsck@dev-disk-by\x2dlabel-a_one.service systemd-readahead-done.service
> emergency.service plymouth-start.service systemd-fsck@dev-disk-by\x2dlabel-a_storage.service systemd-shutdownd.service
> emergency.target purge-kernels.service systemd-fsck@dev-disk-by\x2dlabel-a_vmware.service systemd-tmpfiles-clean.service
> exim.service rescue.service systemd-fsck@dev-disk-by\x2dlabel-b_main_opt.service systemd-update-utmp-runlevel.service
> firstboot.service rescue.target systemd-fsck@dev-disk-by\x2dlabel-b_main_usr.service systemd-update-utmp-shutdown.service
> hylafax.service resmgr.service systemd-fsck@dev-disk-by\x2dlabel-b_storage.service winbind.service
> isdn.service scsidev.service systemd-fsck@dev-disk-by\x2dlabel-c_home.service ypbind.service
> kbd.service sendmail.service systemd-fsck@dev-disk-by\x2dlabel-c_home_mail.service ypserv.service
> krb5kdc.service setserial.service systemd-fsck@dev-disk-by\x2dlabel-c_storage.service
> ldap.service slpd.service systemd-fsck@dev-disk-by\x2dlabel-c_usr_local.service
> loadmodules.service sound.target systemd-fsck@dev-disk-by\x2dlabel-c_usr_src.service
Lets try forcing it:
> Telcontar:~ # systemctl start /mnt/Ext.CR/Jz1-5_Min-Rimmon.mount
> Failed to issue method call: Unit mnt-Ext.CR-Jz1\x2d5_Min\x2dRimmon.mount.mount failed to load: No such file or directory. See system logs and 'systemctl status mnt-Ext.CR-Jz1\x2d5_Min\x2dRimmon.mount.mount' for details.
> Telcontar:~ #
I don’t really know what name would “/mnt/Ext.CR/Jz1-5_Min-Rimmon”
convert to… the exact mount place, edited on the first post, is
“/mnt/Ext.CR/Jz1-5_Min-Rimmon.mount”.
Grepping:
> Telcontar:~ # l /dev/disk/by-uuid/ | grep sde
> lrwxrwxrwx 1 root root 10 Jun 30 02:17 267e513f-fa60-404c-b2c5-ab4b80e0a1af -> ../../sde5
> lrwxrwxrwx 1 root root 10 Jun 30 02:17 54603e0c-b36b-4731-a174-112753ab04eb -> ../../sde1
> lrwxrwxrwx 1 root root 10 Jun 30 02:17 6a746c0e-632c-45f9-a1d9-5fdbb29f4ae5 -> ../../sde6
> lrwxrwxrwx 1 root root 10 Jun 30 02:17 c7169986-a153-419f-bb11-a6ddc22ee1c6 -> ../../sde7
> Telcontar:~ #
Disk is present. Verify the UUID is listed in crypttab:
> Telcontar:~ # grep 267e513f-fa60-404c-b2c5-ab4b80e0a1af /etc/crypttab
> crmm_Min-Rimmon /dev/disk/by-uuid/267e513f-fa60-404c-b2c5-ab4b80e0a1af none noauto
> Telcontar:~ #
Verify correct identifier in fstab:
> Telcontar:~ # grep crmm_Min-Rimmon /etc/fstab
> /dev/mapper/crmm_Min-Rimmon /mnt/Ext.CR/Jz1-5_Min-Rimmon xfs noauto,user,noatime,nodiratime,nofail 1 10
> Telcontar:~ #
And in systemd:
> Telcontar:~ # systemctl --full -a | grep "sde\|ab4b80e0a1a"
> dev-disk-by\x2duuid-267e513f\x2dfa60\x2d404c\x2db2c5\x2dab4b80e0a1af.device loaded active plugged ST3500418AS
> dev-sde.device loaded active plugged ST3500418AS
> dev-sde1.device loaded active plugged ST3500418AS
> dev-sde2.device loaded active plugged ST3500418AS
> dev-sde5.device loaded active plugged ST3500418AS
> dev-sde6.device loaded active plugged ST3500418AS
> dev-sde7.device loaded active plugged ST3500418AS
> sys-devices-pci0000:00-0000:00:1c.2-0000:04:00.0-ata2-host1-target1:0:0-1:0:0:0-block-sde-sde1.device loaded active plugged ST3500418AS
> sys-devices-pci0000:00-0000:00:1c.2-0000:04:00.0-ata2-host1-target1:0:0-1:0:0:0-block-sde-sde2.device loaded active plugged ST3500418AS
> sys-devices-pci0000:00-0000:00:1c.2-0000:04:00.0-ata2-host1-target1:0:0-1:0:0:0-block-sde-sde5.device loaded active plugged ST3500418AS
> sys-devices-pci0000:00-0000:00:1c.2-0000:04:00.0-ata2-host1-target1:0:0-1:0:0:0-block-sde-sde6.device loaded active plugged ST3500418AS
> sys-devices-pci0000:00-0000:00:1c.2-0000:04:00.0-ata2-host1-target1:0:0-1:0:0:0-block-sde-sde7.device loaded active plugged ST3500418AS
> sys-devices-pci0000:00-0000:00:1c.2-0000:04:00.0-ata2-host1-target1:0:0-1:0:0:0-block-sde.device loaded active plugged ST3500418AS
> Telcontar:~ #
I’m not sure what combination I should use to start it :-?
robin_listas;2568444 Wrote:
The problem is that systemd is not aware that the device
“/dev/disk/by-uuid/267e513f…” has appeared, so the service file is
not there. Is there a command to tell systemd to reevaluate devices and
mounts?
Systemd relies on udev events. You can check with “udevadm monitor”
that device is detected. If yes, it should also be seen by systemd.
No, nothing. It is an eSATA disk, detection is seen in the messages log.
Telcontar:~ # umount /mnt/Ext/Jazz1
Telcontar:~ #
power off disk, power on again. Mount non-encripted sde1:
Telcontar:~ # mount /mnt/Ext/Jazz1
Telcontar:~ #
And the log for that sequence is:
> <0.5> 2013-06-30 10:40:30 Telcontar kernel - - - [382212.794805] XFS (sde1): Mounting Filesystem
> <0.6> 2013-06-30 10:40:30 Telcontar kernel - - - [382212.815197] XFS (sde1): Ending clean mount
> <0.3> 2013-06-30 10:40:49 Telcontar kernel - - - [382231.899285] ata2: exception Emask 0x10 SAct 0x0 SErr 0x990000 action 0xe frozen
> <0.3> 2013-06-30 10:40:49 Telcontar kernel - - - [382231.899289] ata2: irq_stat 0x00400000, PHY RDY changed
> <0.3> 2013-06-30 10:40:49 Telcontar kernel - - - [382231.899292] ata2: SError: { PHYRdyChg 10B8B Dispar LinkSeq }
> <0.6> 2013-06-30 10:40:49 Telcontar kernel - - - [382231.899295] ata2: hard resetting link
> <0.6> 2013-06-30 10:40:50 Telcontar kernel - - - [382232.622030] ata2: SATA link down (SStatus 0 SControl 300)
> <0.6> 2013-06-30 10:40:55 Telcontar kernel - - - [382237.622011] ata2: hard resetting link
> <0.6> 2013-06-30 10:40:55 Telcontar kernel - - - [382237.927030] ata2: SATA link down (SStatus 0 SControl 300)
> <0.4> 2013-06-30 10:40:55 Telcontar kernel - - - [382237.927042] ata2: limiting SATA link speed to 1.5 Gbps
> <0.6> 2013-06-30 10:40:56 Telcontar kernel - - - [382238.940456] ata2: hard resetting link
> <0.6> 2013-06-30 10:41:02 Telcontar kernel - - - [382244.773026] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
> <0.6> 2013-06-30 10:41:02 Telcontar kernel - - - [382244.775393] ata2.00: configured for UDMA/133
> <0.6> 2013-06-30 10:41:02 Telcontar kernel - - - [382244.786014] ata2: EH complete
> <0.5> 2013-06-30 10:41:16 Telcontar kernel - - - [382258.927645] XFS (sde1): Mounting Filesystem
> <0.6> 2013-06-30 10:41:16 Telcontar kernel - - - [382258.985657] XFS (sde1): Ending clean mount
the monitor:
> Telcontar:~ # udevadm monitor
> monitor will print the received events for:
> UDEV - the event which udev sends out after rule processing
> KERNEL - the kernel uevent
:-?
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)