On Fri 16 Feb 2024 at 01:32:26 (-0500), gene heskett wrote: > On 2/15/24 16:20, David Wright wrote: > > On Thu 15 Feb 2024 at 20:44:52 (+0000), Andy Smith wrote: > > > On Thu, Feb 15, 2024 at 03:19:54PM -0500, gene heskett wrote: > > > > On 2/15/24 11:21, Andy Smith wrote: > > > > > You asked if "labels" would survive their associated partition being > > > > > put into LVM. > > > > > > > > > > I said, "yes if you mean partition names, no if you mean filesystem > > > > > labels". > > > > > > > > > I'm still confused and it is not all the well clarified by looking at > > > > gparted, a shot of which I posted. > > > > > > This could all be answered easily if you'd just post the copy-paste > > > of your terminal scrollback for what you actually did. Hopefully you > > > don't now object to me asking what you meant since apparently even > > > you do not know if you mean partition names or filesystem labels. > > > >From what you posted it now sounds like labels on the ext4 > > > filesystems that you created. > > > > Gene effectively shoots himself in the foot by using gparted (GUI) > > instead of, say, gdisk where it's easy to paste what was done, or > > for someone, say me, to post an example:
[ … skipped over creating the partition table … ] > > # gdisk -l /dev/sdz > > GPT fdisk (gdisk) version 1.0.3 > > > > Partition table scan: > > MBR: protective > > BSD: not present > > APM: not present > > GPT: present > > > > Found valid GPT with protective MBR; using GPT. > > Disk /dev/sdb: 3907029168 sectors, 1.8 TiB > > Model: Desktop > > Sector size (logical/physical): 512/512 bytes > > Disk identifier (GUID): A1093790-9A1A-4A7E-A807-B9CC6F7CF77E > > Partition table holds up to 128 entries > > Main partition table begins at sector 2 and ends at sector 33 > > First usable sector is 34, last usable sector is 3907029134 > > Partitions will be aligned on 2048-sector boundaries > > Total free space is 2014 sectors (1007.0 KiB) > > > > Number Start (sector) End (sector) Size Code Name > > 1 2048 3907029134 1.8 TiB 8300 Lulu01 > > # > > > And this "partition" name survives?, and can be unique?, and can be > used in a mount cmd? That's how I'll do it then. This if all 3 > questions above can be answered with a yes is the answer I've been > trying to squeeze out all along. Thank you. Yes, the partition name (PARTLABEL) is in the partition table, not inside the partition itself. It's as unique as you make it, because you choose it. I've scrawled the names of my disks on the casing with a magic marker for 25 years, from adam (6.4GB fujitsu) to wick (2TB WD). The PARTLABELs and LABELs use that name as the stem, capitalised and lowercase respectively. As for using it with the mount command, that depends on what the partition contains. For a straightforward filesystem, you can, as described by man mount (under Indicating the device and filesystem). But I wouldn't, and I don't think you want to, as I believe you want to use the partition as /part/ of something larger. Whether you /can/ use it to mount depends on what the partition contains. I don't use LVM or RAID, so I can't advise you there, except to say that you wouldn't want to mount one piece of a larger structure, AFAIK. But in my case, I use LUKS encryption, and I can demonstrate what happens: $ sudo udisksctl unlock --block-device /dev/disk/by-partlabel/Lulu01 Passphrase: Unlocked /dev/sdc1 as /dev/dm-2. $ # mount /dev/disk/by-partlabel/Lulu01 /media/lulu01 mount: /media/lulu01: unknown filesystem type 'crypto_LUKS'. # You don't want to mount the partition, but the filesystem /within/ the partition: # mount LABEL=lulu01 /media/lulu01 # Of course, I don't normally use mount as root because I have an entry in /etc/fstab: LABEL=lulu01 /media/lulu01 ext4 rw,errors=remount-ro,user,noauto and I use a bash function called, surprisingly, lulu, as there's only one partition on the disk: $ type lulu lulu is a function lulu () { sudo udisksctl unlock --block-device /dev/disk/by-partlabel/Lulu01 && mount /media/lulu01 } $ thus: $ lulu Passphrase: Unlocked /dev/sdc1 as /dev/dm-2. $ But I would emphasise that, having unlocked the partition, I mount the filesystem because it stands alone. It's not part of a RAID, LVM, or whatever, that might need assembling with other components before mounting the whole ensemble. Cheers, David.