GNU bug report logs -
#29503
parted name fails on names with spaces
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
I'm using GNU parted 3.2 running on Ubuntu 16.04.3 LTS. The machine is
an Amazon EC2 instance (ie a virtual server) launched from Ubuntu's
official 16.04 Amazon machine image (AMI).
I'm trying to use parted to add a name to a disk partition. I'm not
sure if it's of note, but this is a virtual disk attached to my EC2
instance (an "EBS volume" in Amazon terms). The disk in question is
device "/dev/xvdb". I've already created the partition with:
parted /dev/xvdb mklabel gpt
parted /dev/xvdb mkpart primary ext4 0% 100% --align=optimal
mkfs.ext4 -L 'Some other label' /dev/xvdb1
At this stage, "parted /dev/xvdb print" outputs:
parted /dev/xvdb print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 5368MB 5367MB ext4 primary
If I then try to add to partition 1 a name which contains spaces using
quotes, parted either prints its usage message or interactively
prompts for the partition number and name. However, in either case
parted seems to have applied the first word name given. Examples:
------------------------------------------------------
$ sudo parted /dev/xvdb name 1 'Secret Documents'
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE. If no COMMAND(s) are given, run in
interactive mode.
OPTIONs:
---x--- (more of the usage message removed)
version display the version number
and copyright information of GNU Parted
Report bugs to bug-parted <at> gnu.org
$ sudo parted /dev/xvdb print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 5368MB 5367MB ext4 Secret
------------------------------------------------------
$ sudo parted /dev/xvdb name 1 'My Name'
Partition number? ^C
Error: Expecting a partition number.
$ sudo parted /dev/xvdb print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 5368MB 5367MB ext4 My
------------------------------------------------------
The first example is the same as that given in the documentation at
https://www.gnu.org/software/parted/manual/html_node/name.html
Apologies if I'm misunderstanding the documentation, if this is a
known bug, or if this is something introduced upstream.
Regards,
Nathan Craike
This bug report was last modified 7 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.