Re: [Vchanger-users] Relabeling of volumes...
Brought to you by:
jaybus2
|
From: Steven A. F. <ste...@gm...> - 2022-09-22 21:49:49
|
On 9/22/22 05:56 AM, Marco Gaiarin wrote: > > Playing a bit with the setup, i've probably do some mistakes, and some > volumes in my media got 'error' status. > If i look at files on the media: > > root@pdpve2:~# ls -la /mnt/vchanger/a8b9a6fe-0f4a-44ad-b0cf-1083a0cfd2a2/ > total 354977865 > drwxrwx--- 3 bacula tape 4096 Jul 22 11:21 . > drwxrwx--- 5 bacula tape 5 Jul 29 11:25 .. > drwxrwx--- 2 bacula tape 16384 Jul 22 11:19 lost+found > -rw-r--r-- 1 bacula tape 0 Jul 22 11:21 PDPVE2RDX_0001_0000 This one is the only one with a zero length. All the rest appear to be labled. > -rw-r--r-- 1 bacula tape 1208477197 Sep 22 11:21 PDPVE2RDX_0001_0001 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0002 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0003 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0004 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0005 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0006 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0007 > -rw-r--r-- 1 bacula tape 234 Jul 22 11:30 PDPVE2RDX_0001_0008 > -rw-r--r-- 1 bacula tape 362288752282 Sep 19 23:07 PDPVE2RDX_0001_0009 > > they are zero file length. If i try to use it, bacula refuse to mount > the volume, probably because there's no label. > > > Also for 'real' tapes i've hit trouble like these, and i've used some times > 'btape' with the 'label' command to relabel an existing tape. > > > But how can i 'relabel' a volume managed by vchanger? If you type "list media" in bconsole, do all the volumes show up? If not, is only PDPVE2RDX_0001_0000 missing? A length of 234 bytes probably mean those volumes are already properly labeled. My unused volumes are actually 224 bytes in length, but 234 is pretty close. One thing to watch out for is to be sure your backup disks cannot possibly fill up. I don't know exactly how you have things set up, so please forgive me if you already took care of that. But, in case it is helpful, here is what I do. My vchanger Pool (in bacula-dir.conf) sets the Maximum Volume Bytes = 50GB, and I only create as many volumes on a disk that will fit, with a little space left over. First, I run a small script like: cd /wherever_the_drive_is_mounted for (( i=0; i < 1000; i++ )) do fallocate -l 50GB junk_$i done The idea is to try to create as many junk files of 50 GB as will fit. Let's say the loop got to 130 volumes before the fallocate started failing. I'd then delete the junk files that the loop created, and tell vchanger to create 125 real volumes. That way, I know there will be enough free space, even when all the volumes are full. Steve |