From mboxrd@z Thu Jan 1 00:00:00 1970 From: Duncan <1i5t5.duncan@cox.net> Subject: Re: LABEL only 1 device Date: Mon, 27 Feb 2012 16:48:34 +0000 (UTC) Message-ID: References: <20120227101154.GE18898@carfax.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: linux-btrfs@vger.kernel.org Return-path: List-ID: Helmut Hullen posted on Mon, 27 Feb 2012 11:27:00 +0100 as excerpted: > Du meintest am 27.02.12: > >>>> mkfs.btrfs creates a new filesystem. The -L option sets the label >>>> for the newly-created FS. >>> The safest way may be deleting this option ... it seems to work as >>> expected only when I create a new FS on 1 disk/partition. > >> I've said this several times: Your expectations are wrong. You >> don't label partitions. > > Yes - now I know. > But I'm afraid other people also expect wrong - when I use mkfs.ext[234] > then this option works (in another way than with "mkfs.btrfs"). AFAIK, it works in the same way... that is, it labels the, in that case, ext2/3/4 filesystem, in this case (mkfs.btrfs), btrfs filesystem. >>From the manpages: mkfs.btrfs (aka mkbtrfs): -L, --label name Specify a label for the filesystem. mkfs.ext2/3/4 (aka mke2fs): -L new-volume-label Set the volume label for the filesystem to new-volume-label. The maximum length of the volume label is 16 bytes. e2label: e2label will display or change the filesystem label on the ext2, ext3, or ext4 filesystem located on device. mkreiserfs: -l | --label LABEL Sets the volume label of the filesystem. LABEL can at most be 16 characters long; if it is longer than 16 characters, mkreiserfs will truncate it. reiserfstune: -l | --label LABEL Set the volume label of the filesystem. LABEL can be at most 16 characters long; if it is longer than 16 characters, reiserfstune will truncate it. The mkswap manpage does make things a bit more confusing, until you realize that the "device" they're referencing is a "swap device", which can be a file, not just a "block device". mkswap sets up a Linux swap area on a device or in a file. [...] -L, --label label Specify a label for the device, to allow swapon by label. fstab indicates the filesystem label: The first field (fs_spec). This field describes the block special device or remote filesystem to be mounted. For ordinary mounts it will hold (a link to) a block special device node (as created by mknod(8)) for the device to be mounted, like `/dev/cdrom' or `/dev/sdb7'. [...] Instead of giving the device explicitly, one may indicate the (ext2 or xfs) filesystem that is to be mounted by its UUID or volume label (cf. e2label(8) or xfs_admin(8)), writing LABEL=