Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
88 views

Raid 0 disk outside

by mistake I run a fdisk /dev/sdb and then w to a raid 0 member, I see a message like the disk is now outside the raid but I ignored that and keep working on the machine. Then I make a reboot and pfff ...
1
vote
0answers
23 views

How to resize linux partition with RAID1?

I have a Proxmox disk with 130Gb LVM image. I moved it to 235Gb disk. And resized in the Proxmox. Done. But in my Linux distro, the partition still 130Gb (disk become 235Gb). The partitions: /dev/...
0
votes
1answer
1k views

How to recover an ext4 signature deleted with fdisk?

While resizing an EBS volume on Amazon AWS I accidentally deleted the ext4 signature. root@server:~# fdisk /dev/xvdf Welcome to fdisk (util-linux 2.31.1). Changes will remain in memory only, until ...
0
votes
0answers
18 views

creating a partition makes the server unbootable

I have a server that comes with a softRaid of 2x450gb nvme disks. Since all my data is backupped, I don't need the raid and I want to use the full space instead. From the hosting (OVH) control panel ...
-1
votes
1answer
45 views

0B size partition

I have one 0B partition in my disk as the 2nd partition in my CentOS machine. How can I delete it? In fdisk , it shows could not delete the partition. I want to increase vda1 size using growpart ...
2
votes
0answers
307 views

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 ...
0
votes
3answers
285 views

Restore corrupted partition table in emergency mode without fdisk command

When I manage a VPS, I used fdisk to adjust partitions. But when I reboot, the server complained that the block count 2780624 exceeds size of device (2441472 blocks) and entered emergency mode. I ...
0
votes
1answer
3k views

How to extend centos_root partition on Centos 7 and Hyper-V

I've been struggling to get this right and tried plenty of tutorials with no luck. I have a Centos 7 installed as a guest on Hyper-V and need to expand the disk space on centos root partition. I've ...
0
votes
1answer
197 views

Change name of GPT Partition (not label) under Windows from command line

I need to change the name of a GPT partition (not a filesystem label), and I haven't found any way to do it under Windows, except for this tool. The problem is that it's interactive and doesn't ...
1
vote
2answers
81 views

Added expanded disk capacity to RHEL7

I have an Hadoop cluster that is quickly running out of room. This cluster is built on RHEL7 VMs on GCP (Google Cloud Platform) Compute Engine. I had originally provisioned the cluster with 10Gb ...
2
votes
1answer
161 views

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 ...
0
votes
2answers
105 views

df shows 2 GB size fdisk shows 60 GB

My newly purchased KVM based VPS (virtual server) running Centos 7 shows a - to my mind - odd result for the df -h command versus fdisk -l and ssm list. I've put the output of various disk related ...
0
votes
0answers
35 views

Delete partition and create two other partitions instead one?

i have structure of my hdd, like this: Device Start End Sectors Size Type /dev/sdb1 40 2048 2009 1004.5K BIOS boot /dev/sdb2 4096 409602047 ...
0
votes
0answers
23 views

How to extending a partition onto a new drive in Ubuntu Server

I have a VPS which was installed by my hosting provider. Recently I ran out of space on the original 100GB drive and so they have now allocated an additional 100GB drive to me. I would like to expand ...
-1
votes
1answer
165 views

Centos 7 cannot find with fdisk [closed]

I can find /dev/vda1 with fdisk but /dev/vdb does not be found. What happened? And how I can resolve it? Thanks [root@tp-gpdb-ku05 master]# fdisk -l Disk /dev/vda: 107.4 ...
0
votes
0answers
112 views

why list of disks not printed with order from sfdisk or fdisk commands

we notice about this problem in last few days on one redhat machine ( version 7.2 ) we notice that order of the disks isn't according to the right order note - sda is the OS instead to get the ...
0
votes
1answer
224 views

linux mdraid: sfdisk partition table copy fails

One of the disks in my MD RAID 1 failed, and I had it replaced. Now the system runs on /dev/sdb, /dev/sda is blank. Although the disks are not identical (SAMSUNG HD753LJ vs. SAMSUNG HD754JJ), I made ...
1
vote
1answer
4k views

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 ...
0
votes
1answer
21 views

Unmatched Disk Size Partition

In Centos 7 I see this (virtualized machine on a IaaS): root@hongo developer]# fdisk -l Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors Units = sectors of 1 * 512 = 512 bytes Sector ...
1
vote
1answer
427 views

