i have debian vm deployed @ bluemix, , want increase size of hard drive mounting blockstorage device.
i followed instructions on new beta blockstorage service , created volume, , attached vm new device, seems although volume attached vm; not automatically mounted.
i tryed several ways mount it, did not find correct way. in fact, tryed clone line came on fstab refering root device mounted (i suspected additional volume should similar) did not work (even broke reboot of machine)... so.. can please advice me how mount blockstorage bluemix service on vm machine ?
thks!
by attaching volume you've done equivalent of plugging raw, physical hard disk system. before can mount you'll have format filesystem known os.
after attaching device should able see raw block device, example lsblk command:
[mysys]# lsblk sr0 11:0 1 416k 0 rom vda 252:0 0 20g 0 disk --vda1 252:1 0 20g 0 part / vdb 252:16 0 25g 0 disk
typically vda root device, in example additional device vdb 25gb. can create filesystem mkfs command, example:
[mysys]# mkfs.ext4 /dev/vdb mke2fs 1.41.12 (17-may-2010) filesystem label= os type: linux block size=4096 (log=2) fragment size=4096 (log=2) stride=0 blocks, stripe width=0 blocks 1638400 inodes, 6553600 blocks ...
mkfs supports different filesystems, might want check man pages on system you're using (man mkfs).
now that's left create mount point , mount new filesystem:
[mysys]# mkdir /mnt/test [mysys]# mount /dev/vdb /mnt/test
the additional space available:
[mysys]# df -h filesystem size used avail use% mounted on /dev/vda1 20g 946m 18g 5% / tmpfs 1.9g 0 1.9g 0% /dev/shm /dev/vdb 25g 172m 24g 1% /mnt/test
Comments
Post a Comment