Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Software Raid, df reporting weirdly?
post Sep 24 2004, 12:04 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 24-September 04
Member No.: 3,834

I setup software raid on a box under RedHat 9.0. But I'm a little confused about some of the outputs I'm getting...I hope I haven't missed a step somewhere...

I set up my /, swap and boot on a separate drive, and created the /home partition on a raid partition consisting of the two 160GB drives.

[root@rosetta /]# cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/md0                /home                   ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda3               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0

[root@rosetta /]# cat /proc/mdstat
Personalities : [raid0]
read_ahead 1024 sectors
md0 : active raid0 hde1[0] hdf1[1]
     312576512 blocks 64k chunks

unused devices: <none>

[root@rosetta /]# cat /etc/raidtab
raiddev                        /dev/md0
raid-level                                0
nr-raid-disks                            2
chunk-size                           64k
persistent-superblock               1
nr-spare-disks                         0
   device          /dev/hde1
   raid-disk        0
   device          /dev/hdf1
   raid-disk       1

So far, so good.

dmesg output as follows:
hda: Maxtor 83240D4, ATA DISK drive
hdb: probing with STATUS(0x00) instead of ALTSTATUS(0x50)
hdb: probing with STATUS(0x00) instead of ALTSTATUS(0x50)
blk: queue c03cdfe0, I/O limit 4095Mb (mask 0xffffffff)
hde: ST3160023A, ATA DISK drive
hdf: ST3160023A, ATA DISK drive
blk: queue c03ce8a8, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c03ce9ec, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide2 at 0xdcd8-0xdcdf,0xdcd2 on irq 11
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 6328125 sectors (3240 MB) w/256KiB Cache, CHS=784/128/63, UDMA(33)
hde: attached ide-disk driver.
hde: host protected area => 1
hde: 312581808 sectors (160042 MB) w/8192KiB Cache, CHS=19457/255/63, UDMA(100)
hdf: attached ide-disk driver.
hdf: host protected area => 1
hdf: 312581808 sectors (160042 MB) w/8192KiB Cache, CHS=19457/255/63, UDMA(100)
Partition check:
hda: hda1 hda2 hda3
hde: hde1
hdf: hdf1
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: raid0 personality registered as nr 2
Journalled Block Device driver loaded
md: Autodetecting RAID arrays.
[events: 00000014]
[events: 00000014]
md: autorun ...
md: considering hde1 ...
md:  adding hde1 ...
md:  adding hdf1 ...
md: created md0
md: bind<hdf1,1>
md: bind<hde1,2>
md: running: <hde1><hdf1>
md: hde1's event counter: 00000014
md: hdf1's event counter: 00000014
md0: max total readahead window set to 512k
md0: 2 data-disks, max readahead per data-disk: 256k
raid0: looking at hde1
raid0:   comparing hde1(156288256) with hde1(156288256)
raid0:   END
raid0:   ==> UNIQUE
raid0: 1 zones
raid0: looking at hdf1
raid0:   comparing hdf1(156288256) with hde1(156288256)
raid0:   EQUAL
raid0: FINAL 1 zones
raid0: zone 0
raid0: checking hde1 ... contained as device 0
 (156288256) is smallest!.
raid0: checking hdf1 ... contained as device 1
raid0: zone->nb_dev: 2, size: 312576512
raid0: current zone offset: 156288256
raid0: done.
raid0 : md_size is 312576512 blocks.
raid0 : conf->smallest->size is 312576512 blocks.
raid0 : nb_zone is 1.
raid0 : Allocating 8 bytes for hash.
md: updating md0 RAID superblock on device
md: hde1 [events: 00000015]<6>(write) hde1's sb offset: 156288256
md: hdf1 [events: 00000015]<6>(write) hdf1's sb offset: 156288256
md: ... autorun DONE.

Looks good to me.

But I'm confused about the information I am getting from df:

[root@rosetta /]# du -s /home
27102572        /home

So I have 27GB of data on /home...

[root@rosetta /]# df
Filesystem           1K-blocks           Used   Available Use% Mounted on
/dev/hda2               2254200    1507192      632500  71% /
/dev/md0             307671672  27135380 264907468  10% /home
none                        192292             0      192292   0% /dev/shm

Why is the /dev/md0 device showing 300+ GB? Shouldn't it read 150 GB?

And if it did read 300+ GB, shouldn't Used read as 54GB?

I'm confuzzled sad.gif
Go to the top of the page
+Quote Post
post Sep 24 2004, 01:06 PM
Post #2

RMS is my Hero

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5

isnt raid0 stripped raid, example combining 2 drives into 1, which is why you are seeing 300+G

i believe what you are thinking of is raid1 which is mirrored which would show 150G.

correct me if im wrong...havent setup much raid devices lately..

how do you have your raid configured...i noticed in your post something about raid0.


Chris W.
Go to the top of the page
+Quote Post
post Sep 24 2004, 01:11 PM
Post #3

Its GNU/

Group: Support Specialist
Posts: 1,807
Joined: 23-January 03
Member No.: 360

I'm not a RAID expert but RAID level 0 is stripping which is basically combining the drives together. That is why home is 300GB and not 150GB. If you had setup a RAID 0+1 then the array size would of been 150GB instead of 300GB.
Go to the top of the page
+Quote Post
post Sep 24 2004, 01:36 PM
Post #4

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 24-September 04
Member No.: 3,834

Wow, I'm a complete moron...not sure how I could confuse RAID-1 and RAID-0...I'm giving myself a time-out.

Thanks for the help.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 15th July 2018 - 08:05 PM