How to create a secondary partition?
my current stats (from linode manager):
Storage Stats
32768 MB
Allocated
8192 MB
Free
40960 MB
Total
How should I perform this operation? I know how to mount it, etc, but I'm not so sure if I have to use fdisk in this case or what because I'm getting 'doesn't contain a valid partition table':
Disk /dev/xvdb: 272 MB, 272629760 bytes
255 heads, 63 sectors/track, 33 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb doesn't contain a valid partition table
TIA!
8 Replies
Can I safely resize my active disk image (running CentOS) to a smaller number?, of course not lower than the free space I have inside the VM/partition; If yes, do I have to previously shutdown the VM?
What I'm trying to achieve is to append the current free space available (8192MB) to this other one (after the resizing) in order to create a new bigger disk image/secondary partion of around 15GB.
TIA
So you want two disk images with some free space taken from the primary image? If so shutdown your node, resize the existing disk, then create a new disk, update your configuration profile and boot.
Thanks!
@Guspaz:
What you want to do is create a new disk image through the linode manager, and then edit your configuration profile to assign the disk image to a device (probably xvdc, unless you have no swap). Then modify your fstab to mount the new image.
Wish I found this nugget 2-3 hours ago
If you're wondering how to "modify fstab" check this link -
So edit fstab, reboot, run "fdisk -l" and hooray,
Disk /dev/xvdc: 16.7 GB, 16743661568 bytes
255 heads, 63 sectors/track, 2035 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdc doesn't contain a valid partition table
This was covered above, but it's worth mentioning for the future scroll-to-the-bottom crowd: /dev/xvd* do not have partition tables, for the same reason that /dev/sda1 wouldn't have a partition table. Keep fdisk very far away.