Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
4290
views
Adding brick volume to gluster fails
I created a 2TB volume to increase space on home directory. I created the partition: $ parted /dev/xvdb mklabel gpt $ parted -s /dev/xvdb mkpart primary ext4 1 100% Formatted the partition: $ mkfs.ext4 -I 512 /dev/xvdb1 Added the entry to `/etc/fstab` /dev/xvdb /export/home/brick3 ext4 defaults 0 0...
I created a 2TB volume to increase space on home directory.
I created the partition:
$ parted /dev/xvdb mklabel gpt
$ parted -s /dev/xvdb mkpart primary ext4 1 100%
Formatted the partition:
$ mkfs.ext4 -I 512 /dev/xvdb1
Added the entry to
/etc/fstab
/dev/xvdb /export/home/brick3 ext4 defaults 0 0
Created the mountpoint:
$ mkdir -p /export/home/brick3
$ chmod 0755 /export/home/brick3
Mounted the partition:
$ mount /export/home/brick3
$ mkdir /export/home/brick3/home
$ chmod 0775 /export/home/brick3/home
once I tried to add the new brick to volume thats where I get an error.
$ gluster volume add-brick home :/export/home/brick3/home
volume add-brick: failed Incorrect number of bricks supplied 1 with count 2
Mervyn Clarke
(43 rep)
Jul 11, 2018, 02:37 PM
• Last activity: Jul 2, 2025, 04:03 PM
4
votes
1
answers
2973
views
How can I re-partition a hard/ssd-drive without losing data?
When I got my notebook with a 512GB SSD, I reformatted it and installed Ubuntu. I've followed Ubuntu's suggestion to partition the drive, so I have it partitioned as follows: $ sudo parted -l Model: NVMe Device (nvme) Disk /dev/nvme0n1: 512GB Sector size (logical/physical): 512B/512B Partition Table...
When I got my notebook with a 512GB SSD, I reformatted it and installed Ubuntu. I've followed Ubuntu's suggestion to partition the drive, so I have it partitioned as follows:
$ sudo parted -l
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 512GB 512GB ext4
The drive is now 81% full, as shown by
df -h
:
/dev/nvme0n1p1 511M 26M 486M 6% /boot/efi
/dev/nvme0n1p2 468G 358G 87G 81% /
I want to keep partition 1
as it is and split partition 2
in two, so that /
will be in one partition and /home
will be in another partition. So the final partition table would look like this:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 32GB 32GB ext4
3 32GB 512GB 480GB ext4
The reason I want to do that is I want to install a new version of Ubuntu (I don't want to upgrade) while keeping my /home
untouched.
Is there a way to do this? I am able to use a live distro in order to manipulate the SSD partitions when they are unmounted. Will that make this task easier?
My requirements are:
1. The obvious one: not losing any data.
2. Not having to copy everything to another device.
So basically what I'm asking is:
**Is there a way of splitting one of the partitions into two without having to reformat any of them?**
**Edit:**
It seems like, for my specific case, the best option will be:
1. Boot a Live-CD.
2. Open gparted
.
3. Resize partition 2
to 32GB less than it is now (512GB).
4. Move it to the end of the SSD.
5. Create a 32GB partition in the free space.
6. Save changes and exit gparted
.
6. Install the new distro into this new 32GB partition, configuring /home
to be mounted in the previously resized partition.
7. Move /home
subdirectories to root of the old partition and delete everything else.
Alexandre Schmidt
(338 rep)
Dec 24, 2018, 12:33 AM
• Last activity: Jun 3, 2025, 12:03 PM
2
votes
1
answers
6200
views
Cannot see my SD card in parted
When I plug in my card reader, it shows up at `/def/sdf`, and when I insert this SD card I also see `/dev/sdf1`, but `parted` won't show the disk. It doesn't have any information I need, I just want to use the card. Why doesn't it show up in `parted`? EDIT (more details): I'm on Ubuntu 14.04 sudo pa...
When I plug in my card reader, it shows up at
/def/sdf
, and when I insert this SD card I also see /dev/sdf1
, but parted
won't show the disk. It doesn't have any information I need, I just want to use the card. Why doesn't it show up in parted
?
EDIT (more details):
- I'm on Ubuntu 14.04
sudo parted -l
will not list my SD card- After plugging the SD reader:
$ ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdf1 $ sudo file -s /dev/sdf /dev/sdf: writable, no read permission $ sudo fdisk /dev/sdf fdisk: unable to open /dev/sdf: No medium found
Uri London
(93 rep)
Nov 17, 2014, 03:04 PM
• Last activity: May 13, 2025, 04:05 AM
2
votes
2
answers
2870
views
External drive partition mounting but not found in parted
Here is my situation : I have an external hard drive of 320Gb. The drive is plugged using a disk docking, and mounts automatically when started. I can explore the directory tree, read and write in the mounted partition. The mounted partition seems to be FAT32 ("seems" cause I can't find the informat...
Here is my situation :
I have an external hard drive of 320Gb.
The drive is plugged using a disk docking, and mounts automatically when started.
I can explore the directory tree, read and write in the mounted partition.
The mounted partition seems to be FAT32 ("seems" cause I can't find the information).
My goal is to erase the disk, and create a new exFat partition. I did not succeed to achieve this.
I tried formating the disk with gnome-disks :
Error synchronizing after initial wipe: Timed out waiting for object (udisks-error-quark, 0)
I tried gparted and on startup it says end of file while reading /dev/sdb”
and then show that the disk is unallocated of size 512B.
Note that I immediately made a backup.
I also tried to connect the disk using different dockings.
I read many threads about hard drive problematics, but didn't find one where someone is the same situation, so before starting messing up I'd like to get some advices as I am definitely not skilled there.
Here is some informations :
What dmesg gives me when I plug the disk :
$ sudo dmesg
[72866.922181] usb 1-2: new high-speed USB device number 39 using xhci_hcd
[72867.074593] usb 1-2: New USB device found, idVendor=059f, idProduct=0828, bcdDevice= 0.00
[72867.074601] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[72867.074605] usb 1-2: Product: d2 Quadra
[72867.074609] usb 1-2: Manufacturer: LaCie
[72867.074613] usb 1-2: SerialNumber: 00D04B7A10097C8E
[72867.082929] usb-storage 1-2:1.0: USB Mass Storage device detected
[72867.084025] scsi host2: usb-storage 1-2:1.0
[72867.086319] input: LaCie d2 Quadra as /devices/pci0000:00/0000:00:15.0/usb1/1-2/1-2:1.1/0003:059F:0828.0008/input/input25
[72867.147133] hid-generic 0003:059F:0828.0008: input,hidraw1: USB HID v1.11 Device [LaCie d2 Quadra] on usb-0000:00:15.0-2/input1
[72868.096079] scsi 2:0:0:0: Direct-Access ST332082 0AS 3.AA PQ: 0 ANSI: 4
[72868.099156] sd 2:0:0:0: Attached scsi generic sg1 type 0
[72868.101805] sd 2:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[72868.102191] sd 2:0:0:0: [sdb] Write Protect is off
[72868.102193] sd 2:0:0:0: [sdb] Mode Sense: 10 00 00 00
[72868.104502] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[72868.121742] sdb: sdb1
[72868.123517] sd 2:0:0:0: [sdb] Attached SCSI disk
The partition is mounted at /media/user/BACKUP :
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111,8G 0 disk
└─sda1 8:1 0 111,8G 0 part /home
sdb 8:16 0 298,1G 0 disk
└─sdb1 8:17 0 298,1G 0 part /media/user/BACKUP
mmcblk0 179:0 0 29,1G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot/efi
├─mmcblk0p2 179:2 0 27,7G 0 part /
└─mmcblk0p3 179:3 0 976M 0 part [SWAP]
mmcblk0boot0 179:256 0 4M 1 disk
mmcblk0boot1 179:512 0 4M 1 disk
This is telling me that the partition is FAT32 :
$ cp ~/movies/BigMovie.mkv /media/user/BACKUP/BigMovie.mkv
cp: error writin '/media/user/BACKUP/BigMovie.mkv': File too large
ls -l /media/user/BACKUP/
total 4194368
-rw-r--r-- 1 user user 4294967295 juin 29 10:51 BigMovie.mkv
The (non-existent) partition table on parted (or using fdisk) :
$ sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: (file)
Disk /dev/sdb: 512B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
(parted)
$ sudo fdisk /dev/sdb
Commande (m pour l'aide) : p
Disque /dev/sdb : 512 B, 512 octets, 1 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0xfd445558
I've tried anyway to alterate the partition scheme with fdisk :
$ sudo fdisk /dev/sdb
# trying a dos partition table
Command (m for help): o
Created a new DOS disklabel with disk identifier 0x98d9e56d.
# at this point it seems alreayd lost
Command (m for help): n
All space for primary partitions is in use.
Command (m for help): w
The partition table has been altered.
Syncing disks.
# nothing changed
Command (m for help): p
Disk /dev/sdb: 512 B, 512 bytes, 1 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x98d9e56d
# trying GPT
Command (m for help): g
Created a new GPT disklabel (GUID: 9E30965C-889B-A249-B6D7-71580BCE1CBE).
Command (m for help): n
Partition number (1-128, default 1):
First sector (34-18446744073709551583, default 34):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (34-18446744073709551583, default 18446744073709551583):
# 16 EiB ? I'd like too !
Created a new partition 1 of type 'Linux filesystem' and of size 16 EiB.
# as expected
Command (m for help): w
fdisk: failed to write disklabel: Invalid argument
Thanks for your help !
T3e
(121 rep)
Jun 29, 2021, 09:57 AM
• Last activity: May 4, 2025, 04:09 AM
10
votes
10
answers
17128
views
GNU parted resizepart in script
I would like to used the `yes` command so that GNU parted does not wait for user input : root@195-xxx-xxx-xxx:/proc# parted /dev/sda unit B resizepart 2 1166016512B Warning: Shrinking a partition can cause data loss, are you sure you want to continue? Yes/No? y Information: You may need to update /e...
I would like to used the
yes
command so that GNU parted does not wait for user input :
root@195-xxx-xxx-xxx:/proc# parted /dev/sda unit B resizepart 2 1166016512B
Warning: Shrinking a partition can cause data loss, are you sure you want
to continue?
Yes/No? y
Information: You may need to update /etc/fstab.
root@195-xxx-xxx-xxx:/proc# echo $?
0
However using yes
does not work here :
root@195-xxx-xxx-xxx:/proc# yes | parted /dev/sda unit B resizepart 2 166016512B
Warning: Shrinking a partition can cause data loss, are you sure you
want to continue?
root@195-xxx-xxx-xxx:/proc# echo $?
1
Edit:
The --script
option does not work as well :
root@195-xxx-xxx-xxx:/proc# parted --script /dev/sda unit B resizepart 2 1166016512B
Warning: Shrinking a partition can cause data loss, are you sure you
want to continue?
root@195-xxx-xxx-xxx:/proc# echo $?
1
Xion345
(759 rep)
Mar 15, 2015, 06:36 PM
• Last activity: Mar 19, 2025, 03:33 PM
2
votes
2
answers
13480
views
Make parted start next partition after previous one - automatically?
I've inherited a shell script that pipes a list of 'random' characters to `fdisk`. What it is doing is partitioning a disk as follows: Set up the blank disk, partition table etc Create first partition size A Create second partition, size Y, immediately after the first one. Create third partition, si...
I've inherited a shell script that pipes a list of 'random' characters to
fdisk
. What it is doing is partitioning a disk as follows:
Set up the blank disk, partition table etc
Create first partition size A
Create second partition, size Y, immediately after the first one.
Create third partition, size X, immediately after the second one.
And to add to the 'fun', A, Y, and X are calculated and may change depending on the size of the available new disk.
Fdisk will prompt for starting position based on the existing positions and the 'code' just 'hits return' and accepts this.
This code is extremely opaque and I would like to replace it with calls to 'parted --script...
' instead of fdisk
but I can't see that parted has a way to say 'start immediately after the last partition'. It looks like I would have to keep calculating the start position myself.
Am I correct and if so does anyone have a sensible solution for this?
Paul D Smith
(261 rep)
Feb 19, 2018, 10:14 AM
• Last activity: Mar 17, 2025, 01:20 PM
1
votes
0
answers
67
views
No space left on device but only 50% space and 1% inodes used
This is on a Iomega IX200 NAS which had been expanded to 4TB disks from the original 2TB. It all looks good. But when I try to save data to a new file I get the "No space left on device error". I get this whether I try to save a file via the NAS drive share on another device or vi the SSH session on...
This is on a Iomega IX200 NAS which had been expanded to 4TB disks from the original 2TB.
It all looks good.
But when I try to save data to a new file I get the "No space left on device error". I get this whether I try to save a file via the NAS drive share on another device or vi the SSH session on the NAS itself.
df -h
reports:
Filesystem Size Used Avail Use% Mounted on
rootfs 50M 3.7M 47M 8% /
/dev/root.old 6.5M 2.1M 4.4M 33% /initrd
none 50M 3.7M 47M 8% /
/dev/md0_vg/BFDlv 4.0G 624M 3.2G 17% /boot
/dev/loop0 592M 538M 54M 91% /mnt/apps
/dev/loop1 4.9M 2.2M 2.5M 48% /etc
/dev/loop2 260K 260K 0 100% /oem
tmpfs 122M 0 122M 0% /mnt/apps/lib/init/rw
tmpfs 122M 0 122M 0% /dev/shm
/dev/mapper/md0_vg-vol1
16G 1.5G 15G 10% /mnt/system
/dev/mapper/5244dd0f_vg-lv58141b0d
3.7T 2.0T 1.7T 55% /mnt/pools/A/A0
/mnt/pools/A/A0
is the one that provisions the storage.
df -h -i
:
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 31K 567 30K 2% /
/dev/root.old 1.7K 130 1.6K 8% /initrd
none 31K 567 30K 2% /
/dev/md0_vg/BFDlv 256K 20 256K 1% /boot
/dev/loop0 25K 25K 11 100% /mnt/apps
/dev/loop1 1.3K 1.1K 139 89% /etc
/dev/loop2 21 21 0 100% /oem
tmpfs 31K 4 31K 1% /mnt/apps/lib/init/rw
tmpfs 31K 1 31K 1% /dev/shm
/dev/mapper/md0_vg-vol1
17M 9.7K 16M 1% /mnt/system
/dev/mapper/5244dd0f_vg-lv58141b0d
742M 2.6M 739M 1% /mnt/pools/A/A0
When the partition was grown I ran lvresize
and xfs_grow
, after which it started showing as having 3.7Tb capacity.
Disks/partitions:
$ parted -l
Model: Seagate ST4000VN008-2DR1 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 36.9kB 21.5GB 21.5GB primary
2 21.5GB 4001GB 3979GB primary
Model: Seagate ST4000VN008-2DR1 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 36.9kB 21.5GB 21.5GB primary
2 21.5GB 4001GB 3979GB primary
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/5244dd0f_vg-lv58141b0d: 3979GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 3979GB 3979GB xfs
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/md0_vg-vol1: 17.2GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 17.2GB 17.2GB xfs
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/md0_vg-BFDlv: 4295MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 4295MB 4295MB ext2
Error: /dev/mtdblock0: unrecognised disk label
Error: /dev/mtdblock1: unrecognised disk label
Error: /dev/mtdblock2: unrecognised disk label
Error: /dev/mtdblock3: unrecognised disk label
Error: /dev/md0: unrecognised disk label
Error: /dev/md1: unrecognised disk label
When I ran mdadm --detail
I noticed the second partition of the RAID1 pair was set to 'removed':
mdadm --detail /dev/md1
/dev/md1:
Version : 01.00
Creation Time : Mon Mar 7 08:45:49 2011
Raid Level : raid1
Array Size : 3886037488 (3706.01 GiB 3979.30 GB)
Used Dev Size : 7772074976 (7412.03 GiB 7958.60 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Thu Jan 23 03:29:04 2025
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Name : ix2-200-DC386F:1
UUID : 8a192f2c:9829df88:a6961d81:20478f62
Events : 365631
Number Major Minor RaidDevice State
0 0 0 0 removed #### <<<< THIS ONE is /dev/sdb2
2 8 2 1 active sync /dev/sda2
When I do an examine on /dev/sdb2
I get:
$ mdadm --examine /dev/sdb2
mdadm: No md superblock detected on /dev/sdb2.
I was wondering if there is still, within the firmware, a limit (the original sized disks had a capacity of 1.8 Tb). But am now thinking the 'removed' disk is the problem, but would that explain why I can only use 1.7Tb of a 3.4Tb filesystem? /dev/sda2
reports as 'clean'.
Edit:
I tried
mdadm --zero-superblock /dev/sdb2
Followed by
mdadm --manage /dev/md1 --add /dev/sdb2
But I got the error mdadm: add new device failed for /dev/sdb2 as 3: Invalid argument
.
Pro West
(111 rep)
Jan 23, 2025, 11:44 AM
• Last activity: Jan 23, 2025, 01:23 PM
2
votes
1
answers
516
views
Parted Error: The location XXMB is outside of the device /dev/xxx
I'm trying to manually create a distro on my SD card, starting with creating partitions and it's failing... ``` $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 1 119.4G 0 disk vda 254:0 0 12G 0 disk ├─vda1 254:1 0 300M 0 part /boot └─vda2 254:2 0 11.7G 0 part / $ sudo dd if=/dev/zero of=/de...
I'm trying to manually create a distro on my SD card, starting with creating partitions and it's failing...
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 119.4G 0 disk
vda 254:0 0 12G 0 disk
├─vda1 254:1 0 300M 0 part /boot
└─vda2 254:2 0 11.7G 0 part /
$ sudo dd if=/dev/zero of=/dev/sda bs=1M count=32
32+0 records in
32+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.0289816 s, 1.2 GB/s
$ sudo parted -s /dev/sda mklabel gpt
$ sudo parted -s /dev/sda mkpart fat32 32MB 512MB
Error: The location 512MB is outside of the device /dev/sda.
What could be the potential cause for this?
$ sudo parted /dev/sda unit mib print free
Model: (file)
Disk /dev/sda: 32.0MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
0.02MiB 32.0MiB 32.0MiB Free Space
And for whatever reason, there now is a sda1 partition appearing when entering lsblk
.
I think it happens as soon as the label is being created.
$ lsblk
...
sda 8:0 1 119.4G 0 disk
└─sda1 8:1 1 119.4G 0 part
...
[edit]
Perhaps I should have mentioned that I was doing all this in a VM.
For whatever reason fdisk in the VM would find a ghost partition the moment I add a label.
It should have been deleted, but there it is.
I was able to delete the partition by disabling the SD card from the VM, reinsert it and start gdisk on my host.
Unfortunately, the issue remains, now without the ghost partitions.
Folaht
(1156 rep)
Dec 30, 2024, 04:12 PM
• Last activity: Jan 4, 2025, 12:01 PM
39
votes
5
answers
175668
views
Remove GPT - Default back to MBR
I keep receiving this error: > Warning!! Unsupported GPT (GUID Partition Table) detected. Use GNU Parted I want to go back to the normal MBR. I found some advice [here](http://lukas.zapletalovi.com/2011/12/how-to-get-rid-of-guid-partition-table.html) and did: parted /dev/sda mklabel msdos quit But w...
I keep receiving this error:
> Warning!! Unsupported GPT (GUID Partition Table) detected. Use GNU Parted
I want to go back to the normal MBR. I found some advice [here](http://lukas.zapletalovi.com/2011/12/how-to-get-rid-of-guid-partition-table.html) and did:
parted /dev/sda
mklabel msdos
quit
But when I get to the
mklabel
option it spits out a warning that I will lose all data on /dev/sda
. Is there a way to get the normal MBR back without formatting the disk?
sayth
(579 rep)
Jan 13, 2013, 02:18 PM
• Last activity: Jan 3, 2025, 11:54 AM
0
votes
1
answers
186
views
Extending Logical Volume Size Beyond 2TB in CentOS 7
I need to extend the size of the logical volumes in a CentOS 7 system and noticed that the current partition table cannot handle the updated disk size, which is around 5TB: Disk /dev/sda: 5497.6 GB, 5497558138880 bytes, 10737418240 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/...
I need to extend the size of the logical volumes in a CentOS 7 system and noticed that the current partition table cannot handle the updated disk size, which is around 5TB:
Disk /dev/sda: 5497.6 GB, 5497558138880 bytes, 10737418240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000bc7c4
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 2147483647 1072692224 8e Linux LVM
I know that I have to use parted along with GPT but couldn't find a guideline on how to first change the partition table and then expand the volumes accordingly.
Could you please help me with this?
yildizabdullah
(323 rep)
Nov 9, 2024, 08:52 PM
• Last activity: Nov 26, 2024, 12:07 PM
0
votes
1
answers
69
views
Created a partition in the front of HDD with parted while it was mounted. What do I do so that my system doesn't crash on reboot?
I ran this command on /dev/sda1 when I meant to do something similar to /dev/sda2. /dev/sda1 was mounted at this time. ``` sudo parted -a opt /dev/sda mkpart primary ext4 0% 100% Warning: You requested a partition from 0.00B to 1000GB (sectors 0..1953525167). The closest location we can manage is 17...
I ran this command on /dev/sda1 when I meant to do something similar to /dev/sda2. /dev/sda1 was mounted at this time.
sudo parted -a opt /dev/sda mkpart primary ext4 0% 100%
Warning: You requested a partition from 0.00B to 1000GB (sectors 0..1953525167).
The closest location we can manage is 17.4kB to 1048kB (sectors 34..2047).
Is this still acceptable to you?
Yes/No? yes
Warning: The resulting partition is not properly aligned for best performance: 34s % 2048s != 0s
Ignore/Cancel? Ignore
Information: You may need to update /etc/fstab.
The output of print is:
(parted) print
Model: ATA ST1000LM035-1RK1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
6 17.4kB 1049kB 1031kB primary
1 1049kB 300MB 299MB fat32 boot, esp
2 300MB 4347MB 4048MB linux-swap(v1) swap
4 4347MB 124GB 120GB ext4
3 124GB 724GB 600GB ext4
5 724GB 1000GB 276GB ext4
The output of fdisk -l /dev/sda is:
/dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM035-1RK1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 86AB55F1-52A1-4F8C-ACE9-1A7B4C4E9082
Device Start End Sectors Size Type
/dev/sda1 2048 585727 583680 285M EFI System
/dev/sda2 585728 8491007 7905280 3.8G Linux swap
/dev/sda3 242864128 1414739967 1171875840 558.8G Linux filesystem
/dev/sda4 8491008 242864127 234373120 111.8G Linux filesystem
/dev/sda5 1414739968 1953523711 538783744 256.9G Linux filesystem
/dev/sda6 34 2047 2014 1007K Linux filesystem
Partition 6 does not start on physical sector boundary.
Partition table entries are not in disk order.
This is the drive that contains my OS and everything. What do I do so that my reboot doesn't fail. Too afraid to turn off the machine right now.
Arcadio
(81 rep)
Aug 7, 2024, 01:51 PM
• Last activity: Aug 7, 2024, 10:07 PM
-2
votes
1
answers
84
views
Linux + how to increase partitions based on disk size
we have some red-hat servers with the following details ( when OS disk size is 230G ) # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 230G 0 disk ├─sda1 8:1 0 1G 0 part /boot/efi ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 228G 0 part ├─VG100-lv_root 253:0 0 20G 0 lvm / ├─VG100-lv_swap 253:1...
we have some red-hat servers with the following details ( when OS disk size is 230G )
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 230G 0 disk
├─sda1 8:1 0 1G 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 228G 0 part
├─VG100-lv_root 253:0 0 20G 0 lvm /
├─VG100-lv_swap 253:1 0 16G 0 lvm [SWAP]
└─VG100-lv_var 253:2 0 30G 0 lvm /var
fdisk -l
Disk /dev/sda: 193.3 GB, 193273528320 bytes, 377487360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 209715199 104857599+ ee GPT
the Goal is to increase the /var and root filesystem based on that disk size is 230G
when current /var is 30G and root filesystem is 20G
so, we start with the following procedure that should gives us enough PFREE or enough “Physical Free” space.
parted /dev/sda resizepart 3 100%
Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)?
parted: invalid token: 3
Fix/Ignore/Cancel?
sgdisk -e /dev/sda
note - sgdisk: The simplest way to fix the backup GPT table is by using the sgdisk command with the -e option, which moves the backup GPT data structures to the end of the disk
parted /dev/sda resizepart 3 100%
Information: You may need to update /etc/fstab.
partprobe /dev/sda
pvresize /dev/sda
Failed to find physical volume "/dev/sda".
0 physical volume(s) resized or updated / 0 physical volume(s) not resized
but from pvs
Pfree
is still 0
where we are wrong here ?
# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 VG100 lvm2 a-- 66.00g 0
yael
(13936 rep)
Aug 5, 2024, 05:02 PM
• Last activity: Aug 5, 2024, 05:47 PM
2
votes
1
answers
1553
views
How to use parted in script mode?
I'm trying to troubleshoot a script that used to work in some scenarios before. If I substitute script variables, what I'm trying to run is: ``` parted -s /dev/sdb unit MiB resizepart 1 307199 ``` This produces: ``` Warning: Partition /dev/sdb1 is being used. Are you sure you want to continue? ``` B...
I'm trying to troubleshoot a script that used to work in some scenarios before. If I substitute script variables, what I'm trying to run is:
parted -s /dev/sdb unit MiB resizepart 1 307199
This produces:
Warning: Partition /dev/sdb1 is being used. Are you sure you want to continue?
But after this there is the OS prompt with no changes to feed an answer to parted. More over, if I run it without -s
:
parted /dev/sdb unit MiB resizepart 1 307199
I'm getting this:
Warning: Partition /dev/sdb1 is being used. Are you sure you want to continue?
Yes/No? Yes
End? [102399MiB]?
I'm not sure why am I being asked about End, if it was already provided on the command line above, can you explain?
Here is some more diagnostic commands:
# parted -v
parted (GNU parted) 3.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by .
# parted /dev/sdb unit MiB print
Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 307200MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1.00MiB 102399MiB 102398MiB ext4 primary
The end goal is to be able to continue using this in a script, that is without human input at the runtime.
**Edit to comment on a possible dupe**
It is unlikely that this is the same issue, because my script worked perfectly until I changed linux distro from Ubuntu 20 to Ubuntu 22 and thus parted version. Since the referenced question is from 2015 I cannot see how it can be related, since my problem is much more recent. I did not want to unnecessarily complicate the question by providing that bit of info it was already long enough.
Andrew Savinykh
(453 rep)
Oct 2, 2022, 11:21 PM
• Last activity: Jul 24, 2024, 12:25 AM
3
votes
1
answers
197
views
Parted in scripted mode can increase but not decrease partition size
I am trying to use parted in scripted mode to resize a partition. When I use the command to increase the partition size it works but when I use the same command but simply change the sector size to reduce the partition size it does not work. If however I enter those details in interactive mode every...
I am trying to use parted in scripted mode to resize a partition.
When I use the command to increase the partition size it works but when I use the same command but simply change the sector size to reduce the partition size it does not work.
If however I enter those details in interactive mode everything works fine whether increasing or decreasing the size of the partition.
I test with a .img file with one partition containing a btrfs file system. I loop mount the .img file to /dev/loop and partition 1 is at /dev/loop0p1. Partition 1 has an end sector at 48878656.
In the tests that follow I never try to increase the size of the partition beyond the maximum space available on the .img "disk" or below the size of the file system the partition contains.
Here I use parted in script mode to give information about the partition:
[flex@thinkpad ncp-pi]$ sudo parted -s -a opt /dev/loop0 "unit s print"
Model: Loopback device (loopback)
Disk /dev/loop0: 120933888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 48878656s 48876609s btrfs
I use parted in scripted mode to INCREASE the size of the partition by increasing the position of the end sector from sector 48878656 to sector 49078656 and this works as expected:
[flex@thinkpad ncp-pi]$ sudo parted -s -a opt /dev/loop0 "unit s print resizepart 1 49078656 print"
Model: Loopback device (loopback)
Disk /dev/loop0: 120933888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 48878656s 48876609s btrfs
Model: Loopback device (loopback)
Disk /dev/loop0: 120933888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 49078656s 49076609s btrfs
Now using the same command I try to reduce the size of the partition by reducing the position of the end sector from sector 49078656 back to sector 48878656 however this does not work, the script wants me to answer 'Yes/No' even though I am in scripted mode?
[flex@thinkpad ncp-pi]$ sudo parted -s -a opt /dev/loop0 "unit s print resizepart 1 48878656 print"
Model: Loopback device (loopback)
Disk /dev/loop0: 120933888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 49078656s 49076609s btrfs
Warning: Shrinking a partition can cause data loss, are you sure you want to continue?
[flex@thinkpad ncp-pi]$
I check the partition size again and nothing has changed, so that last command did not complete:
[flex@thinkpad ncp-pi]$ sudo parted -s -a opt /dev/loop0 "unit s print"
Model: Loopback device (loopback)
Disk /dev/loop0: 120933888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 49078656s 49076609s btrfs
If instead I enter those details in interactive mode everything works fine.
There are some other questions on stackoverflow and other sites about parted in scripted mode. Functionality differs a little across distros and there may be a bug in it.
Other questions about parted in scripted mode:
- How to use parted in script mode?
- GNU parted resizepart in script
- no way to use resizepart non-interactively on busy partition (Bug Report)
None of these sites have answered my question. How come my command to use parted in scripted mode can increase the size of the partition but not decrease it? How can I debug or find out what's going wrong?
FlexMcMurphy
(433 rep)
Jun 24, 2024, 08:46 PM
• Last activity: Jul 21, 2024, 10:37 PM
7
votes
3
answers
40223
views
parted can't have overlapping partitions
for debug purposes i need to extend my disk to all unallocated space, for example my full disk size is 931.5GB and i have the following partitions NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 107.5G 0 part / └─sda3 8:3 0 3.8G 0 part...
for debug purposes i need to extend my disk to all unallocated space, for example
my full disk size is 931.5GB and i have the following partitions
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 107.5G 0 part /
└─sda3 8:3 0 3.8G 0 part [SWAP]
so my /dev/sda2 partiton is less than 931.5GB and i need to increase this partition with parted command to have more espace
unallocated space is : 819.72GB (see with gparted)
parted /dev/sda resizepart 2 500GB
but this command returns the following error :
Can't have overlapping partitions
i am doing all this with a live usb in order to do not have mounted /dev/sda, the curious thing is that parted allow me to shrink the partition, i mean this
parted /dev/sda resizepart 2 50GB
one more thing, if i can get the solution to this problem i would like to use the option -s in order to automate this process with some bash scripts
This is the output for fdisk -l command
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C680462D-DE3F-4A97-B2A2-50226E7F9668
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 226453503 225402880 107.5G Linux filesystem
/dev/sda3 226453504 234440703 7987200 3.8G Linux swap
Thanks
Humberto Perez
(73 rep)
Sep 15, 2016, 06:34 PM
• Last activity: Jul 1, 2024, 01:33 PM
0
votes
1
answers
181
views
What is Recursive partition on /dev/sda
The disk I’m trying to recover the file system from, gives the error `invalid partition table - recursive partition on /dev/sda`. Is there a way to fix this particular problem? I’m using `parted` to recover the files.
The disk I’m trying to recover the file system from, gives the error
invalid partition table - recursive partition on /dev/sda
. Is there a way to fix this particular problem? I’m using parted
to recover the files.
RWS
(3 rep)
Jun 19, 2024, 08:59 AM
• Last activity: Jun 20, 2024, 08:09 AM
0
votes
1
answers
984
views
Which partition should be bootable, and why?
Using Debian 12.5 Bookworm, 64bit I wanted to teach myself how to partition my disks for my needs, so I did this: ——————————————————————————————| [!!] Partition Disks |—————————————————————————————— This is an overview of your currently configured partitions and mount points. Select a partition to m...
Using Debian 12.5 Bookworm, 64bit
I wanted to teach myself how to partition my disks for my needs, so I did this:
——————————————————————————————| [!!] Partition Disks |——————————————————————————————
This is an overview of your currently configured partitions and mount points.
Select a partition to modify its settings (file system, mount point, etc.),
a free space to create partitions, or a device to initialize its partition table.
Guided Partitioning
Configure software RAID
Configure the Logical Volume Manager
Configure encrypted volumes
Configure iSCSI volumes
LVM VG deblvm-vg-home, LV deblvm-lv-home - 14.7 GB Linux device-mapper (linear)
#1 14.7 GB f ext4 /home
LVM VG deblvm-vg-usr, LV deblvm-lv-usr - 14.9 GB Linux device-mapper (linear)
#1 14.9 GB f ext4 /usr
LVM VG deblvm-vg-var, LV deblvm-lv-var - 14.9 GB Linux device-mapper (linear)
1# 14.9 GB f ext4 /var
Virtual disk 1 (vda) - 107.4 GB Virtio Block Device
1# primary 1.1 GB B F ext2 /boot
2# primary 53.2 GB F ext4 /
5# logical 8.6 GB F swap
6# logical 14.7 GB K lvm
7# logical 14.9 GB K lvm
8# logical 14.9 GB K lvm
In some places I saw that I need to make at least one partition bootable to make the system work. that's what I've learned:
* If you use BIOS, then you need to flag
/boot
as bootable.
* If you use UEFI, then you need to flag /
as bootable, or /boot/efi
.
* You must install grub to the bootable partition (e.g. vda1
and not just vda
)
So my questions are:
Is this correct? Am I doing things wrong? Where can I learn about which partition should be bootable and which shouldn't, and why?
Thank you
NewbieDeveloper
(11 rep)
May 6, 2024, 11:47 AM
• Last activity: May 6, 2024, 12:00 PM
0
votes
0
answers
98
views
RHEL 7.2 + is it possible to resize partition sda2 when parted not support resizepart
we have old RHEL machines with version 7.2 ( RHEL 7.2 ) this machines has old parted version that not support resizepart so for example we `can't` use this syntax in order to resize sda partiton parted /dev/sda resizepart 2 100% what are the other safety alternatives to resize `sda2` regarding our c...
we have old RHEL machines with version 7.2 ( RHEL 7.2 )
this machines has old parted version that not support resizepart
so for example we
can't
use this syntax in order to resize sda partiton
parted /dev/sda resizepart 2 100%
what are the other safety alternatives to resize sda2
regarding our case ?
- its important to say that we cant umount or reboot during resize process
example ( we can see that parted version 3.1-23 not include the resizepart
)
parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) resizepart 2 100%
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Par
yael
(13936 rep)
May 1, 2024, 12:11 PM
0
votes
1
answers
364
views
How to expand FAT32 SD Card Image
Given sd_card.img that is 512000000 bytes (i.e. 488MB): $ `file sd_card.img` >sd_card.img: DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x0,1,1), end-CHS (0xdf,15,54), startsector 63, 999873 sectors, extended partition table (last) `fdisk` shows: ``` Selected partition 1 Device: sd_card.img...
Given sd_card.img that is 512000000 bytes (i.e. 488MB):
$
file sd_card.img
>sd_card.img: DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x0,1,1), end-CHS (0xdf,15,54), startsector 63, 999873 sectors, extended partition table (last)
fdisk
shows:
Selected partition 1
Device: sd_card.img1
Start: 63
End: 999935
Sectors: 999873
Cylinders: 1158
Size: 488.2M
Id: c
Type: W95 FAT32 (LBA)
Start-C/H/S: 0/1/1
End-C/H/S: 223/15/54
I attempted to resize it with the following commands.
$ cp sd_card.img test.img
$ dd if=/dev/zero of=test_zeros bs=1 count=1 seek=2G
$ cat test_zeros >> test.img
$ sudo parted test.img resizepart 1 2.5GB
$ file test.img
>test.img: DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x0,1,1), end-CHS (0x12f,239,61), startsector 63, 4882750 sectors
fdisk
shows:
Selected partition 1
Device: test.img1
Start: 63
End: 4882812
Sectors: 4882750
Cylinders: 334
Size: 2.3G
Id: c
Type: W95 FAT32 (LBA)
Start-C/H/S: 0/1/1
End-C/H/S: 303/239/61
Then I write the image to the 32GB SD card:
dd if=test.img of=/dev/mmcblk0 conv=fsync status=progress
When the SD card is mounted...
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 29.7G 0 disk
`-mmcblk0p1 179:1 0 2.3G 0 part /run/media/mmcblk0p1
This looks promising, but df -h
is not so much. This is what it shows with the original sd_card.img written to the SD card and after this modification:
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p1 485M 159M 326M 33% /run/media/mmcblk0p1
Since lsblk
displays block device size and df
displays filesystem size, it suggests something is wrong with the partition.
Unfortunately, easier methods do not work well with FAT32 partitions, which I am limited to. After installing necessary libraries, I tried sudo gparted sd_card.img
but it did not work, various operations instead showing **sd_card.img1** and stating the file did not exist.
Any suggestions on what the issue in my procedure might be or otherwise how to do this properly?
Note: GNU Parted 3.4
# Update
Following @eyoung100's suggestion, I wrote my original sd_card.img to the SD card and then used the command line tool parted
, which is installed with GParted, in an attempt to expand the free space.
sudo parted
select /dev/mmcblk0
print free
Number Start End Size Type File system Flags
1 32.3kB 512MB 512MB primary fat32 lba
512MB 31.9GB 31.4GB Free Space
resizepart 1 100%
print free
Number Start End Size Type File system Flags
1 32.3kB 31.9GB 31.9GB primary fat32 lba
quit
Because GParted does not do anything until it is told to Apply changes, I wonder about quitting without saving anything, but when I boot from the SD card the changes are displayed so I think parted
is more of a "gloves off" version where you really need to know what you are doing.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p1 485M 172M 313M 36% /run/media/mmcblk0p1
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 29.7G 0 disk
`-mmcblk0p1 179:1 0 29.7G 0 part /run/media/mmcblk0p1
So as previously mentioned, the changes I make in parted
are actualized, but they are not found in usable space or the output of df -h
. The actual size of the FAT32 partition remains ~488MB.
# fdisk -x /dev/mmcblk0
Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe847ab93
Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
/dev/mmcblk0p1 63 62333951 62333889 c W95 FAT32 (LBA) 0/1/1 1023/254/63
When this sd_card.img is inserted into another device to boot of off, it gets mounted by that device. I am not sure how yet, but I see this>
# cat /run/systemd/transient/run-media-mmcblk0p1.mount
# This is a transient unit file, created programmatically via the systemd API. Do not edit.
[Unit]
After=dev-mmcblk0p1.device
BindsTo=dev-mmcblk0p1.device
[Mount]
What=/dev/mmcblk0p1
Options=umask=007,gid=6
[Unit]
Requires=systemd-fsck@dev-mmcblk0p1.service
After=systemd-fsck@dev-mmcblk0p1.service
fm_user8
(111 rep)
Jan 24, 2024, 02:31 PM
• Last activity: Jan 26, 2024, 10:13 PM
2
votes
1
answers
7069
views
Resize partition using parted
I want to resize a partition on a 8002GB disk /dev/sdb1 using parted. > Start 1000MB | End 4000MB | Size 3000MB | File system NTFS (and so on) Current version of parted has replaced resize with resizepart. I was able to use resizepart to change end to 100% i.e 8002GB but I can't seem to change the s...
I want to resize a partition on a 8002GB disk /dev/sdb1 using parted.
> Start 1000MB | End 4000MB | Size 3000MB | File system NTFS (and so on) Current version of parted has replaced resize with resizepart.
I was able to use resizepart to change end to 100% i.e 8002GB but I can't seem to change the start from 1000MB to 1MB. How can I change this partition to start from 1MB?
> Start 1000MB | End 4000MB | Size 3000MB | File system NTFS (and so on) Current version of parted has replaced resize with resizepart.
I was able to use resizepart to change end to 100% i.e 8002GB but I can't seem to change the start from 1000MB to 1MB. How can I change this partition to start from 1MB?
Umer
(21 rep)
Aug 17, 2018, 07:12 AM
• Last activity: Jan 17, 2024, 03:22 AM
Showing page 1 of 20 total questions