sburnay |
05-02-2013 05:04 AM |
Managing Disks and Partitions
Hi,
I have an Ubuntu.12.04 64bit server VM which I have created with a single 60GB Virtual Disk:
Code:
root@myServer:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/argus-root 58G 2.9G 52G 6% /
udev 992M 4.0K 992M 1% /dev
tmpfs 401M 340K 400M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1001M 0 1001M 0% /run/shm
/dev/sda1 228M 25M 192M 12% /boot
I have no experience in managing partitions nor manipulating fileSystems, still, I added this VM two disks: - one for logs - 7GB, where I'd like to point /var/log/
- and other for the MySQL databases - 20GB, where I'd like to point /var/lib/mysql
I have added those disks using the VMware Player's GUI and they are correctly associated with my ubuntu VM.
I just didn't understand - why are the disks not listed with the df command,
- nor how to make them be recognized
- and more importantly, how will I map the mentioned parts of my actual FileSystem to these new disks
I began following some instructions and found those two drives were '/dev/sdb' and '/dev/sdc', both with:
Code:
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
For each drive I've done: - mkfs.ext4 /dev/sdb
- chmod -R 777 <mounting point>
- mount /dev/sdb <mounting point>
And afterwords I've edited /etc/fstab and added an entry for each drive:
Code:
root@argus:~# cat /etc/fstab
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/argus-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=0daeb714-1f37-46db-9ab2-a469cfb36e5d /boot ext2 defaults 0 2
/dev/mapper/argus-swap_1 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/sdb /var/lib/mysql ext4 defaults 0 0
/dev/sdc /var/log ext4 defaults 0 0
How do I make sure my changes were successfully implemented? Do I have to copy a large file to one of the mountingpoints and check if the refpective assigned drive's ocupation is increasing?
Thank you very much
|