Questions tagged [fdisk]

fdisk was a command-line disk partitioning tool in Linux and old versions of Windows/MS-DOS. It is deprecated on Linux by its inability to handle GPT disks. New systems should use diskpart (Windows) or parted (Linux) to partition disks.

fdisk was a command-line disk partitioning tool in Linux and old versions of Windows/MS-DOS. It is deprecated on Linux by its inability to handle GPT disks. New systems should use diskpart (Windows) or parted (Linux) to partition disks.

148 questions
5
votes
2 answers

Repurposed disk - Linux blkid command returns incorrect information

I'm working with an SSD drive removed from a VMware ESXi installation. I'm trying to reuse the disk in an existing Linux installation (CentOS 6.2). The drive sits behind an HP Smart Array P410 RAID controller and is configured as a separate logical…
ewwhite
  • 194,921
  • 91
  • 434
  • 799
4
votes
1 answer

Why does fdisk have a discrepancy in translating units between cylinder and sectors?

We were re-partitioning a virtual disk to increase the size of an LVM's physical volume. This is how we initially performed this: $ fdisk /dev/sdb # delete partition fdisk> d ? 1 # create new partition fdisk> n ? p ? 1 first cylinder? [ENTER] last…
Belmin Fernandez
  • 10,629
  • 26
  • 84
  • 145
4
votes
6 answers

How to view if partitions primary or secondary in Linux

How do I view my partitions if they are primary or secondary in Linux CentOS? I tried df -T but it does not show if partitions are primary or secondary.
Justin
  • 5,008
  • 19
  • 58
  • 82
4
votes
2 answers

Cannot mount /dev/sdc1 on Debian 5.0, special device /dev/sdc1 doesn't exist

I'm trying to fix an odd problem I'm having that I've never seen or heard of before. I have a disk, /dev/sdc and I'm trying to mount it, but cannot. sudo mount /dev/sdc1 /mnt mount: you must specify the filesystem type Ok, I remember it was…
Jeff Welling
  • 402
  • 1
  • 4
  • 11
3
votes
0 answers

In linux, determine if a block device is being used

I'm doing automation that will reformat a new disk and mount it. I want my automation to check and make sure the disk isn't in use so I don't break something that was already running (as happened to me today!). EG, when I make my automation all…
Dylan Martin
  • 538
  • 4
  • 13
3
votes
1 answer

LVM in Linux with fdisk?

This question is similar to Is the fdisk partition type important when using lvm however will ask it for clarity. On a CentOS 6.5 insall, I accidentally took a new 3TB virtual disk and performed the commands pvcreate, vgcreate, and lvcreate then…
canon
  • 55
  • 1
  • 6
3
votes
5 answers

how do you mount and format /dev/sda to a different /dev/ name?

We have linux box running fedora. It has a small laptop hard drive running the OS and a 3ware RAID controller running 3 SATA drives RAID 5. When we boot the computer and login, I run “fdisk –l” and it lists all the hda partitions. No /dev/sda. …
phill
  • 327
  • 2
  • 13
  • 20
3
votes
3 answers

Aligned partitioning of 2TB disk with Linux fdisk

Is there a way to create a single 2TB partition, which is 4096-byte-sector aligned, on a disk using the standard Linux fdisk (I have tried version 2.17.2)? I've tried the following things and ran into the described error: If I simply use the -u…
Markus A.
  • 419
  • 7
  • 18
3
votes
2 answers

OpenBSD - Image on a new, bigger disk - how to use the extra space

Our present OpenBSD server needed more disk space, so we replaced the 13 GB disk (it's pretty old too) with 150GB. An image was made and then restored on the new disk. So far, so good. The new disk has a 13GB OpenBSD partition, it boots and works…
Erwin Blonk
  • 151
  • 2
  • 4
  • 14
3
votes
4 answers

Can you change the partition type on a linux server without starting up fdisk?

I'm looking for a way to change a partition type on a linux system without starting fdisk. (In this particular case from "linux" to "softwareRAID") The ultimate goal here is a script that is going to take /dev/sda and automatically create a…
jemmille
  • 304
  • 5
  • 17
3
votes
2 answers

same harddrive on the same controller, but different cylinder/head/sector

I have a pair of identical SATA harddrives connected to the same controller, but for some reason, fdisk under Debian 6 reports different CHS: user@host:~$ sudo fdisk -l /dev/sdc Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 81 heads, 63…
ssc
  • 1,129
  • 3
  • 16
  • 30
3
votes
3 answers

LVM2 vgreduce unknown physical volume from root logical volume CentOS8

I have a removable disk in my CentOS8, but I can't reduce the volume group: [root@localhost ~]# vgs WARNING: Couldn't find device with uuid 3GDhRA-KZjA-iDum-8Ut0-s9s0-NnW2-4QQEUv. WARNING: VG cl is missing PV…
benxymr
  • 41
  • 4
2
votes
2 answers

Ubuntu: /dev/sdb1 is apparently in use by the system; will not make a filesystem here

I get this error when I try to format dev/sdb1: $ mkfs.ext4 -L data /dev/sdb1 mke2fs 1.42.13 (17-May-2015) /dev/sdb1 is apparently in use by the system; will not make a filesystem here! where /dev/sdb has a partition that I have created with…
loretoparisi
  • 133
  • 1
  • 7
2
votes
1 answer

fdisk with a a single command fail in the second execution

I ran a script to format a disk with fdisk like this: (echo n; echo p; echo $number_part; echo $firs_sector; echo $second_sector; echo t; echo $format; echo p; echo w) | fdisk /dev/$disk when i execute for the first time, the format seen like: …
BrennQuin
  • 135
  • 6
2
votes
1 answer

Can't run drbdadm up with DRBD 8.4 on CentOS 7.3

Nodes: node1 node2 Use this way installed DRBD on both nodes: rpm -ivh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org yum -y install drbd84-utils kmod-drbd84 Added new hard…
cloud_cloud
  • 165
  • 2
  • 4
  • 15
1
2
3
9 10