LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   parted - trying to format disk (https://www.linuxquestions.org/questions/centos-111/parted-trying-to-format-disk-4175591399/)

robertkwild 10-14-2016 08:17 AM

parted - trying to format disk
 
hi all,

trying to format this disk in centos using parted but im getting an error, can anyone help out

-----------------------------------------------------

[root@ftp03 ~]# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA HGST HDS724040AL (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
3 17.4kB 1049kB 1031kB data
1 1049kB 525MB 524MB ext3
2 525MB 4001GB 4000GB lvm
4 4001GB 4001GB 860kB

(parted) mkpart
Partition name? []?
File system type? [ext2]? ext3
Start? 0%
End? -1s
Error: Unable to satisfy all constraints on the partition.
(parted)

--------------------------------------------------------------------------------------

many thanks,

rob

michaelk 10-14-2016 08:28 AM

mkpart will create a partition but since the drive is fully allocated it fails. If you just want to format an existing partition then use the mkfs command. However, which partition are you trying to format? sdb4 looks like the only one possible but it is only 860kB.

robertkwild 10-14-2016 08:30 AM

i want to delete all of it and start again

michaelk 10-14-2016 08:38 AM

The parted rm command will delete a partition.

DavidMcCann 10-14-2016 11:17 AM

I think you have LVM set up? If so, parted is the wrong tool:
https://www.centos.org/docs/5/html/5...olume_Manager/

robertkwild 10-14-2016 11:22 AM

sorry what does LVM mean or do

szboardstretcher 10-14-2016 12:20 PM

Googled 'lvm' here are the first 5 results. Make an effort.

http://tldp.org/HOWTO/LVM-HOWTO/
https://en.wikipedia.org/wiki/Logica...Manager_(Linux)
https://www.howtoforge.com/linux_lvm
https://wiki.archlinux.org/index.php/LVM
https://www.centos.org/docs/5/html/D...US/ch-lvm.html


All times are GMT -5. The time now is 02:21 AM.