Questions tagged [disk-partitioning]

related to disk partitions and their attributes, creation and maintenance.

disk partitioning covers questions relating to disk partitions and their attributes, creation and maintenance.

Wikipedia - Disk Partitioning

154 questions
170
votes
1 answer

How to find out mount/partition a directory or file is on? (Linux Server)

Is there a Linux command to easily find out which partition/mount a directory or file is on? (This is probably a RTM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..)
ina
  • 17,912
  • 37
  • 113
  • 187
29
votes
5 answers

unable to resize root partition on EC2 centos

i created my EC2 Machine using Community Image of Centos 6.3 x64. i have added a 35 GB disk. Now when i do #df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 1.2G 6.4G 16% / tmpfs 7.3G 0 …
Adeel Ahmad
  • 1,511
  • 1
  • 15
  • 20
28
votes
1 answer

Trying to resize2fs EB volume fails

I have a 200GB EBS volume and am trying to increase the space available. I followed the instructions on: http://www.hellersoftware.com/2012/resize-ebs-volume-attached-to-amazon-web-services-ec2-instance/ and managed to create a snapshot and create a…
Shamoon
  • 33,919
  • 63
  • 225
  • 452
17
votes
4 answers

How to create a new partition with Ansible

When I run this on the command line it works fine: echo -e "n\np\n1\n\n\nw" | sudo fdisk /dev/sdb But in Ansible it does not want to run in shell: - name: partition new disk shell: echo -e "n\np\n1\n\n\nw" | sudo fdisk /dev/sdb It does not…
warhansen
  • 638
  • 1
  • 6
  • 19
15
votes
0 answers

Mount native ext4 partition in WSL2

I often work on Windows and Linux (on dual boot) and I'm using a ntfs partition to synchronize a data between systems which is something problematic (lots of docker containers have a problem to work with ntfs permissions). I've tried to mount an…
Jaume
  • 552
  • 1
  • 5
  • 15
12
votes
1 answer

Smallest FAT32 Partition

I need to create a small partition image (a few MB) with FAT32 filesystem. I came up some contradictory info on the Internet about the minimum size limit of a FAT32 partition. When I tried to mkfs a 5MB partition as FAT32 in Linux, I get a warning…
mustafa
  • 3,174
  • 7
  • 29
  • 52
12
votes
1 answer

Partition information from CMD

Is there any CMD command line that shows all partition letters. For example: C, D, E... Can that command also show all the partition's information? Free space, used space, total space?
gedO
  • 518
  • 2
  • 6
  • 23
10
votes
3 answers

Linux c++: apis vs /proc files?

Im working on an app to collect and send various bits of system info (partition space/free, laptop battery info, etc). Im not having much success getting this information in the form of direct c++ api.. though its all available via files in /proc…
ethrbunny
  • 9,957
  • 8
  • 62
  • 117
10
votes
4 answers

Obtain a list of partitions on Windows

Goal I'm porting a filesystem to Windows, and am writing a more Windows-like interface for the mounter executable. Part of this process is letting the user locate a partition and pick a drive letter. Ultimately the choice of partition has to result…
Matt Joiner
  • 100,604
  • 94
  • 332
  • 495
9
votes
1 answer

Get size of volume on Windows

I'm writing a library to extract information about physical disks, partitions, and volumes on a Windows system (XP or later). I'm trying to get the capacity of a volume. Here are the approaches I know about and the reason each…
Ben Voigt
  • 260,885
  • 36
  • 380
  • 671
8
votes
4 answers

Assign a mount point folder path to a drive using PowerShell

I have a server that is provisioned with several disks. One for an OS, one for programs etc., and the remaining are to be mounted to empty NTFS folders. Disk 0: C: Disk 1: G: Disk 2: G:\Folder01\ Disk 3: G:\Folder02\ This is fairly straightforward…
8
votes
2 answers

How to check a disk for partitions for use in a script in Linux?

I'm scripting something in Bash for Linux systems. How would I check a disk for partitions in a robust manner? I could use grep, awk, or sed to parse the output from fdisk, sfdisk, etc., but this doesn't seem to be an exact science. I could also…
Synthead
  • 1,777
  • 4
  • 18
  • 25
6
votes
1 answer

How to make a tar backup of a root filesystem?

I have linux installed on SD card, I used this command to install the rootfs tar xpjf rootfs.tar.bz -C /mnt/rootfs/ Now, I made some changes to the rootfs and I would like to create a backup that I can use with the same command above, I tried…
iabdalkader
  • 15,788
  • 2
  • 42
  • 68
5
votes
3 answers

Is it possible to format a memory stick, pen drive or disk using Java?

I would like to create a multi-plattform utility to format / erase memory sticks, disks, etc. Is it possible to do this in Java? Or do I need to call native methods for each operational system plattform?
John John Pichler
  • 3,872
  • 4
  • 36
  • 68
5
votes
0 answers

USE WMI and WMQ to get Logical Disk and Partition Information from Win32_PnPEntity of SERVICE type USBSTOR

I am detecting when our proprietary USB device is attached to a PC. When we detect this, we get the related Win32_PnPEntity. We want to use this Win32_PnPEntity as a source of the following information: - USB Descriptor VID, PID, REV, Firmware…
Ian McShane
  • 340
  • 3
  • 10
1
2 3
10 11