LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mounting disks in centos 5.3, redirecting folders to other drives (https://www.linuxquestions.org/questions/linux-server-73/mounting-disks-in-centos-5-3-redirecting-folders-to-other-drives-734065/)

whiskey06 06-18-2009 11:15 PM

Mounting disks in centos 5.3, redirecting folders to other drives
 
Hi there, centos 5,3 x64 running on ESX.

fdisk output:
Code:

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

how I am mounting stuff:
Code:

echo -ne "n\np\n1\n\n\nw\n" | fdisk /dev/sdb
 mkfs.ext3 /dev/sdb
mkdir /media/tmp
echo "/dev/sdb  /media/tmp  ext3  defaults 0 0" >> /etc/fstab
mount -a

but then when I do an fdisk -l I get this:
Code:

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

This occurs even on a reboot.

Once I get that (and other) partitions mounted I would like to point /tmp at one, /home at another and /var/log at the third.
How would I do this?

Thanks!

billymayday 06-19-2009 12:10 AM

Well you aren't trying to mount a partition (that would be something like /dev/sda1). Have you partitioned and formatted the drive? Note that you format partitions, not devices, even if you only put one partition on it.

Look into using fdisk to partition it, them try mkfs on the partition or partitions you made.


All times are GMT -5. The time now is 03:52 PM.