I wish it was as easy as VirtualBox: extend partition But its not.
You see in Citrix Xen center Instead of adding a virtual harddisk I just shut the server off and made its vhd* bigger, and that results in more space on a partition I cant seem to use.
fdisk -l gives this.
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 43 340992 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2 43 5222 41598977 5 Extended
/dev/xvda5 43 1137 8787968 83 Linux
/dev/xvda6 1137 1502 2928640 83 Linux
/dev/xvda7 1502 1625 989184 82 Linux swap / Solaris
/dev/xvda8 1625 1674 389120 83 Linux
/dev/xvda9 1674 5222 28499968 83 Linux
xvda2 is the culprit, see how big it is. I want to mount this somewhere to have space for backups. I have tried mkfs, fdisk /dev/xvda2 and it seems that this partition is just wrong.
fdisk /dev/xvda2
Unable to read /dev/xvda2
I have tried mkfs defaults to ext2 of fstype
mkfs /dev/xvda2 41598900
mke2fs 1.41.12 (17-May-2010)
mkfs.ext2: Filesystem larger than apparent device size.
Proceed anyway? (y,n) y
Warning: could not erase sector 2: Attempt to write block from filesystem resulted in short write
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2599968 inodes, 10399725 blocks
519986 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
318 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
mkfs.ext2: Invalid argument while zeroing block 10399696 at end of filesystem
Writing inode tables: 0/318
Could not write 5 blocks in inode table starting at 1027: Invalid argument
I can't mount it.
mount -t ext2 /dev/xvda2 /mnt/extra/
mount: wrong fs type, bad option, bad superblock on /dev/xvda2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I have googled and googled and googled, but I haven't come up with something that works in this case being that I added to the vhd from citrix xen center.