xfsdump: ERROR: hostname length is zero

New to SGIs? Need help getting things going? This is the forum for you!
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
Posts: 1021
Joined: Thu Nov 08, 2007 4:35 pm
Location: Lynnwood, WA

xfsdump: ERROR: hostname length is zero

Unread postby japes » Mon May 16, 2016 2:17 pm

While cloning a XFS file system with xfsdump(1M) while in single user mode you receive the following error

Code: Select all

xfsdump: ERROR: hostname length is zero
You booted single user mode from the PROM monitor using the command single.

When you boot into single usermode, even though the prompt shows your hostname, the hostname isn't set with the hostname command. Once you set the hostname xfsdump will run as expected. If you reached single user mode using `init s` from multiuser mode, the hostname will be set and you shouldn't have experienced this error.

Code: Select all

speedracer 1# hostname

speedracer 2# hostname speedracer
speedracer 3# hostname
speedracer 4#

You can probably add some trickery if you want, something like: hostname `cat /etc/sys_id`, but that's just icing.

I created this post because it comes up sometimes. More important, I needed to solve this problem last night/today. There are two topics I found when searching, one held a big hint, but I didn't see any follow up.

The first of those topics someone asked what was returned from the hostname command, but I didn't see any follow up. Hope this helps someone. I expect it to help future me.

If you made it this far and are wondering what I'm talking about xfsdump, there are a couple guides on cloning an IRIX system drive. The usual method is to use xfsdump(1M) to dump a filesystem and pipe the output to xfsrestore(1M) to write that filesystem to a new drive. I often change it up and use xfsdump to a file and then back that file up to a server. If you use xfsdump on a fully booted system with network support you can directly write the dump file to a NFS server. I was using single user mode (as suggested by many guides) to have a quieter system for xfsdump to read and dumping to a file on a second drive I mounted. Another solution would be to put the drive in as a secondary drive - which probably makes more sense, but not at the end of a long weekend.

For those interested:

Code: Select all

speedracer #1 hostname speedracer
speedracer #2 mkdir /disk2
speedracer #3 mount /dev/dsk/dks0d2s0 /disk2
speedracer #4 xfsdump -l0 -p10 -f /disk2/dumptest.xfsdump /

This example is what I performed on an Octane2 with two disks, a fresh installation in the first drive bay that was booted into single user mode, and a previous installation in the second drive bay (thus the XFS partition I mounted is slice 0). The -f parameter instead of a single hyphen changes the destination to a file on my mounted filesystem instead of stdout.

My example alone is probably not enough to get the full understanding if you're new to xfsdump/xfsrestore. I'd recommend picking one of the guides and looking through it, try out the clone process if you have a couple drives to use as scratch, and refer to the manual pages.

reference: http://www.sgidepot.co.uk/disksfiles.html#CLONE
http://cspry.co.uk/computing/Indy_admin ... ackup.html
and more like that.
:O3000: :Fuel: :Tezro: :Tezro: :Octane2: :Octane: :Octane: :Indigo: :Indigo: :Indigo: :Indigo: :O2: :1600SW: :O2: :1600SW: :1600SW: :Indigo2: :Indigo2: :Indigo2: :Indigo2: :Indigo2IMP: :Indy: :Indy: :Indy: :Indy: :O3x0: :O3x02L: :O3x02L:

Return to “Getting Started, Documentation, Tips & Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests