quota-xfs/install.sh

raw link view readme
1 parted -s /dev/sdb mklabel msdos
2 parted -s /dev/sdb mkpart primary 1MiB 100%
3
4 mkfs.xfs /dev/sdb1
5
6 mkdir -p /var/librarian
7
8 echo `xfs_admin -u /dev/sdb1 | sed 's/ //g'` /var/librarian xfs defaults,uquota 0 0 >> /etc/fstab
9
10 mount -a
11
12 useradd librarian -m -s /bin/bash
13
14 #++ cf. https://www.suse.com/support/kb/doc?id=7016701
15 xfs_quota -xc 'limit -u bsoft=500m bhard=1000m librarian' /var/librarian
16
17 chown librarian:librarian /var/librarian
18 chmod g+s /var/librarian
19
20 su - librarian
21
22 for n in `seq 10`; do dd if=/dev/zero of=/var/librarian/$n.img bs=1M count=10; done
23
24 exit
25