LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2012, 11:10 PM   #1
mmtrebuchet
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Rep: Reputation: Disabled
mounting a raid partition to /dir


Hi, all. I am setting up a little file server. I created some partitions during install:

sda_______sdb
../..|../scratch...(50 gb each)
..../www...........(raid md126, 150 gb)
..../repos.........(raid md127, 750 gb)


I could have sworn I told the installer to mount md126 as /www, and md127 as /repos, but this turns out to not have been the case.
It created the /repos and /www folders, but apparently didn't link them to the raid partitions. I found this out when I filled up /. Oopsie.


% df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 50395844 5814504 42021340 13% /
/dev/sdb1 50395844 36636116 11199728 77% /scratch
tmpfs 3958980 0 3958980 0% /dev/shm


So that's not what I had in mind... (In case you're curious, I had filled up /, but mved it to /scratch.)

I ran fdisk -l, and it listed the partitions, but I noticed that both md127 and md126
"Disk /dev/md126 doesn't contain a valid partition table"

And, if it's any help:
%cat /etc/fstab
/dev/sda1 / ext4 defaults 1 1
/dev/md1 /repos btrfs defaults 1 2
/dev/md3 /www btrfs defaults 1 2
/dev/sdb1 /scratch ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0


So my question:
How do I mount /dev/md127 so that when I write a file to /repos, it is stored on that raid partition, rather than the / partition? If it helps, I'm mostly interacting with /repos using sftp and git.

Last edited by mmtrebuchet; 01-21-2012 at 11:27 PM. Reason: added cat /etc/fstab.
 
Old 01-22-2012, 02:09 AM   #2
vishnu_sreekumar
Member
 
Registered: Jan 2006
Location: India
Distribution: Ubuntu, RHEL, Debian
Posts: 49

Rep: Reputation: 20
Have you created any filesystem on top of RAID?
 
Old 01-22-2012, 03:09 PM   #3
mmtrebuchet
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Well, I thought I did, but maybe I didn't actually do it. I set it up during install, what you see in /etc/fstab is what I thought the system was doing.
Is there a way to check this?
 
Old 01-22-2012, 08:50 PM   #4
mmtrebuchet
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I'm an idiot.

The devices I wanted were /dev/md126 and /dev/md127...
%cat /etc/fstab
....
/dev/md1 /repos btrfs defaults 1 2
/dev/md3 /www btrfs defaults 1 2
....

Changed the device names, they mounted just fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting two partitions to the same dir, how programs can keep apart zhjim Linux - Software 5 10-13-2009 07:19 AM
Mounting dir takes 2 mins leupi Ubuntu 6 03-17-2007 08:59 AM
Mounting NTFS partition from SATA RAID aoberoi Linux - Hardware 6 05-19-2006 10:39 PM
Mounting home dir trouble rael_kid Linux - Newbie 4 03-25-2005 01:24 AM
Mounting linear-raid partition daniel_lidstrom Linux - Software 2 12-29-2004 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration