[DRBD-user] Best way to use LVM with drbd: xfs directory quotas

rois rois at cobiz.com
Fri Feb 15 19:53:11 CET 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Thanks Lars.  I printed it out and will definitely take a look.  That
would simplify administration if I could just increase quota limits.
I'm just about ready to go into production with this cluster so I'm not
sure I want to mess with it at this point unless it makes a significant
performance difference.

Is there any benefit (speed or otherwise) to using separate drbd's
(replicating on separate ports) as opposed to 1 drbd using quota?

I'm always thinking about ways to simplify just for the sake of
maintenance.  


On Fri, 2008-02-15 at 19:08 +0100, Lars Ellenberg wrote:
> On Fri, Feb 15, 2008 at 09:03:06AM -0800, rois wrote:
> > I'm running XFS on top of DRBD on top of LVM on top of a hardware
> > RAID-5.  My reasoning was I didn't want to leave a ton of room for my
> > system and log files but wanted to be able to expand them later if I
> > needed to.  I figured the easiest way was to put my whole HWRaid-5 Array
> > into the LVM and then parse it out as needed.  I'm also running several
> > servers/apps on this cluster whose data I wanted isolated so one service
> > couldn't be crashed by another one using all the space up.  This also
> > seemed the most flexible.
> > 
> > /dev/sda1 (100%) -> vg0 (lvm2)  [sda1 is my HWRAID-5 array]
> > 
> > /dev/vg0 >	vg0/root “/” (1G) xfs filesystem
> > 		vg0/var “/var” (1G) xfs filesystem
> > 		vg0/swap “swap” (1g) swap
> > 
> > drbd0 = /dev/vg0/home  - HA mounts drbd0 on /home (XFS)
> > drbd1 = /dev/vg0/mysql - HA mounts drbd1 on /mnt/mysql (XFS)
> > drbd2 = /dev/vg0/basic - HA mounts drbd2 on /usr/lib/basic (XFS)
> > drbd3 = /dev/vg0/smb   - HA mounts drbd3 on /mnt/smb (XFS)
> > 
> > Expanding the drbd's is a little bit of a hassle but since I should have
> > to do it that often I don't care that much.  I wonder if there is a
> > linux quota service somewhere that could monitor directory usage instead
> > of using partitions to do that.  Hadn't thought of that before but may
> > need to look into it.  Expanding a quota (like on a webserver) would be
> > a lot easier.  Oh well.
> 
> nothing to do directly with drbd, but, since you are using xfs:
> it supports "project quotas", see man xfs_quota, search for directory
> tree quota.
> (you maybe want to check for upgrades of your xfsprogs package)
> 
> man page is slightly confusing in the examples, though.  basically, for
> your setup on one single mountpoint, you'd have something like
> 
> /etc/projects
> 10:/mntpoint/home
> 11:/mntpoint/mysql
> 12:/mntpoint/basic
> 13:/mntpoint/smb
> 
> /etc/projid
> home:10
> mysql:11
> basic:12
> smb:13
> 
> mkfs.xfs /dev/drbdX
> mount -o prjquota /dev/drbdX /mntpoint
> mkdir /mntpoint/{home,mysql,basic,smb}
> xfs_quota -x -c 'project -s home mysql basic smb' /mntpoint
> xfs_quota -x -c 'limit -p bhard=20G home' /mntpoint
> xfs_quota -x -c 'limit -p bhard=10G basic' /mntpoint
> ...
> 




More information about the drbd-user mailing list