Score:0

How can I extend xfs /boot partition with free disk space (centos 7)

in flag

I have just over 4GB of space free (/dev/loop0) and have added a second disk /dev/sdb how can I use either of these to extend /boot partition using all of it?

df -h

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         24G     0   24G   0% /dev
tmpfs            24G  4.0K   24G   1% /dev/shm
tmpfs            24G   33M   24G   1% /run
tmpfs            24G     0   24G   0% /sys/fs/cgroup
/dev/sda2       414G  115G  278G  30% /
/dev/sda1       227M  179M   33M  85% /boot
/dev/loop0      3.9G   31M  3.6G   1% /tmp
tmpfs           4.8G     0  4.8G   0% /run/user/0

fdisk -l

Disk /dev/sda: 488.6 GB, 488552529920 bytes, 954204160 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: 0x0009d882

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      489471      243712   83  Linux
/dev/sda2          489472   881219583   440365056   83  Linux
/dev/sda3       881219584   943718399    31249408   82  Linux swap / Solaris

Disk /dev/loop0: 4294 MB, 4294967296 bytes, 8388608 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 /dev/sdb: 5368 MB, 5368709120 bytes, 10485760 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

losetup -a

/dev/loop0: [2050]:24122515 (/usr/tmpDSK)

/etc/fstab

UUID=b551a04e-f1e6-40f0-850e-470bcdf58a23       /       ext4    usrjquota=quota.user,jqfmt=vfsv1        1       1
UUID=2a14690d-e9d7-4d67-9e97-e7aab5d36a8f /boot                   ext4    defaults        1 2
UUID=5ca0c34b-1ca2-4e38-9720-61995cc88c42 swap                    swap    defaults        0 0
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0
vidarlo avatar
ar flag
Loop devices is not physical storage; it's a image file stored inside another file system. You generally can't use that to extend a partition. In your case you *could* possibly shrink `/dev/sda2` and increase `/dev/sda1` in size.
Michael Hampton avatar
cz flag
In theory, sure. In reality [he cannot and must reinstall](https://serverfault.com/q/1067893/126632).
Harmonytalk avatar
in flag
Updated and added second disk /dev/sdb
vidarlo avatar
ar flag
@MichaelHampton Ah! XFS of course :)
djdomi avatar
za flag
I would suggest that you just mount sdb as /boot if you like to use it completely, remind to copy it before
Harmonytalk avatar
in flag
@djdomi How would I go about doing that?
djdomi avatar
za flag
The question is what filesystem you use and second this question looks like private instead of the business related
Harmonytalk avatar
in flag
Added fstab not sure what you mean by private/business? server is personal use
Michael Hampton avatar
cz flag
This is usually very basic stuff, but since you are using cPanel/WHM all bets are off and we really cannot support you. Your best bet is to get a completely new VPS, _installed correctly_ with at least a 1GB `/boot` (or none at all; VPSes do not normally require a `/boot` partition at all) and migrate all your web sites to it. You can get help with the migration process from cPanel support if necessary.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.