Aloha, I'm trying to use parted to initialize a 7TB "disk" that will end up with xfs as its file system. I got it to work in interactive mode after some experimenting. But I'd like to be able to use the command line.
(parted) mkpart mkpart Partition name? []? root root File system type? [ext2]? Start? 0.0GB 0.0GB End? -1s -1s Warning: You requested a partition from 0.00B to 7000GB. The closest location we can manage is 17.4kB to 7000GB. Is this still acceptable to you? Yes/No? yes yes (parted) p p Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 7000GB 7000GB xfs root (parted) quit parted 1.9.0 23-Jul-2009 The requested output: [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted /dev/sdb print unit s print unit chs print Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 13671727104s Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 851025,166,20 Sector size (logical/physical): 512B/512B BIOS cylinder,head,sector geometry: 851025,255,63. Each cylinder is 8225kB. Partition Table: gpt Number Start End File system Name Flags [r...@test:~/] # 1. The documentation section 1.5 does not mention --disable-device-mapper . 2. Section 2.4.7, mkpart, says: mkpart [part-type fs-type name] start end I tried: (parted) mkpart 0 7gb mkpart 0 7gb End? 7000 7000 (parted) p p Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 7000MB 7000MB 512B 0 . I understand why I got 7000MB from 7000. I don't understand why there was not either an error message because the "gb" was lower case or the "7gb" did not take. 3. I'm guessing that the following has to do with the "sensible ranges" logic, but it is not too friendly. [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted /dev/sdb GNU Parted 1.9.0 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mkpart mkpart Partition name? []? root root File system type? [ext2]? Start? 0.0 0.0 End? 7000000.0 7000000.0 Error: The location 7000000.0 is outside of the device /dev/sdb. (parted) unit compact unit compact (parted) mkpart mkpart Partition name? []? root root File system type? [ext2]? Start? 0.0 0.0 End? 7000.0 7000.0 (parted) p p Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 7000MB 7000MB xfs root (parted) rm 1 rm 1 (parted) mkpart mkpart Partition name? []? root root File system type? [ext2]? Start? 0.0 0.0 End? 6999999.0 6999999.0 Error: The location 6999999.0 is outside of the device /dev/sdb. (parted) p p Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags (parted) mkpart mkpart Partition name? []? root root File system type? [ext2]? Start? 0.0GB 0.0GB End? -1s -1s Warning: You requested a partition from 0.00B to 7000GB. The closest location we can manage is 17.4kB to 7000GB. Is this still acceptable to you? Yes/No? yes yes (parted) p p Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 7000GB 7000GB xfs root (parted) quit If it says the disk is 7000GB, it should accept 7000000MB as a valid end value. 4. What happened here? [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart 0.0 1GB [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb print Model: AMCC 9650SE-8LP DISK (scsi) Disk /dev/sdb: 7000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags [r...@test:~/] # 5. Which number is invalid? [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart gpt xfs root 0.0 1GB Error: Invalid number. [r...@test:~/] # 4. Section 2.4.7, mkpart, says: mkpart [part-type fs-type name] start end I tried: [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mklabel gpt [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart 0.0GB -1s /h/thomas/src/parted/parted-1.9.0/parted/.libs/lt-parted: invalid option -- '1' Usage: parted [-hlmsv] [DEVICE [COMMAND [PARAMETERS]]...] [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart 0.0GB " -1s" /h/thomas/src/parted/parted-1.9.0/parted/.libs/lt-parted: invalid token: -1s Error: Expecting a file system type. [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart xfs root 0.0GB -1s /h/thomas/src/parted/parted-1.9.0/parted/.libs/lt-parted: invalid option -- '1' Usage: parted [-hlmsv] [DEVICE [COMMAND [PARAMETERS]]...] [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart xfs root 0.0GB " -1s" /h/thomas/src/parted/parted-1.9.0/parted/.libs/lt-parted: invalid token: root Error: Expecting a file system type. [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart gpt xfs root 0.0GB " -1s" Error: Invalid number. [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script /dev/sdb mkpart gpt xfs root 0.0GB -1s /h/thomas/src/parted/parted-1.9.0/parted/.libs/lt-parted: invalid option -- '1' Usage: parted [-hlmsv] [DEVICE [COMMAND [PARAMETERS]]...] Normally "[part-type fs-type name]" means that those values are optional. They do not appear to be. How does one specify "-1s" on the command line? [r...@test:~/] # /h/thomas/src/parted/parted-1.9.0/parted/parted --script -- /dev/sdb mkpart 0.0 -1s /h/thomas/src/parted/parted-1.9.0/parted/.libs/lt-parted: invalid token: -1s Error: Expecting a file system type. [r...@test:~/] # Optional? Mahalo, Jim _______________________________________________ bug-parted mailing list bug-parted@gnu.org http://lists.gnu.org/mailman/listinfo/bug-parted