xfs
[Top] [All Lists]

Re: Quota Backup

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Quota Backup
From: Ethan Benson <erbenson@xxxxxxxxxx>
Date: Fri, 5 Mar 2004 22:53:11 -0900
In-reply-to: <40491E66.8030802@xxxxxxxxxxxxxxxxxxxx>
Mail-copies-to: nobody
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <40491E66.8030802@xxxxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Fri, Mar 05, 2004 at 04:42:14PM -0800, Norman Zhang wrote:
> Hi,
> 
> 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.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpgteSMNICTo.pgp
Description: PGP signature

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