How to add a second disk to Proliant MicroServer

cabous

Active Member
Joined
Jan 4, 2011
Messages
36
Reaction score
0
Location
Centurion, Gauteng
Hi all,
I'm trying to add another hard disk to my microserver so that I'll have the 250Gb standard disk and a 1TB disk. I will not be doing RAID - just want two separate disks that I can operate individually.

I have formatted my 1TB as ext4 but am now having difficulty in mounting it (trying to do so in /opt/data). I get an error saying '/dev/sdb1 is already mounted or /opt/data is busy'.

I know enough about Linux to be very dangerous :erm: - will be most grateful for any assistance.
 
Hi all,
I'm trying to add another hard disk to my microserver so that I'll have the 250Gb standard disk and a 1TB disk. I will not be doing RAID - just want two separate disks that I can operate individually.

I have formatted my 1TB as ext4 but am now having difficulty in mounting it (trying to do so in /opt/data). I get an error saying '/dev/sdb1 is already mounted or /opt/data is busy'.

I know enough about Linux to be very dangerous :erm: - will be most grateful for any assistance.

Which os?
 
Hi all,
I have formatted my 1TB as ext4 but am now having difficulty in mounting it (trying to do so in /opt/data). I get an error saying '/dev/sdb1 is already mounted or /opt/data is busy'.

If it were me, I would rather mount the partition under /mnt/blah or /media/blah and then bind-mount it to wherever it should appear, or even do a symlink (which brings another set of considerations to the table). You could also go with a directory name that does not normally occur in the typical Linux FSH like /data. (This is what I normally do with my RAID arrays for the sake of consistency.)

1. Check if the partition has not already been auto-mounted with:
Code:
df -h

2. If not, try and mount it in a directory (as root) that is unlikely to have programs already accessing it:
Code:
mkdir -p /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1

Return to step 1 to see if the partition is mounted. If that works you can add it to /etc/fstab with the necessary mount options like "noatime" or whatever.
 
Type in "mount" to get a list of mounted points and see if /dev/sdb1 is already mounted or what is mounted under /opt/data. On most Linux implementations you need to be root to mount a partition otherwise you will get some kind of error or it will look like nothing has happened.

It could be that /dev/sdb1 is not the partition you think it is. The scsi disk naming conventions is such that disk ids can be swapped around when new disks ,even USB drives, are added and then rebooted. This is why UUID's or labels are used to identity disks these days in /etc/fstab and not device names as assigned by kernel modules.

To get a list of available partitions, mounted or not, type "fdisk -l" as root - that is L in lowercase for list.


PHP Training
 
Last edited:
Which os?

If you are running a regular linux distro then google fstab. If you are using OpenElec you should use the autostart script and add mount commands in there.

I mount my network drives like this and works well:

Code:
#! /bin/sh
(sleep 20; \
mount -t cifs //192.168.1.103/Series /storage/tvshows -o username=media,password=media123
)&
(sleep 2; \
mount -t cifs //192.168.1.103/Movies /storage/videos -o username=media,password=media123
)&
(sleep 2; \
mount -t cifs //192.168.1.103/Music /storage/music -o username=media,password=media123
)&
 
Hi GrandM,
I've gone through the steps:

1. Only the std 250Gb disk is mounted
2. I get the same message telling me that the mount point is busy or that the device is busy.

This is my first time working with RAID and the first thing I learnt was that I can't just add it in the bay and try to format - I had to put it into a hdisk enclosure, partition and format ext4. I then added it back to the bay but still can't see it at all.

I want to use the microserver mainly for backups. My 1TB will have all my backup data and then I'll make sure stuff like photo's and family videos are backed up to the 250Gb as well. When I have the cash I'll buy another 1TB and then have a proper RAID 1 or 0.
 
Hi mxc,
This is the output from the fdisk -l:

Disk /dev/mapper/35000c5001620695a-part1: 1000.2 GB, 1000203091968 bytes
26 heads, 24 sectors/track, 3130643 cylinders, total 1953521664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86768889

Device Boot Start End Blocks Id System
/dev/mapper/35000c5001620695a-part1p1 2048 1953521663 976759808 83 Linux

Disk /dev/mapper/35000c5004b426b2f-part2p1: 2011 MB, 2011168768 bytes
255 heads, 63 sectors/track, 244 cylinders, total 3928064 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/35000c5001620695a-part1p1: 1000.2 GB, 1000202043392 bytes
255 heads, 63 sectors/track, 121600 cylinders, total 1953519616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


I notice though that somehow the file didn't capture the message "Disk /dev/mapper/35000c5001620695a-part1p1 doesn't contain a valid partition table".

I have rebooted after the format so it should've re-read the partition table... What can I do to check the integrity?
 
I will not be doing RAID - just want two separate disks that I can operate individually.
This is my first time working with RAID and the first thing I learnt was that I can't just add it in the bay and try to format

Now which is it? RAID or not?
Answer ponder, what is in your /etc/fstab?

https://help.ubuntu.com/community/InstallingANewHardDrive


Please post as much detail as possible, not just bits and pieces.

Is it a new drive? What was on it previously?

Did you partition it?
How did you format it, what command did you use?
 
Last edited:
Yello,
fstab is quite boring... and empty :)

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=79d267fc-9619-4bcf-98d6-86eecb1c7621 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=091c4c3a-6ab6-456d-bcdc-ac245083a770 none swap sw 0 0
 
Fire up gparted, repartition the disk, reformat it, add this to your /etc/fstab and reboot:

Code:
gksu gparted

To get the disk UUID:
Code:
sudo blkid

Add the UUID of the 1TB disk into fstab like so:
Code:
gksu gedit

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=79d267fc-9619-4bcf-98d6-86eecb1c7621 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=091c4c3a-6ab6-456d-bcdc-ac245083a770 none swap sw 0 0
# Your new disk here
UUID=XXXXXXXXXXXXXXXXXXXXX /opt/data ext4 defaults 0 1

Reboot and it should now be fixed.
:)
 
Last edited:
Neep - still giving me carrots.

Firstly, excuses for not giving you guys more info to start with - my time is spread thin between a 2 yr old and an 8 week old baby and a wife that wants attention ;) In fact, my pants is still wet after burping my son but I figured I'd quickly give you guys more details :)

I don't want to set up my system with RAID at this point - though the main purpose for the microserver is redundancy of critical data (family photo's etc on both the 250GB and 1TB). RAID will come later when I can afford another 1TB.

My 1TB used to be in an enclosure. I firstly tried formatting the disk while it was in the microserver (using fdisk and mkfs (also tried from within webmin's disk management module)) but I kept getting that 'device busy' error. So I figured maybe it's because it's in a RAID set up so I moved it back to its enclosure and partitioned and formatted it from my laptop with an earlier version of Ubuntu (11.x methinks).

So, then I moved it back to the server but I still couldn't mount it but all the commands I throw at it (mount and fstab) doesn't even see that disk.

So, just now I've fdisk'ed it again (The first sector I could choose was 2048, is this right? Also, it shows the disk as 930GB??) while it's still in the microboxen but just as soon as I want to format it (sudo mkfs -t ext4 /dev/sdb1) (straight after fdisk) it throws me the same error "/dev/sdb1 is apparently in use by the system; will not make a file system here!"

O yes, I also changed the BIOS setting for IDE configuration - I changed it from AHCI to IDE (I figured that maybe the disk is being accessed on a low level). So, given that piece of information - which setting do you guys recommend for my intended setup? AHCI or IDE?

Thanks for all the help & time so far!
 
Hi mxc,
This is the output from the fdisk -l:

Disk /dev/mapper/35000c5001620695a-part1: 1000.2 GB, 1000203091968 bytes
26 heads, 24 sectors/track, 3130643 cylinders, total 1953521664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86768889

Device Boot Start End Blocks Id System
/dev/mapper/35000c5001620695a-part1p1 2048 1953521663 976759808 83 Linux

Disk /dev/mapper/35000c5004b426b2f-part2p1: 2011 MB, 2011168768 bytes
255 heads, 63 sectors/track, 244 cylinders, total 3928064 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/35000c5001620695a-part1p1: 1000.2 GB, 1000202043392 bytes
255 heads, 63 sectors/track, 121600 cylinders, total 1953519616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


I notice though that somehow the file didn't capture the message "Disk /dev/mapper/35000c5001620695a-part1p1 doesn't contain a valid partition table".

The output of fdisk should also list the physical partitions e.g /dev/sda, /dev/sdb. /dev/mapper is used for the multi-disk type abstraction disk systems such as logical volume management, mdadm (software raid) etc. But there should be the physical disks listed as well. Is this the entire output? It might have scrolled passed your terminal. From the above it looks like you got 1 disk with 2 partitions. A 1000.2GB partition and another partition of 2011MB about 2G.

You probably using lvm (logical volume management), but your new disk should still show up with fdisk. You can run pvdisplay and see what partitions have been allocated to the logical volume.
What is the output of "mount"?

As with the others I am a bit confused as to whether you setup raid/lvm or not because in the beginning you say you not using raid and then later you say you are using raid? Also if the 1TB was formatted in an enclosure and then placed in the microserver where is the operating system sitting? If the microsver is booting and you are trying to add a new disk the information provided does not add up.

The output from /etc/fstab totally contradicts the output from "fdisk -l". Are they from the same machine? What is the output of "ls -l /dev/disk/by-uuid" (that's lower case L).

Maybe you just tired from all those sleepless nights :) and need to let us know the current state of affairs clearly. Is there another disk with the OS? Doesn't look like it from the above output.

So please provide output of:

"mount"
""ls -l /dev/disk/by-uuid"
"fdisk -l" -- full output
"pvdisplay" and "mdadm --detail --scan" - one of these may give an error.

PHP Training
 
Last edited:
You should never change that setting (AHCI vs IDE) once an operating system is installed. It will mess up your installation badly. Just leave it at AHCI.

All the advice in here should give you a hand, I just add another layer of troubleshooting.

After reading everything and considering how thorough you have done everything, I would like to suggest that it may also be a setting in the BIOS, try seeing if there is a RAID setting that is enabled and disable it.

How you can test, unplug /dev/sda, plug the 1TB into that controller, boot a liveCD and see if it picks up the drive correctly.
Also, make sure all your SATA cables are new/undamaged, try another cable, you should have some lying around. SATA cables cannot bend like the old IDE cables, so a sharp bend in the cable can cause headaches.

Now for the technical part:
If it is not the controller, and you have ruled out any hardware problems (different controllers, different cables, unplugging everything and only leaving the drives attatched, etc.), you need to find out why the system does not release or recognise the drive.

Code:
sudo su                          # This will give you a permanent superuser session, everything you need to do is going to be as root so this is easier, otherwise you need to type sudo before each command
cffdisk /dev/sdb                 # This is much easier to use than fdisk and the chances that you will make a mistake minimal
                                 # Create new primary partition and set the filetype, write changes to disk
mkfs.ext4 /dev/sdb1              # Format the drive ext4 filesystem. See if any errors are reported


mkdir /opt/data                  # Create the mount path
mount /dev/sdb1 /opt/data        # If it succeeds or fail, does not matter, check you logs

dmesg | tail                     # If something is wrong it should be mentioned here
cat /var/log/errors.log | tail   # Check the timestamp and see if there are any errors
cat /var/log/kernel.log | tail   # Same, see corresponding timestamp and see if there are any kernel errors

If this does not help, how old is the drive? Try and see if you can test another drive to make sure it is not the drive that is causing the errors.

This is a mouthful, hope you get everything sorted!
:D
 
Last edited:
Hi mxc,
Neep - I definately don't want to set up RAID now. I tried to only paste the information relevant to my 1TB when pasting info from fdisk etc - didn't think the other info would be necessary.

I ran those commands (no output from pvdisplay or mdadm - I ran both using sudo):

MOUNT
/dev/mapper/35000c5004b426b2f-part1 on / type ext4 (rw,errors=remount-ro) #My 250GB disk
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
none on /sys/kernel/config type configfs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)


FDISK -L
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e416c

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 484466687 242232320 83 Linux
/dev/sda2 484468734 488396799 1964033 5 Extended
/dev/sda5 484468736 488396799 1964032 82 Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1784df20

Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953525167 976761560 83 Linux

Disk /dev/mapper/35000c5004b426b2f: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e416c

Device Boot Start End Blocks Id System
/dev/mapper/35000c5004b426b2f1 * 2048 484466687 242232320 83 Linux
/dev/mapper/35000c5004b426b2f2 484468734 488396799 1964033 5 Extended
/dev/mapper/35000c5004b426b2f5 484468736 488396799 1964032 82 Linux swap / Solaris

Disk /dev/mapper/35000c5001620695a: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1784df20

Device Boot Start End Blocks Id System
/dev/mapper/35000c5001620695a1 2048 1953525167 976761560 83 Linux

Disk /dev/mapper/35000c5001620695a-part1: 1000.2 GB, 1000203837440 bytes
26 heads, 24 sectors/track, 3130646 cylinders, total 1953523120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86768889

Device Boot Start End Blocks Id System
/dev/mapper/35000c5001620695a-part1p1 2048 1953521663 976759808 83 Linux

Disk /dev/mapper/35000c5004b426b2f-part1: 248.0 GB, 248045895680 bytes
255 heads, 63 sectors/track, 30156 cylinders, total 484464640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/35000c5004b426b2f-part2: 2011 MB, 2011169792 bytes
255 heads, 63 sectors/track, 244 cylinders, total 3928066 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/mapper/35000c5004b426b2f-part2p1 2 3928065 1964032 82 Linux swap / Solaris

Disk /dev/mapper/35000c5004b426b2f-part5: 2011 MB, 2011168768 bytes
255 heads, 63 sectors/track, 244 cylinders, total 3928064 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Re those 'sleepless nights' - I got my boy doing tummy time next to me right now as I reply :whistle: He'll have plenty to think about next time he wants to wake up :)

PS LS -L
total 0
lrwxrwxrwx 1 root root 10 Jul 21 21:32 091c4c3a-6ab6-456d-bcdc-ac245083a770 -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jul 21 21:32 28e36f05-301b-4454-a133-22e96d05a18a -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jul 21 21:32 79d267fc-9619-4bcf-98d6-86eecb1c7621 -> ../../dm-3
 
Last edited:
MyWorld,
I'll try your live CD option after replacing the bootable disk with the 1TB. If that still fails I'm just going to reinstall Ubuntu - the first time I didn't have my 1TB plugged in - I figured it may give me too much problems - thought that the installation process would maybe force me to go RAID.

PS - I installed the 64 bit version of Ubuntu - that shouldn't be a problem, right?
PPS - I couldn't find a download site for cffdisk.
 
Last edited:
Hi Cabos,

From the output above you have two physical disk. /dev/sda = 250G and /dev/sdb = 1TB. /dev/sda has 3 partitions while /dev/sdb1 has only 1 partition. It appears that /dev/sda is holding your OS. I assume /dev/sdb is the new drive.

All the devices are used in some multi-disk setup as is evident from the /dev/mapper links. So /dev/sdb1 is being mapped by the deivce /dev/mapper/35000c5001620695a. From the output of mount it appears that this is not currently mounted anywhere. You will need to mount the device /dev/mapper/35000c5001620695a and not /dev/sdb1. It seem that you are using lvm.

There are several steps to get the disk to be available for use under lvm. First you need to find out what logical volumes you have run "lvdisplay","vgdisplay" and "pvdisplay" and post the output. If you know enough about lvm you just need to find out what volume group the partitions is part of and if it has been alloctated to a logical volume. Then you need to mount the logical volume. You cannot mount /dev/sdb1 directly.

PHP Training
 
Top
Sign up to the MyBroadband newsletter
X