hi, Im trying to clear a harddisk of its old partitions and create a single partition to cover the complete disk, so that i can use it as a single physical volume for my Volume Group (LVM)
here's what i did.
#!/usr/bin/env python import parted
parted.init() parted.device_probe_all()
# my disk mount point is /dev/sdb
device = parted.device_get('/dev/sdb') # depreciated but im using ubuntu (could not find
parted.PedDevice.get(path) ) disk = device.disk_open()
# delete all old stuffs disk.delete_all() disk.write()