Unable to extend partition with gdisk on XenServer 6.5

I'm having trouble extending my partition on a XenServer 6.5. I originally had a 1.4TiB device (hardware RAID5) that I since upgraded to 10.9TiB. I upgraded the RAID by swapping out one disk at a ...
1
vote
1answer
620 views

Not able to format root partition in Arch Linux installation because already labelled

I am installing Arch Linux on a previously Windows machine. I have created the partitions, with root on sda1, and now I am trying to format it with mkfs.ext4 /dev/sda1, but it's not liking that. ...
0
votes
1answer
86 views

Have I created and mounted this raid array correctly?

So I am working out how to add a new raid1 array to our server as we have a raid1 array which is almost full. I have replicated our server setup in a virtual machine and attempted to add a raid array ...
0
votes
1answer
2k views

Add a new hard drive to extend /home partition in CentOS 7

I have a new hard drive on my server ( a 2 TB drive ) . I want to add this 2 TB to my current /home partition . The output of df -h [root@localhost ~]# df -h Filesystem Size Used Avail Use% ...
0
votes
0answers
236 views

script running non interactive fdisk does not work from cron

When I run the following script from command line I get the full output in /tmp/Fdisk.sh. But if I run the same script from cron I get only partial output. Is the shell skipping some instruction ...
8
votes
2answers
917 views

After hardware RAID array expansion fdisk wont allow me to use additional available sectors

We have a large ~18TB hardware raid array on a Dell R720xd. Currently the RAID5 array consists of 6x4TB and I needed to extend it. Step 1 expand the hardware raid array. Simple enough if you have ...
0
votes
0answers
736 views

unable to mount RAID 1 removed disk

I have removed two disk(sda1 & sdb1) from soft RAID1 array. mdadm --stop /dev/md0 mdadm --remove /dev/md0 mdadm --zero-superblock /dev/sda1 mdadm --zero-superblock /dev/sdb1 Output of mdadm --...
-1
votes
1answer
397 views

fdisk - list all hard drives more simply

Is there a neater way to list hard drives with fdisk? If I run fdisk -l I get the Disk, Units, Sector size, I/O size, etc - all distracting stuff. I can run fdisk -l | grep "Disk /" but this seems a ...
2
votes
1answer
2k views

extend MBR disk with ext4 partition to over 2 TB on CentOS 7

I have a CentOS 7 machine with two disks mounted [ /dev/sda and /dev/sdb ] using ext4. I need to extend /dev/sdb1 to over 2 TB. I extended the disk from 2 TB to 2.5 TB (google cloud) After using ...
0
votes
2answers
448 views

impossible to format an internal disk

I can't format a bunch of internal disks that I have bought in second hand from a datacenter. The disks were formatted in NTFS, this is 3 2TB seagate constellation ES +2 1TB seagate constellation ES + ...
0
votes
2answers
865 views

4 TB external disk on Centos 5

I have an old server running CentOS 5(Kernel 2.6.18-92.el5). It is running a legacy application so I can't retire it yet. I had connected a 2 TB USB disk to it to take backups and the disk is almost ...
-1
votes
3answers
1k views

How do i extend the root filesystem device of xenserver linux VM?

I created a linux VM and am trying to increase the disk size of the root device /dev/xvda but not sure how to do this the right/proper way Also do i have to shutdown the VM to be able to do this? ...
0
votes
1answer
3k views

Extending an existing LVM partition with fdisk

I am looking for some help on expanding my LVM partitions. I have two disks I want to expand (10GB to 50GB and 40GB to 150GB). I added the extra space in VMWare and the expanded disk is being picked ...
-2
votes
1answer
883 views

How can I merge an unused partition with my main partition?

I want to merge an unused partition with my main partition where the OS is installed (Debian 8). df -h output: Filesystem Size Used Avail Use% Mounted on /dev/vda1 9.9G 2.1G 7.4G 22% /...
2
votes
1answer
190 views

How can i split a partition on Ubuntu?

I just purchased a brand new server on OVH with disk specification: 2 x480GB of SSD SOFT. When i do df -h, the output is: Filesystem Size Used Avail Use% Mounted on /dev/root 20G 13G ...
6
votes
2answers
22k views

How to reset a Harddisk (delete Mbr & delete Partitions) from the Command Line with a script without rebooting?

