xfs
[Top] [All Lists]

Re: Quota Backup

To: Ethan Benson <erbenson@xxxxxxxxxx>
Subject: Re: Quota Backup
From: Norman Zhang <norman.zhang@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 Mar 2004 10:20:11 -0800
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20040306075311.GJ1003@xxxxxxxxxxxxxxx>
References: <40491E66.8030802@xxxxxxxxxxxxxxxxxxxx> <20040306075311.GJ1003@xxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)
Ethan Benson wrote:
On Fri, Mar 05, 2004 at 04:42:14PM -0800, Norman Zhang wrote:

I'm trying to use xfsdq/xfsrq to backup/restore the Quota of XFS partitions from one machine to another. However, the disk on the other machine is on a different host/bus/. Also the Samba users are of differnent uid. Can xfsdq/xfsrq do the job? Please help.

I tried,

# xfsdq -u xfshome /home  # on machine1
# xfsrq -u xfshome        # on machine2

but got the following error messages,

Bugs to: mvw@xxxxxxxxxxxxxxx, jack@xxxxxxx
setting quota for id=10091 dev=/dev/scsi/host1/bus0/target0/lun0/part7
setquota: invalid option -- n
setquota: Usage:
 setquota [-u|-g] [-F quotaformat] <user|group>
<block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> -a|<filesystem>... setquota [-u|-g] [-F quotaformat] <-p protouser|protogroup> <user|group> -a|<filesystem>... setquota [-u|-g] [-F quotaformat] -t <blockgrace> <inodegrace> -a|<filesystem>... setquota [-u|-g] [-F quotaformat] <user|group> -T <blockgrace> <inodegrace> -a|<filesystem>...

try with this patch:

--- /usr/sbin/xfsrq     Sun Jul 13 19:48:59 2003
+++ xfsrq       Sun Aug 10 15:00:31 2003
@@ -66,7 +66,7 @@
                        # blk conversion (512 -> 1024)
                        bsoft=`expr $bsoft / 2`
                        bhard=`expr $bhard / 2`
-                       setquota $OPTS -n $id $fs $bsoft $bhard $isoft $ihard
+                       setquota $OPTS $id $bsoft $bhard $isoft $ihard $fs
                done
                ;;
        *)      echo $USAGE 1>&2

i have been meaning to check current quota utils to see if its just
the older version i have which lacks the -n switch , or if the xfsrq
script is just broken.

No it doesn't work.

setting quota for id=10097 dev=/dev/scsi/host1/bus0/target0/lun0/part7
setquota: Bad block softlimit: /dev/scsi/host1/bus0/target0/lun0/part7
setquota: Usage:
  setquota [-u|-g] [-F quotaformat] <user|group>
<block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> -a|<filesystem>...

My system_quota (xfshome) file looks as follow.

fs = /dev/scsi/host1/bus0/target0/lun0/part7
0           409600  409600     512     512
fs = /dev/scsi/host1/bus0/target0/lun0/part7
10098       409600  409600     512     512
fs = /dev/scsi/host1/bus0/target0/lun0/part7
10000       409600  409600     512     512
...

Regards,
Norman


<Prev in Thread] Current Thread [Next in Thread>