LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 10-14-2016, 08:17 AM   #1
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Rep: Reputation: Disabled
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
 
Old 10-14-2016, 08:28 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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.
 
Old 10-14-2016, 08:30 AM   #3
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
i want to delete all of it and start again
 
Old 10-14-2016, 08:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
The parted rm command will delete a partition.
 
Old 10-14-2016, 11:17 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,140

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
I think you have LVM set up? If so, parted is the wrong tool:
https://www.centos.org/docs/5/html/5...olume_Manager/
 
Old 10-14-2016, 11:22 AM   #6
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
sorry what does LVM mean or do
 
Old 10-14-2016, 12:20 PM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to format block sizes of 4026 from a 50GB device using parted? MrTux Linux - Newbie 9 02-09-2016 03:33 PM
I'm so lost trying to run Linux on an iMac off a recovery disk (Parted Magic recovery disk) 2KoNFuSSeD Linux - Newbie 2 12-22-2015 03:33 AM
[SOLVED] GNU parted only allowing fat16 FS on GPT disk. lkz Linux - Software 2 05-31-2013 08:50 PM
parted cannot see partitions on 2nd hard disk Gzou Linux - Hardware 4 01-23-2007 02:50 PM
using parted to erase whole disk shanenin Linux - Software 2 11-02-2005 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration