0

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
  • 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. – vidarlo Jun 26 '21 at 21:08
  • In theory, sure. In reality [he cannot and must reinstall](https://serverfault.com/q/1067893/126632). – Michael Hampton Jun 26 '21 at 21:41
  • Updated and added second disk /dev/sdb – Harmonytalk Jun 27 '21 at 07:03
  • @MichaelHampton Ah! XFS of course :) – vidarlo Jun 27 '21 at 08:23
  • I would suggest that you just mount sdb as /boot if you like to use it completely, remind to copy it before – djdomi Jun 27 '21 at 16:38
  • @djdomi How would I go about doing that? – Harmonytalk Jun 27 '21 at 16:56
  • The question is what filesystem you use and second this question looks like private instead of the business related – djdomi Jun 27 '21 at 17:00
  • Added fstab not sure what you mean by private/business? server is personal use – Harmonytalk Jun 27 '21 at 17:09
  • 2
    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. – Michael Hampton Jun 27 '21 at 17:16

0 Answers0