Blog

Como montar disco nuevo ubuntu

Near the bottom of the output you should see where the disk is located. it will be something like:
/dev/sdb
So let’s assume it is on /dev/sdb.
If you can’t figure it out where the drive is located  with dmesg issue the command:
sudo fdisk -l
The above command will report something like:
/dev/sda1 * 1 18709 150280011 83 Linux
/dev/sda2 18710 19457 6008310 5 Extended
/dev/sda5 18710 19457 6008278+ 82 Linux swap / Solaris

But will include a listing for your new drive. If you only see listings for /dev/sda* then your new drive has not been recognized and there is a problem with the physical installation.
Once you know where your drive is located (again we’ll use /dev/sdb for our example) it’s time to create a new directory where this drive will be mounted. We are mounting our drive to the directory /data so we’ll create this directory with the following command:
sudo mkdir /data
Now let’s make it available to all users:
sudo chmod -R 777 /data
With a place to mount the drive, it’s time to format the new drive. The formatting will be done with the command:
sudo mkfs.ext3 /dev/sdb
When this is complete you are ready to mount the drive. Before you edit fstab entry (so the drive will be automatically mounted) make sure it can be successfully mounted with the command:
sudo mount /dev/sdb /data
If this is successful let’s create an entry in /etc/fstab. open that file with the command
sudo nano /etc/fstab
Now add the following entry at the end of that file:
/dev/sdb /data ext3 defaults 0 0
Once you save that file, mount the drive (without having to reboot) with the command:
sudo mount -a
To make sure the drive mounted successfully issue the command:
df
The above should include in the report:
/dev/sdb   /data
If that’s the case, success! You can run one file test by trying to write a file to the new drive with the command:
touch /data/test
If you can write that file all is well.