harddisk control (adding/changing)

pbecks1963
Posts: 51
Joined: Fri Dec 12, 2008 12:24 am
Location: Netherlands/Zutphen

harddisk control (adding/changing)

Postby pbecks1963 » Sun Jan 25, 2009 1:03 pm

Hello,

I would like to see a tool with which i can manage my harddrives. By mistake i have a lvm group set up off 3 ide harddisk's. I would like to change all that (some day). But in the mean time i want to add a fourth ide harddisk. (not necceseraly to the lvm!)

?

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: harddisk control (adding/changing)

Postby cpg » Sun Jan 25, 2009 1:41 pm

is this guide on how to add drives to your amahi home server good for you?
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

pbecks1963
Posts: 51
Joined: Fri Dec 12, 2008 12:24 am
Location: Netherlands/Zutphen

Re: harddisk control (adding/changing)

Postby pbecks1963 » Tue Jan 27, 2009 3:25 am

Hello cpg,

The script producess errors. I guess i'll have to start all over (re-installing amahi on the server) again to get things right.

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: harddisk control (adding/changing)

Postby moredruid » Tue Jan 27, 2009 4:05 am

No you don't need to reinstall.
You can extend your lvm with a 4th disk.

As posted in the installation section I'm going to experiment a little bit with it and post a tutorial...
If you can wait a couple of days I'll have the tut posted.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

pbecks1963
Posts: 51
Joined: Fri Dec 12, 2008 12:24 am
Location: Netherlands/Zutphen

Re: harddisk control (adding/changing)

Postby pbecks1963 » Tue Jan 27, 2009 4:40 am

Ok, great.. I'll wait

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: harddisk control (adding/changing)

Postby cpg » Tue Jan 27, 2009 11:31 am

The script producess errors. I guess i'll have to start all over (re-installing amahi on the server) again to get things right.
well, that is a solution, however, if you could copy the errors, it would be helpful to understand why and perhaps fix them.

it would be useful to everyone.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

pbecks1963
Posts: 51
Joined: Fri Dec 12, 2008 12:24 am
Location: Netherlands/Zutphen

Re: harddisk control (adding/changing)

Postby pbecks1963 » Tue Jan 27, 2009 11:59 am

Here they are!
**************************************************

[root@localhost Download]# sh Diskmounter.sh
Diskmounter.sh: line 37: fdisk: command not found
Diskmounter.sh: line 38: fdisk: command not found
Diskmounter.sh: line 39: fdisk: command not found
Diskmounter.sh: line 40: fdisk: command not found
[root@localhost Download]#
*******************************************************
Lines refered to in the above error's:

drivesntfs=`fdisk -l | grep -i 'ntfs' | awk -F '/| ' '{print $3}'`
drivesfat=`fdisk -l | grep -i 'fat32' | awk -F '/| ' '{print $3}'`
driveshfs=`fdisk -l | grep -i 'Apple_HFS' | awk -F '/| ' '{print $3}'`
drivesext=`fdisk -l | grep -i 'Linux' | grep -v 'swap' | awk -F '/| ' '{print $3}'`
********************************************************
mount-command:

[root@localhost Download]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/patrick/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=patrick)
[root@localhost Download]#
************************************************
command: fdisk -l

root@localhost Download]# /sbin/fdisk -l

Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90909090

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 2434 19350292+ 8e Linux LVM

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 40.0 GB, 40037760000 bytes
255 heads, 63 sectors/track, 4867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 4983 40021631+ ee EFI GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 1 1 16+ ee EFI GPT
/dev/sdc2 * 1 9730 78150710+ 8e Linux LVM

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdd1 1 1 16+ ee EFI GPT
/dev/sdd2 * 1 9965 80043230+ 8e Linux LVM

Disk /dev/dm-0: 180.0 GB, 180019527680 bytes
255 heads, 63 sectors/track, 21886 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 1610 MB, 1610612736 bytes
255 heads, 63 sectors/track, 195 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost Download]#
[root@localhost Download]#

User avatar
jfrenc14
Expert
Posts: 55
Joined: Wed Dec 03, 2008 8:13 pm

Re: harddisk control (adding/changing)

Postby jfrenc14 » Tue Jan 27, 2009 2:19 pm

it looks like you dont have fdisk installed, do

Code: Select all

su -c 'yum install fdisk'

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: harddisk control (adding/changing)

Postby cpg » Tue Jan 27, 2009 2:39 pm

i think fdisk is installed by default. in fact, it looks like it is in /sbin, per his listing above.

i think this may fix it:

Code: Select all

su -
the dash (-) is very important. without it, the user environment is what is being used. i.e. PATH does not include /sbin, which is where fdisk is located.

that or logging in as su directly.

after the su -, then run the Diskmounter.sh script.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: harddisk control (adding/changing)

Postby moredruid » Wed Jan 28, 2009 12:32 am

fdisk is installed by default on every linux distro.

Code: Select all

root@localhost #
I think running su - doesn't really help here if you're logged on as root, you'll just spawn another bash instance.
however, if you're elevating your rights from a normal user to root, you MUST run the command like this:

Code: Select all

su -
this will spawn a root bash (or whatever you have defined) shell, and include all the environment variables (like PATH, EXPORT etc.)
without the "-" it will just run a root bash with loading the .bashrc from root, which might produce the error.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

Who is online

Users browsing this forum: No registered users and 43 guests