Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Hey I just bought a new server and it's running debian

it has 2 2tb hard drives in it, and I'm looking to mount the second one to a specific folder.

an fdisk -l gives me this

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      243202  1953514583+  ee  EFI GPT

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x197e197d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1      243200  1953503968+   7  HPFS/NTFS
debian:~#

are they both already mounted? Since it looks different than it usually does. And if the second one isn't how can I mount it to a var/www2 folder?

Thanks

share|improve this question
    
How 'different' is it? –  quanta Aug 10 '11 at 15:29

3 Answers 3

up vote 1 down vote accepted

Both questions can be answered by mount.

To look where something is mounted, just issue mount.

To mount something to something, just do mount /dev/sdb1 /var/www2.

But watch out! The /dev/sdb1 is an NTFS file system (not a "native" Linux file system)

share|improve this answer

mount or df will show you the filesystems that are mounted. fdisk is just showing that the devices are physically attached (which is of course, a good first step :))

As long as /var/www2 already exists, it should be as simple as sudo mount /dev/sdb1 /var/www2

There are a couple things that can get in the way here. If /var/www2 doesn't already exist, you have to create the directory. If it does exist, you don't want any content in there, because once you mount a filesystem at that location, the original contents won't be accessible any more.

Your filesystem is formatted as NTFS, which typically means you'll need a package for ntfs utlities (ntfs-3g on fedora, don't know about debian). If this drive is only going to be used on this box, I'd recommend formatting it w/ EXT, because using windows filesystems on linux is going to be a pain as the permissions are completely different.

Additionally, if you want this mount to happen automatically upon reboot, then you should add an entry in your /etc/fstab.

share|improve this answer

First of all, fdisk tells you nothing about whether or not your disks are mounted. Run mount to see what disks are mounted where. Permanent mounts are specified in /etc/fstab, which you should be able to figure out based on a short Google search or looking at existing entries.

Your first disk is using GPT. This is an alternative disklabel format which is the better choice for 2 TB+ disks, since MBR is only capable of handling disks up to that size. Unfortunately, fdisk is only for MBR disks. You'll need to use a GPT-enabled tool. gdisk is very similar to fdisk; apt-get install gdisk to use it. parted is also capable of handling GPT disks; you may use it instead if you prefer.

The second drive's main and only partition is formatted using NTFS. This is not the best choice for a Linux system since NTFS supports few Linux filesystem features and integrates poorly. Ideally, you should reformat it as a Linux filesystem. A common default nowadays is Ext4: run mkfs.ext4 /dev/sdb1 to reformat (after making sure the partition is unmounted).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.