LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Managing Disks and Partitions (https://www.linuxquestions.org/questions/linux-general-1/managing-disks-and-partitions-4175460406/)

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:
  1. one for logs - 7GB, where I'd like to point /var/log/
  2. 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
  1. why are the disks not listed with the df command,
  2. nor how to make them be recognized
  3. 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:
  1. mkfs.ext4 /dev/sdb
  2. chmod -R 777 <mounting point>
  3. 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

pan64 05-02-2013 05:09 AM

it looks ok. You can try to reboot (restart) your VM. and you will need to see /var/log and /var/lib/mysql again. Also you can try to put some small files on them to check if it works, but I think it should be ok.

sburnay 05-02-2013 05:14 AM

Yes, it seems done.

I've sent a 700MB .iso to /var/log, and the respective entry in 'df -h' acused the extra ocupation rate from it.

I'm just not understanding howcome the uoutput of fdisk -l:
Code:

...
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table
...

Why were these drives not given an identifier and why does the system complain about the validity of partition tables?

Is it because these drives are not partitioned?

pan64 05-02-2013 05:16 AM

so you solved yourself, that is great. Just please mark thread solved.


All times are GMT -5. The time now is 07:23 PM.