Difference between revisions of "Growpart"
Jump to navigation
Jump to search
(Created page with "``` lsblk df -h sudo growpart /dev/sdc 1 sudo resize2fs /dev/sdc1 lsblk df -h ```") |
|||
Line 9: | Line 9: | ||
lsblk | lsblk | ||
df -h | df -h | ||
+ | ``` | ||
+ | |||
+ | |||
+ | ## Maybe works | ||
+ | |||
+ | Increase disk then | ||
+ | ``` | ||
+ | echo 1 > /sys/block/sdc/device/rescan | ||
+ | parted -s -a opt /dev/sdc "resizepart 1 100%" | ||
+ | sudo growpart /dev/sdc 1 | ||
+ | sudo resize2fs /dev/sdc1 | ||
+ | ``` | ||
+ | |||
+ | https://serverfault.com/questions/870594/resize-partition-to-maximum-using-parted-in-non-interactive-mode | ||
+ | |||
+ | ``` | ||
+ | parted --script /device \ | ||
+ | mklabel gpt \ | ||
+ | mkpart primary 1MiB 100MiB \ | ||
+ | mkpart primary 100MiB 200MiB \ | ||
``` | ``` |
Revision as of 20:59, 14 September 2022
lsblk df -h sudo growpart /dev/sdc 1 sudo resize2fs /dev/sdc1 lsblk df -h
Maybe works
Increase disk then
echo 1 > /sys/block/sdc/device/rescan parted -s -a opt /dev/sdc "resizepart 1 100%" sudo growpart /dev/sdc 1 sudo resize2fs /dev/sdc1
parted --script /device \ mklabel gpt \ mkpart primary 1MiB 100MiB \ mkpart primary 100MiB 200MiB \