To start from a clean state I need to reset the hard disk to an empty state from command line. It is not about running a wipe utility, the data don't have to be overwritten. This question is quite ...
0
votes
2answers
60 views

How to unlist partitions from fdisk command in linux

While working on one of my server I noticed that there are no partitions listed under "fdisk -l" command. However the machine is working just fine. Wanted to know following things if anyone can help. ...
2
votes
1answer
3k views

Merge Logical Volume groups

I want to increase root LVM volume space. Is it possible to merge LogVol01 to LogVol00? My LVM setup looks like this: [root@server~]# lvs LV VG Attr LSize Origin Snap% Move ...
0
votes
1answer
79 views

How do I add storage to a VM so that the added storage is dedicated to a new directory?

I have an Ubuntu server with virt-manager. I have an Ubuntu VM running on this host from a qcow2 file. I don't use separate disk files or img files besides the qcow2 file. I want to allocate 50 GB ...
1
vote
2answers
5k views

LSI replace disk in raid1 with larger drives, how to expand raid to use free space

LSI MegaRAID SAS 9240-8i Situation: 2 - 128GB drives in a raid1 I've replaced each drive, one at a time to let the raid rebuild. The raid now consists of 2 - 256GB drives in raid1 Filesystem ...
0
votes
1answer
434 views

Why third partition of /dev/sda is shown as /dev/sdb instead of /dev/sda3?

I have two 3 TB disks in hardware RAID-1 (mirroring), controller DELL PERC H310 (it is a Dell PowerEdge R420 server). I have three partitions on the same disk. df and fdisk commands shows the third ...
1
vote
1answer
96 views

fdisk partition is unmounted and mounted at the same time

I installed Mint on VBox. I want to learn how to create, delete, and actually, manage partitions in Linux console (yeah I know GParted, that's not the point). The problem is, when I want to delete ...
1
vote
0answers
409 views

fdisk and parted won't work on a USB stick with Fedora 23 alpha 2 x86_64

So I burned a Fedora 23 alpha 2 on a 16GB USB stick through dd if=path/to/fedora.iso of=/dev/usb_device bs=512 I used bs=512 because the sectors on the stick are 512 bytes. Opening the stick in ...
4
votes
3answers
12k views

Resizing partition fdisk fails with invalid argument

I recently resized a VPS from a 50GB SSD to a 300GB SSD through my hoster's control panel. I now am trying to resize my main partition with fdisk to be able to use all the new space. However, fdisk ...
1
vote
3answers
2k views

Truncate empy space from a raw dd image

I have a raw disk image I took using dd of a Ubuntu instance. The total disk size is 300 GB, but only 5.5 GB used. Is there a way to resize the raw dd image down to 20 GB, keeping all of the 5.5 GB ...
1
vote
0answers
663 views

How to add a partition to CentOS without losing data on it

we had a CentOS 6.4 server with two RAIDs. One RAID-1 and the other RAID-5 RAID-1 had multiple partitions with OS installed on it. RAID-5 had two partitions with some data on it. In order to ...
0
votes
1answer
160 views

FreeBSD10 resize virtual server image to smaller partition

I have a VPS on the new Vultr system and I am noticing that they do not have pv-grub ready and available which makes my dilemma even more interesting. I have a 40gig image I need to migrate to a 15 ...
1
vote
1answer
665 views

After resizing NAS box new size does not show up under df -h

We have a 500GB NAS box attached to a Linux box and it appears as /dev/sdb. However after re-sizing from 345GB to 500GB the new size is not registering. [root@localhost iscsi]# df -h Filesystem ...
1
vote
2answers
1k views

How can I check the partition name in FreeBSD?

I am currently running my server in the rescue mode, due to the firewall issues. In order to disable the firewall thing I would have to mount the / partition. My problem is that I dont know/remember ...
0
votes
1answer
1k views

External HDD wrong size

I have an very interesting problem with a Seagate HDD (3TB): Under Windows the HDD has a size of ~3TB. When I connect it to Ubuntu 14.04 and try to format it with GParted, GParted tells me that the ...
2
votes
0answers
322 views

fdisk with lvm: Why is first sector at 3072 instead of 2048?

Using ubuntu 12.04, i have a xen-server and several vms. Considering /dev/vm-disks/testes - an lvm volume partitioned during OS install /dev/vm-disks/testes-home - another lvm volume, unpartitioned ...