Revision 391d0261 lib/constants.py

b/lib/constants.py
120 120
CRYPTO_KEYS_DIR_MODE = SECURE_DIR_MODE
121 121
IMPORT_EXPORT_DIR = RUN_GANETI_DIR + "/import-export"
122 122
IMPORT_EXPORT_DIR_MODE = 0755
123
ADOPTABLE_BLOCKDEV_ROOT = "/dev/disk/"
123 124
# keep RUN_GANETI_DIR first here, to make sure all get created when the node
124 125
# daemon is started (this takes care of RUN_DIR being tmpfs)
125 126
SUB_RUN_DIRS = [ RUN_GANETI_DIR, BDEV_CACHE_DIR, DISK_LINKS_DIR ]
......
363 364
DT_DRBD8 = "drbd"
364 365
DT_FILE = "file"
365 366
DT_SHARED_FILE = "sharedfile"
367
DT_BLOCK = "blockdev"
366 368

  
367 369
# the set of network-mirrored disk templates
368 370
DTS_NET_MIRROR = frozenset([DT_DRBD8])
369 371

  
370
# the set of externally mirrored disk templates
371
DTS_EXT_MIRROR = frozenset([DT_SHARED_FILE])
372
# the set of externally-mirrored disk templates (e.g. SAN, NAS)
373
DTS_EXT_MIRROR = frozenset([DT_SHARED_FILE, DT_BLOCK])
372 374

  
373 375
# the set of non-lvm-based disk templates
374
DTS_NOT_LVM = frozenset([DT_DISKLESS, DT_FILE, DT_SHARED_FILE])
376
DTS_NOT_LVM = frozenset([DT_DISKLESS, DT_FILE, DT_SHARED_FILE, DT_BLOCK])
375 377

  
376 378
# the set of disk templates which can be grown
377 379
DTS_GROWABLE = frozenset([DT_PLAIN, DT_DRBD8, DT_FILE, DT_SHARED_FILE])
378 380

  
379 381
# the set of disk templates that allow adoption
380
DTS_MAY_ADOPT = frozenset([DT_PLAIN])
382
DTS_MAY_ADOPT = frozenset([DT_PLAIN, DT_BLOCK])
383

  
384
# the set of disk templates that *must* use adoption
385
DTS_MUST_ADOPT = frozenset([DT_BLOCK])
381 386

  
382 387
# the set of disk templates that allow migrations
383 388
DTS_MIRRORED = frozenset.union(DTS_NET_MIRROR, DTS_EXT_MIRROR)
......
387 392
LD_LV = "lvm"
388 393
LD_DRBD8 = "drbd8"
389 394
LD_FILE = "file"
390
LDS_BLOCK = frozenset([LD_LV, LD_DRBD8])
395
LD_BLOCKDEV = "blockdev"
396
LDS_BLOCK = frozenset([LD_LV, LD_DRBD8, LD_BLOCKDEV])
391 397

  
392 398
# drbd constants
393 399
DRBD_HMAC_ALG = "md5"
......
460 466
CHILD_LINGER_TIMEOUT = 5.0
461 467

  
462 468
DISK_TEMPLATES = frozenset([DT_DISKLESS, DT_PLAIN, DT_DRBD8,
463
                            DT_FILE, DT_SHARED_FILE])
469
                            DT_FILE, DT_SHARED_FILE, DT_BLOCK])
464 470

  
465 471
FILE_DRIVER = frozenset([FD_LOOP, FD_BLKTAP])
466 472

  
......
1279 1285
  ALLOC_POLICY_LAST_RESORT,
1280 1286
  ALLOC_POLICY_UNALLOCABLE,
1281 1287
  ]
1288

  
1289
# Temporary external/shared storage parameters
1290
BLOCKDEV_DRIVER_MANUAL = "manual"

Also available in: Unified diff