https://bugzilla.novell.com/show_bug.cgi?id=441062 Summary: LUKS encrypted reiserfs on DVD fails to mount, while same on XFS succeeds Product: openSUSE 11.0 Version: Final Platform: Other OS/Version: openSUSE 11.0 Status: NEW Severity: Major Priority: P5 - None Component: Kernel AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: robin.listas@telefonica.net QAContact: qa@suse.de Found By: --- (kernel bug on reiserfs modules, breaks forensics too) In brief: --------- I have LUKS encrypted reiserfs and xfs filesystems based on a disk file, created with Yast partitioner on openSUSE 10.3. These images were burnt to DVDs, to create encrypted backups. Now, in 11.0 all the reiserfs DVD images fail to mount, while the XFS images mount fine. It is not an error on the DVD, because if I dd copy the DVD to a file, this file mounts fine. Details, configuration: -------- /etc/crypttab: mcr_mm_f3_dvd.r /Grande/imgs/crypta_f3_dvd.mm.r none noauto mcr_mm_f5_dvd.x /Grande/imgs/crypta_f5_dvd.mm.x none noauto mcr_mm_dvd.l /dev/dvd.l none noauto,loop mcr_dvd_copy /Grande/imgs/crypta_dvd_copy none noauto Note: /dev/dvd.l is a symlink to /dev/dvd to facilitate things in your script. /etc/fstab: /dev/mapper/mcr_mm_f3_dvd.r /mnt/crypta.mm_dvd3.r reiserfs acl,user_xattr,noauto 0 0 /dev/mapper/mcr_mm_f5_dvd.x /mnt/crypta.mm_dvd5.x xfs noatime,noauto 0 0 /dev/mapper/mcr_mm_dvd.l /mnt/dvd.crypta.l auto ro,noauto,user,noatime,nodiratime 0 0 /dev/mapper/mcr_dvd_copy /mnt/crypta.mm_dvd3.cpy auto ro,noatime,noauto 0 0 To mount, I use: /etc/init.d/boot.crypto start /dev/dvd.l to mount the DVD, or "/Grande/imgs/crypta_f3_dvd.mm.r" to mount the image. Your script also accepts the devmapper name instead, which is shorter. For simplicity, I have this symlink: /sbin/rccrypto -> /etc/init.d/boot.crypto* (note: automounting by gnome fails silently, so it is useless for this report) Details, procedure: ------------------- I copy the dvd to a file: dd if=/dev/dvd of=crypta_dvd_copy && cp crypta_dvd_copy crypta_dvd_2ndcopy Check: nimrodel:/Grande/imgs # file * crypta_dvd_2ndcopy: LUKS encrypted file, ver 1 [aes, cbc-essiv:sha256, sha1] UUID: bcfe5715-c092-4fea-b2dc-7951cb2 crypta_dvd_copy: LUKS encrypted file, ver 1 [aes, cbc-essiv:sha256, sha1] UUID: bcfe5715-c092-4fea-b2dc-7951cb2 crypta_f3_dvd.mm.r: LUKS encrypted file, ver 1 [aes, cbc-essiv:sha256, sha1] UUID: bcfe5715-c092-4fea-b2dc-7951cb2 crypta_f5_dvd.mm.x: LUKS encrypted file, ver 1 [aes, cbc-essiv:sha256, sha1] UUID: 1ec0ab07-73d0-4ccd-b8df-08076ff I mount it (the file "crypta_dvd_copy"): nimrodel:~ # rccrypto start mcr_dvd_copy Please enter passphrase for /Grande/imgs/crypta_dvd_copy (mcr_dvd_copy): Please enter passphrase for /Grande/imgs/crypta_dvd_copy (mcr_dvd_copy): key slot 0 unlocked. Command successful. /Grande/imgs/crypta_dvd_copy... done Succeeds. Kernel log: Nov 3 14:25:14 nimrodel kernel: REISERFS (device dm-3): found reiserfs format "3.6" with standard journal Nov 3 14:25:14 nimrodel kernel: REISERFS (device dm-3): using ordered data mode Nov 3 14:25:14 nimrodel kernel: REISERFS (device dm-3): journal params: device dm-3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 Nov 3 14:25:14 nimrodel kernel: REISERFS (device dm-3): checking transaction log (dm-3) Nov 3 14:25:14 nimrodel kernel: REISERFS (device dm-3): Using r5 hash to sort names Now I stop it. Notice that the fstab entry for this file specified RO, but: nimrodel:/Grande/imgs # cmp crypta_dvd_2ndcopy crypta_dvd_copy crypta_dvd_2ndcopy crypta_dvd_copy differ: char 34156545, line 131445 PROVEN! The kernel writes to a filesystem marked RO! This breaks forensics! :-/ Now, I try the DVD itself: nimrodel:~ # rccrypto start mcr_mm_dvd.l Please enter passphrase for /dev/dvd.l (mcr_mm_dvd.l): Please enter passphrase for /dev/dvd.l (mcr_mm_dvd.l): key slot 0 unlocked. Please enter passphrase for /dev/dvd.l (mcr_mm_dvd.l): Command successful. mount: wrong fs type, bad option, bad superblock on /dev/mapper/mcr_mm_dvd.l, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so /dev/dvd.l... failed nimrodel:~ # Kernel log: Nov 3 14:27:41 nimrodel kernel: REISERFS (device dm-3): found reiserfs format "3.6" with standard journal Nov 3 14:27:41 nimrodel kernel: REISERFS (device dm-3): using ordered data mode Nov 3 14:27:41 nimrodel kernel: REISERFS (device dm-3): journal params: device dm-3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 Nov 3 14:27:41 nimrodel kernel: REISERFS (device dm-3): checking transaction log (dm-3) Nov 3 14:27:41 nimrodel kernel: hdc: command error: status=0x51 { DriveReady SeekComplete Error } Nov 3 14:27:41 nimrodel kernel: hdc: command error: error=0x50 { LastFailedSense=0x05 } Nov 3 14:27:41 nimrodel kernel: ide: failed opcode was: unknown Nov 3 14:27:41 nimrodel kernel: ATAPI device hdc: Nov 3 14:27:41 nimrodel kernel: Error: Illegal request -- (Sense key=0x05) Nov 3 14:27:41 nimrodel kernel: Invalid field in command packet -- (asc=0x24, ascq=0x00) Nov 3 14:27:41 nimrodel kernel: The failed "Write 10" packet command was: Nov 3 14:27:41 nimrodel kernel: "2a 00 00 00 41 26 00 00 02 00 00 00 00 00 00 00 " Nov 3 14:27:41 nimrodel kernel: end_request: I/O error, dev hdc, sector 66712 Nov 3 14:27:41 nimrodel kernel: Buffer I/O error on device hdc, logical block 8339 Nov 3 14:27:41 nimrodel kernel: lost page write due to I/O error on hdc Nov 3 14:27:41 nimrodel kernel: Buffer I/O error on device dm-3, logical block 8210 Nov 3 14:27:41 nimrodel kernel: lost page write due to I/O error on dm-3 Nov 3 14:27:41 nimrodel kernel: REISERFS warning (device dm-3): journal-837 _update_journal_header_block: IO error during journal replay Nov 3 14:27:41 nimrodel kernel: REISERFS warning (device dm-3): reiserfs-2006 journal_init: Replay Failure, unable to mount Nov 3 14:27:42 nimrodel kernel: REISERFS warning (device dm-3): sh-2022 reiserfs_fill_super: unable to initialize journal space Notice that the DVD is fine, as I copied it to a file, and this file mounts fine. I have tried several times with variations in syntax, and with several DVDs. The problem, is that the reiser routines are trying to WRITE to the DVD. Remember that I reported this on Bug 409504 last July, but 10.3 succeeded to mount anyway. 11.0 fails. Now, I try a DVD containing an XFS image instead (made with the same procedure, same day, same batch): nimrodel:~ # rccrypto start mcr_mm_dvd.l Please enter passphrase for /dev/dvd.l (mcr_mm_dvd.l): Please enter passphrase for /dev/dvd.l (mcr_mm_dvd.l): key slot 0 unlocked. Please enter passphrase for /dev/dvd.l (mcr_mm_dvd.l): Command successful. /dev/dvd.l... done nimrodel:~ # kernel log: Nov 3 14:39:29 nimrodel kernel: Filesystem "dm-3": Disabling barriers, not supported by the underlying device Nov 3 14:39:29 nimrodel kernel: XFS mounting filesystem dm-3 Nov 3 14:39:30 nimrodel kernel: Ending clean XFS mount for filesystem: dm-3 Notice that due to Bug 345039 encrypted XFS filesystems can not be used, because writing to them blocks the kernel. So I turned to reiserfs... And ext3 is bad too, because too much space is lost to the log. My guess is that a non-encrypted reiserfs image on DVD will also fail to mount. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.