Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbbFHKIw (ORCPT ); Mon, 8 Jun 2015 06:08:52 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:51964 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbbFHKIo (ORCPT ); Mon, 8 Jun 2015 06:08:44 -0400 Date: Mon, 8 Jun 2015 12:08:35 +0200 From: Heinz Diehl To: linux-kernel@vger.kernel.org Cc: Ryusuke Konishi , linux-nilfs@vger.kernel.org Subject: Re: NILFS2: double uuid Message-ID: <20150608100835.GA16569@fritha.org> References: <20150608064314.GA3172@fritha.org> <55754FDA.10406@lab.ntt.co.jp> <20150608094559.GB15702@fritha.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150608094559.GB15702@fritha.org> X-Accept-Language: no,dk,se,en,de Organization: private site OpenPGP: id=60F4A92C; url=http://www.fritha.org/htd.asc; preference=signencrypt User-Agent: Mutt/1.5.23+92 (17a4f92e4a95) (2014-03-12) X-Provags-ID: V03:K0:qt75WqPqtVuKeDeEdwkD0+YpxccqFyQnYySyvZuSXo2/k2LbyDM yzA8qqnzfdn/t2lFCuICj4+EregZNgBNuNNI+Epq6j3bZ0c+3D6e1u32x0hCb6nQ/KtM+S2 2v7lW2Hl4AY/9OAdtAgNa96DYZl+7bHmMVIZn9DXw/fqYc8qJaX2mUk0tUvSQQOu0avWOmC NxmdPelRhVccVFZ0KWW4Q== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3397 Lines: 88 On 08.06.2015, Heinz Diehl wrote: To be more precise, here's what works and what don't, in detail (and after a fresh install of Arch): The USB memory is xfs formatted and works fine: [root@alarmpi /]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda `-sda1 xfs ff17dda9-fcae-42e7-a438-9087de58902e mmcblk0 |-mmcblk0p1 vfat EA5B-4477 /boot `-mmcblk0p2 ext4 c4ddc925-15ab-4465-ac78-967a845e98d5 / Now, it's nilfs2 formatted: [root@alarmpi /]# mkfs.nilfs2 /dev/sda1 WARNING: Device /dev/sda1 appears to contain an existing xfs superblock. WARNING: All data will be lost after format! DO YOU REALLY WANT TO FORMAT DEVICE /dev/sda1? Continue? [y/N] y mkfs.nilfs2 (nilfs-utils 2.2.3) Start writing file system initial data to the device Blocksize:4096 Device:/dev/sda1 Device Size:32026656768 File system initialization succeeded !! After that, all seems to be ok. lsblk shown no double uuid: [root@alarmpi /]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda `-sda1 nilfs2 98da384c-392e-4551-98c0-d076524f5d8b mmcblk0 |-mmcblk0p1 vfat EA5B-4477 /boot `-mmcblk0p2 ext4 c4ddc925-15ab-4465-ac78-967a845e98d5 / [root@alarmpi /]# Now the USB drive gets manually mounted, all is ok: [root@alarmpi /]# mount /dev/sda1 /USBDRIVE [root@alarmpi /]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda `-sda1 nilfs2 98da384c-392e-4551-98c0-d076524f5d8b /USBDRIVE mmcblk0 |-mmcblk0p1 vfat EA5B-4477 /boot `-mmcblk0p2 ext4 c4ddc925-15ab-4465-ac78-967a845e98d5 / Now, the newly formatted drive is registered in fstab to be automatically mounted on boot: UUID=ff17dda9-fcae-42e7-a438-9087de58902e /USBDRIVE nilfs2 defaults 0 0 After rebooting the machine, nothing is mounted, and lsblk shows the double uuid: [root@alarmpi /]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda 98da384c-392e-4551-98c0-d076524f5d8b `-sda1 nilfs2 98da384c-392e-4551-98c0-d076524f5d8b mmcblk0 |-mmcblk0p1 vfat EA5B-4477 /boot `-mmcblk0p2 ext4 c4ddc925-15ab-4465-ac78-967a845e98d5 / The logs say: Jun 08 11:23:47 alarmpi mount: mount.nilfs2: Error while mounting /dev/sda on /USBDRIVE: Device or resource busy Jun 08 11:23:47 alarmpi systemd: Failed to mount /USBDRIVE. Here it becomes clear what happens: the system wants to mount /dev/sda rather than /dev/sda1, and thus fails. Out of curiosity, I tried both xfs, ext4 and btrfs, and all of them just work. Thanks, Heinz. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/