BLOG

Debian filesystem expand

Zvydenie kapaciy disku debian (ext4)

Info disku:

# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  642M  6.8G   9% /

Disk bol rozsireny na 20GB:

# fdisk -l

Disk /dev/xvda: 20 GiB, 21474836480 bytes, 41943040 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: 0xd7f2e0e8

Device     Boot Start      End  Sectors Size Id Type
/dev/xvda1 *     4096 16773119 16769024   8G 83 Linux

Dsik je pozuivany ako root nieje ho mozne odpojit:

# umount /
umount: /: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

Zmazanie a vytvorenie novej particie:

# fdisk /dev/xvda

Welcome to fdisk (util-linux 2.25.2).                                                                                                                                                           
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/xvda: 20 GiB, 21474836480 bytes, 41943040 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: 0xd7f2e0e8

Device     Boot Start      End  Sectors Size Id Type
/dev/xvda1 *     4096 16773119 16769024   8G 83 Linux

Zmazanie:

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Vytvorenie:

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 4096
Last sector, +sectors or +size{K,M,G,T,P} (4096-41943039, default 41943039): 

Created a new partition 1 of type 'Linux' and of size 20 GiB.
Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): p
Disk /dev/xvda: 20 GiB, 21474836480 bytes, 41943040 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: 0xd7f2e0e8

Device     Boot Start      End  Sectors Size Id Type
/dev/xvda1 *     4096 41943039 41938944  20G 83 Linux
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

Vynutenie FSCK po reboote:

nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet fsck.mode=force"

Update grub

update-grub

Rozsirenie particie:

resize2fs /dev/xvda1
   Send article as PDF   
29. mája 2020 Linux
Žiadne komentáre

Mariadb 10.4 engine connect (federated table)

C9800 EEM TCL script

Pridaj komentár Zrušiť odpoveď

6  +  3  =  

Najnovšie články

  • MSSQL to ELK 28. marca 2023
  • ELK 8 stack no security 28. marca 2023
  • Cisco router PortForward 10. decembra 2022
  • Suricata rule list 31. októbra 2022
  • cisco 3850 upgrade ios 27. októbra 2022
  • mariadb galera cluster repair 19. augusta 2022
  • Generate HTTPS for vmware automation 8. júla 2022

Najnovšie komentáre

  • Róbert Čečetka komentoval Zobrazenie všetkých stĺpcov z MYSQL cez PHP a html

Archív

  • marec 2023
  • december 2022
  • október 2022
  • august 2022
  • júl 2022
  • máj 2022
  • apríl 2022
  • marec 2022
  • október 2021
  • september 2021
  • august 2021
  • jún 2021
  • máj 2021
  • apríl 2021
  • marec 2021
  • február 2021
  • január 2021
  • december 2020
  • november 2020
  • október 2020
  • september 2020
  • august 2020
  • júl 2020
  • jún 2020
  • máj 2020
  • apríl 2020
  • marec 2020
  • február 2020
  • január 2020
  • december 2019

Kategórie

  • Active Directory (3)
  • Ansible (1)
  • apereo (3)
  • BIaKS (2)
  • checkpoint (4)
  • CISCO (39)
  • docker (4)
  • emby (2)
  • freeradius (7)
  • Lenovo-IBM (1)
  • Linux (78)
  • Mikrotik (2)
  • monitoring (34)
  • Nezaradené (21)
  • PLESK (3)
  • Programovanie (13)
  • VEEAM (2)
  • VMware (37)
  • Windows (15)
  • Zabezpecenie (5)

Meta

  • Prihlásiť sa
  • Feed záznamov
  • RSS feed komentárov
  • WordPress.org
Hrdo poháňa WordPress | Téma: Neblue od NEThemes.